Re: gnu/screen + mutt - mailcap creates a new terminal instance

2009-06-21 Thread Chris Jones
On Sun, Jun 21, 2009 at 03:53:58AM EDT, Bob Proulx wrote:
> Chris Jones wrote:

[..]

> > Now on "lenny" although as far as I know I am using the same .muttrc and
> > the same /etc/mailcap that I copied over from the "etch" system, what
> > happens is that urlview creates a new xterm where it then launches an
> > ELinks session.
> > 
> > Would anyone know what particular setting would cause this behavior?

[..]

> To debug this run:
> 
>   bash -x /etc/urlview/url_handler.sh http://www.debian.org/ 
> 2>/tmp/url_handler.out

[..]

Exactly what I needed..!

I compared the url_handler.sh that I had on the "etch" system with the
"lenny" version and immediately spotted the following:

# lists of programs to be executed - modified CJ 2007/08/10.. trying to
# get elinks to be invoked.

http_prgs="/usr/bin/elinks:VT /usr/bin/x-www-browser:PW ...
https_prgs="/usr/bin/elinks:VT /usr/bin/x-www-browser:PW ...
etc.

I had prepended "/user/bin/elinks:VT" to the defaults for these two
variables.

So basically, this never worked out of the box with the default mailcap
+ debian alternatives.. etc. on the "etch" system either, and since I
couldn't spare the time (then as now) to figure out what the problem
really was and how to fix it cleanly, I took some drastic measures to
get things to work.

Nothing wrong with that since this is an area where I certainly do not
need any kind of flexibility.  

What was not quite right with my approach was that "brutally" editing
the code rather than look at some means of keeping track of this
"customization" - via a patch or debian equivalent - was bound to get me
bit sooner of later.. :-)

I copied over my doctored version of the urlview script and everything
now works as desired.

I guess this time I will document it in my "etch → lenny" upgrade notes
and leave it at that.

Thanks,

CJ



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: gnu/screen + mutt - mailcap creates a new terminal instance

2009-06-21 Thread Bob Proulx
Chris Jones wrote:
> Since obviously I run mutt in a terminal, a gnu/screen window actually,
> urlview would correctly launch the ELinks browser in the same terminal.
> 
> Now on "lenny" although as far as I know I am using the same .muttrc and
> the same /etc/mailcap that I copied over from the "etch" system, what
> happens is that urlview creates a new xterm where it then launches an
> ELinks session.
> 
> Would anyone know what particular setting would cause this behavior?

At a guess?  Install 'debianutils' and see if that works.

  sudo apt-get install debianutils

To debug this run:

  bash -x /etc/urlview/url_handler.sh http://www.debian.org/ 
2>/tmp/url_handler.out

Then look at the shell trace.  The script starts out looking for
/usr/bin/sensible-browser and if found launches it in the same
window.  But if not found it will try to launch other browsers in a
terminal (started with x-terminal-emulator) if possible.  This might
not be the problem but if you don't have debianutils installed then
/usr/bin/sensible-browser won't be found and it will fall back.  In
any case looking at the debug of that script should tell the story of
what it is doing.

Bob


signature.asc
Description: Digital signature


Re: Fwd: Re: gnu/screen + mutt - mailcap creates a new terminal instance

2009-06-13 Thread Chris Jones
On Sat, Jun 13, 2009 at 01:10:13PM EDT, Chris Jones wrote:
> - Forwarded message from Tony Baldwin  -
> 
> Date: Sat, 13 Jun 2009 13:51:15 -0400
> From: Tony Baldwin 
> To: Chris Jones 
> Subject: Re: gnu/screen + mutt - mailcap creates a new terminal instance
> 
> Chris Jones wrote:
> > When I needed to view an url embedded in an e-mail, I would hit CTRL-B
> > which my .muttrc causes the selected url to be piped to the "urlview"
> > uitility.
> >
> > Since obviously I run mutt in a terminal, a gnu/screen window actually,
> > urlview would correctly launch the ELinks browser in the same terminal.
> 
> Could I see that portion of your muttrc?  I've been copying/pasting the
> urls to a browser window, but opening in elinks with a keybinding would
> be convenient.  Especially if I could do it in another tab of the
> terminal (using roxterm).  if i click on them, they open in Epiphany,
> and I can't, for the life of me, figure out why, when iceweasel is set
> as my default browser.
> 
> sorry, I'm not helping much, am I?  But, I'm curious how to get that
> going with elinks.  I'm kind of new at using mutt.
> 
> thanks
> tony

Couldn't see any good reason why you replied to me instead of the list
so I forwarded it back lo debian-user.  Hope this isn't a breach of
netiquette.

I have this in my ~/.muttrc:

#--
# urlview - invoke w/ Ctrl-B
#--
macro index \cb |urlview\n
macro pager \cb |urlview\n

As far as I can remember it was part of the muttrc I used as a template,
so you may already have it.

On recent debian systems, you can also use urlscan that has a few
enhancements and a prettier interface.

As having urlview open the url in a new tab of a tabbed terminal
environment, I don't know how it can be done.. I've done that with the
"raggle" RSS aggregator under gnu/screen, so it should be feasible.

CJ



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Fwd: Re: gnu/screen + mutt - mailcap creates a new terminal instance

2009-06-13 Thread Chris Jones
- Forwarded message from Tony Baldwin  -

Date: Sat, 13 Jun 2009 13:51:15 -0400
From: Tony Baldwin 
To: Chris Jones 
Subject: Re: gnu/screen + mutt - mailcap creates a new terminal instance

Chris Jones wrote:
> When I needed to view an url embedded in an e-mail, I would hit CTRL-B
> which my .muttrc causes the selected url to be piped to the "urlview"
> uitility.
>
> Since obviously I run mutt in a terminal, a gnu/screen window actually,
> urlview would correctly launch the ELinks browser in the same terminal.

Could I see that portion of your muttrc?  I've been copying/pasting the
urls to a browser window, but opening in elinks with a keybinding would
be convenient.  Especially if I could do it in another tab of the
terminal (using roxterm).  if i click on them, they open in Epiphany,
and I can't, for the life of me, figure out why, when iceweasel is set
as my default browser.

sorry, I'm not helping much, am I?  But, I'm curious how to get that
going with elinks.  I'm kind of new at using mutt.

thanks
tony

-- 
http://www.baldwinsoftware.com
free/open source software
tcl yer os with a feather...

- End forwarded message -


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



gnu/screen + mutt - mailcap creates a new terminal instance

2009-06-13 Thread Chris Jones
This worked fine in "etch": 

When I needed to view an url embedded in an e-mail, I would hit CTRL-B
which my .muttrc causes the selected url to be piped to the "urlview"
uitility.

Since obviously I run mutt in a terminal, a gnu/screen window actually,
urlview would correctly launch the ELinks browser in the same terminal.

Now on "lenny" although as far as I know I am using the same .muttrc and
the same /etc/mailcap that I copied over from the "etch" system, what
happens is that urlview creates a new xterm where it then launches an
ELinks session.

Would anyone know what particular setting would cause this behavior?

Thanks,

CJ


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org