Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I love feh to classify my image collections, I've set the actions to move the current image to a certain directory, the problem comes when trying to open gifs, feh doesn't animate them.

Therefore I was searching a lightweight image/gif viewer with the possibility to execute commands with simple key strokes as --action of feh does.

Thank you

I've found a program that might be good enough it's called gifview and it's an old version f gifsicle you can get it by installing gifsicle. The really interesting option is -w where you specify the window to open the gifs (so you can make all go to the same acting pretty much like feh), it still doesn't accept command inputs but it's close enough.

share|improve this question
If you have imagemagick installed, you can run animate -loop 0 file.gif – Braden Best Oct 2 '14 at 6:43

Depends on what you mean by light weight, lol. Based on your love of feh I suggest you look at gifsicle

home page -

man page -

I am not sure if gifsicle will display the image.

You might try displaying the image with your browser.

share|improve this answer
I've read the whole manual and it says nothing of executing commands at keystroke – Vndtta Feb 1 '13 at 20:33
I've found something that might be good enough gifview, which is an old version of gifsicle – Vndtta Feb 8 '13 at 10:37
up vote 0 down vote accepted

It seems that there is no program that can do such thing... so I decided to make my own script, goes as follows (using feh and gifview) :

while read i; do
    file+=( "$i" )
done < <(ls | sort -R)

for i in $(seq 0 "${#file[@]}");do
    if [[ "${file[$i]}" =~ .*.gif ]];then
        gifview -a "${file[$i]}"
        read -s -n 1 choice
        case $choice in
            1)    //Command to execute//
            2)    //Other Command to execute//
        feh -rqzZFVY --cycle-once --action1 "//Comand to execute//" --action2 "//Other command to execute// "${file[$i]}"

The script first loads the files into the array file, then it loops through those files with the for loop. if the file is a gif the first conditional is triggered, then a read command gets the option you want to do with the file and executes the command under the case option, else it executes feh

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.