Other mutt and urlview settings for CLI and GUI ?

meine

Member

Reaction score: 39
Messages: 90

Hi,

I use both the console or X (cwm) as a working environment. For vim I have an if-else statement in my vimrc that defines eg. the colour scheme when in one or the other environment.

I'd like the same for mutt, especially for opening url's in a browser -- lynx in console and seamonkey in X. I use xterm in X to operate mutt, in the console it's just the sh shell and screen.
  • .urlview seems not to be able to handle more lines with
    Code:
    COMMAND <browsername> %s
    and/or if-statements;
  • .profile and other's (I could find) seem also 'one-size-fits-all', but probably I'm missing some skills...
My wish-list:
  • when in console, mutt opens an url in lynx;
  • when in X mutt opens an url in seamonkey
Does anyone have a solution to this?

TIA,
 

ljboiler

Well-Known Member

Reaction score: 101
Messages: 338

Using the capabilities of mail/metamail, I can get mutt to do that (I use a different browser) with this in my ~/.mailcap
Code:
text/html; (uzbl-browser %s\; sleep 1); copiousoutput; test=test -n "$DISPLAY"
text/html; lynx -stdin -dump -force_html; copiousoutput
EDIT: Order of the lines in .mailcap IS important!
 
OP
OP
meine

meine

Member

Reaction score: 39
Messages: 90

Using the capabilities of mail/metamail, I can get mutt to do that (I use a different browser) with this in my ~/.mailcap
On my system .mailcap lives in .mutt/mailcap, I don't know of that is of any concern.

I installed mailcap, added your lines to mailcap, commented the lines pointing to urlview in muttrc and restarted mutt, but nothing happens.
 
Top