[NTLUG:Discuss] Sending url in terminal window to firefox

Patrick R. Michaud pmichaud at pobox.com
Tue Jan 24 20:42:15 CST 2006


On Tue, Jan 24, 2006 at 07:11:08PM -0600, Chris Cox wrote:
> Patrick R. Michaud wrote:
> >In my previous environment, my ssh terminal would automatically 
> >detectany url-looking items in the window, and clicking on the url 
> >would automatically open it in a new browser window.
> > [...]
> > So, Klipper doesn't seem to work well for me.  Anyone have any other
> > ideas for a good terminal program to use besides Konsole?  (I know
> > about xterm already, and it's probably not what I'd like to use.)
> 
> Uh... I guess I'm stuck wondering why.  Are you looking for some
> kind of client built in clipboarding to fire off your firefox
> action??  Just curious.

Technically, the "clipboard" itself is totally ancillary to what 
I'm trying to do.  All I want to do is to be able to highlight a
url in my terminal window and automatically launch firefox to
open a new tab at that url.

The shell command for this is simple, it's just "/usr/bin/firefox <url>".
The hard part seems to be to get something to issue the command in
response to a mouse click.

Background: I spend the vast majority of my time in terminal 
windows, either reading mail (mutt running on a remote system), 
reading documentation, writing code, or communicating over IRC.  
Often the terminal display will contain a url that I'm supposed
to launch in order to find out more information about something.

My previous terminal program (ssh for Windows from SSH Communications 
Security) would automatically detect when the mouse was over anything
that looked like a url, and highlight the entire url.  Clicking on the 
highlighted url then issued the command to a browser to open that url 
(in Firefox this resulted in a new tab).  

I just want to be able to do the same sort of thing in my Linux
desktop; I got very used to this (very convenient and efficient)
capability, and I cringe everytime I have to go through the
highlight-copy-refocus-paste-go sequence.

In short, if there's something that looks like a url on my screen,
I ought to be able to click or double-click on the url to have it
display in my browser.  That's pretty much the standard model these
days, whether it's in a browser, a graphical email client, IRC, or
whatever.  Terminal windows ought to be able to do the same.

Pm




More information about the Discuss mailing list