I have most of my home directory dot files shared across my home and work systems, each running a different version of Ubuntu.
I'm looking for a way to specify the default image viewer for each system in ~/.mailcap, so when it's invoked by mutt, the correct image viewer will start.
My current work-around is to put the following in ~/.mailcap ...
image/*; viewimage %s; test=test -n "$DISPLAY";
... where viewimage is a simple bash script:
#!/bin/bash hostname=`hostname` if [ $hostname == 'work-host' ]; then imageviewer=geeqie elif [ $hostname == 'home-host' ]; then imageviewer=ristretto fi $imageviewer $1
Any suggestions to avoid this workaround are appreciated.