You are not logged in.
Pages: 1
Hello
I have a little problem here I'm trying to use feh as an image viewer and copied a script from the wiki to do so and works great, but whenever I try to launch it from PCManFM with a Custom Command Line it doesn't work.
my script is ~/bin/fehviewer :
#!/bin/bash
shopt -s nullglob
if [[ ! -f $1 ]]; then
echo "$0: first argument is not a file" >&2
exit 1
fi
file=$(basename -- "$1")
dir=$(dirname -- "$1")
arr=()
shift
cd -- "$dir"
for i in *; do
[[ -f $i ]] || continue
arr+=("$i")
[[ $i == $file ]] && c=$((${#arr[@]} - 1))
done
exec feh "$@" -- "${arr[@]:c}" "${arr[@]:0:c}"and within PCManFM Custom Command Line prompt I've tried:
~/bin/fehviewer %f
/home/MyUser/bin/fehviewer %f
eval /home/MyUser/bin/fehviewer %fAll with the "Execute in terminal emulator" on and off. Nothing seems to work.
Any help greatly appreciated... Thanks.
Offline
I saved my script to /usr/bin and created a FEH.desktop file in /usr/share/applications with the script name as the file to execute. I also edited my /usr/share/applications/mimeinfo.cache file to point all image formats I wanted to use feh for to my .desktop file. Now I just click on any image in PCManFM and it opens in feh. Hope this works for you or you have found a solution.
Offline
Pages: 1