Jeff Abrahamson on 1 Jun 2006 11:49:26 -0000 |
On Thu, Jun 01, 2006 at 12:41:12AM -0400, Mike Leone wrote: > [23 lines, 147 words, 1084 characters] Top characters: _ianslom > > So I want to use cacaview, to view jpegs from within mutt, for when I read > email over an ssh tunnel. This is using debian testing. So I installed the > cacautils package, and verified that cacaview works. (JPGs still look like > crap, but I suppose it's better than nothing ...) > > Anyway, I'm confused about the mailcap entries. I have this, in /etc/mailcap: > > image/jpeg; /usr/bin/cacaview '%s'; test=test -n "$DISPLAY" > > but when I try and view an attachment that mutt says is > "image/jpeg", mutt tells me "No matching mailcap entry > found. Viewing as text". So what am I doing wrong? Mailcap files > confuse me. :-) > > And if anybody knows of a way to view images (JPGs, specifically) in > a commad-line terminal that even remotely looks like the image, I'm > eager to hear about it. I have the following lines in my mailcap file: image/*; eog %s ; test=/home/jeff/bin/RunningX image/*; cacaview %s image/*; /usr/bin/identify %s; copiousoutput Note the inverted order of the tests: If X is running, if X is not running, then if it's inline (auto-view'ed). The RunningX script is just this and is surely overkill as a script: #!/bin/sh # Return successfully if X appears to be running (based on DISPLAY) if [ "X$DISPLAY" = "X" ]; then # X is not available exit 1 fi # Assume X is available #echo "X appears to be available" exit 0 In my muttrc I have the following: alternative_order text/plain text application/postscript image/* auto_view image/* -- Jeff Jeff Abrahamson <http://jeff.purple.com/> +1 215/837-2287 GPG fingerprint: 1A1A BA95 D082 A558 A276 63C6 16BF 8C4C 0D1D AE4B Attachment:
signature.asc ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|