On Tue, Apr 10, 2018 at 09:10:38AM -0700, Omen Wild wrote: > Quoting Chris Green <c...@isbd.net> on Tue, Apr 10 09:44: > > > > The muttfox script just calls a local or remote firefox it's only > > necessary because I run mutt via ssh remotely someetimes. For normal > > use you can just call firefox directly. > > Can you share this script? I have the same issue, but have been manually > working around it over SSH.
Here you go, it depends on having somewhere 'out there' on the cloud to save the message. #!/bin/bash # # # muttfox: script called by mutt via mailcap to use firefox to view HTML, # necessary because /usr/bin/firefox exits before firefox has # actually loaded the HTML file, especially when it's remote # # The temporary file to be viewed by Firefox is copied to a dedicated # user account called 'share' on isbd.uk (Gandi virtual machine). This # can take a second or two but means that the same code works when my # laptop is on the home LAN or away from home. # # if there's no DISPLAY variable then Firefox can't run, so skip the whole thing # if [ -n "$DISPLAY" ] then # # # copy the file to isbd.uk, $i is /tmp/mutt/<filename> # export RSYNC_RSH="ssh -i /home/chris/.ssh/np_id_rsa" chmod 644 $1 rsync -a $1 isbd.uk:mutt # # # pass the copy to firefox, runs local or remote firefox according to $DISPLAY # /usr/bin/firefox http://isbd.uk/mutt/$(basename $1) fi -- Chris Green