You are not logged in.

#1 2009-10-01 23:09:03

tsv
Member
From: UK
Registered: 2008-12-03
Posts: 71
Website

Click URIs in xterm

Hey,

I use xterm a *lot*. I know there are a million other terminal emulators out there with more bells and whistles, but I'm perfectly happy with the default, and like the convenience of dropping in an .Xdefaults wherever there is X11 and having a nicely set up terminal.

One thing I want, and don't have, is the ability to click on URLs and have them open in a browser. Is this at all possible? The best I can do at the moment is to set up a regex to highlight the URL properly when I click a certain number of times on it.

Googling's got me nowhere so far, help appreciated!

Offline

#2 2009-10-01 23:11:16

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: Click URIs in xterm

I know you said you love xterm and all, but as an urxvt evangelist, I just want to point out how easy is to solve this in urxvt. An excerpt of my .Xdefaults:

!--[extension]--!
URxvt*perl-ext-common: default,selection,matcher
URxvt*urlLauncher: /usr/bin/firefox
URxvt*matcher.button: 1


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#3 2009-10-01 23:17:47

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Click URIs in xterm

yeah, i think this not possible in xterm, as mentioned it's easy in urxvt and you keep your "drop in an .Xdefaults and..." abilities.

Offline

#4 2009-10-02 01:37:40

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Click URIs in xterm

I've searched through tons of pages trying to see if this is possible and I've never found a solution. This is the only thing keeping me using urxvt over xterm.

Offline

#5 2009-10-02 06:45:30

Lich
Member
Registered: 2009-09-13
Posts: 437

Re: Click URIs in xterm

skottish wrote:

I've searched through tons of pages trying to see if this is possible and I've never found a solution. This is the only thing keeping me using urxvt over xterm.

What about transparency and unicode (I know of uxterm but from what I remember the last time I've used it it does a really poor job.)


Archlinux | ratpoison + evilwm | urxvtc | tmux

Offline

#6 2009-10-02 08:15:04

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Click URIs in xterm

xterm works perfectly with unicode.
And the way it is compiled in Arch, there is no need to even use uxterm (which is just a basic wrapper setting some env variables anyway).

I also use the config/regex to be able to select URL, this is a must-have indeed.
And then , it's really not so hard. There are 4 steps but they can be done very quickly !
double click on url, alt tab to firefox, ctrl+t new tab, middleclick.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#7 2009-10-02 08:32:33

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Click URIs in xterm

shining wrote:

xterm works perfectly with unicode.
And the way it is compiled in Arch, there is no need to even use uxterm (which is just a basic wrapper setting some env variables anyway).

I also use the config/regex to be able to select URL, this is a must-have indeed.
And then , it's really not so hard. There are 4 steps but they can be done very quickly !
double click on url, alt tab to firefox, ctrl+t new tab, middleclick.

Or 3 steps if you use vimperator: double click on url, alt tab to firefox, hit P wink


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#8 2009-10-02 08:35:05

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Click URIs in xterm

moljac024 wrote:

Or 3 steps if you use vimperator: double click on url, alt tab to firefox, hit P wink

Ah yeah indeed, vimperator was quite cool, I used P all the time ! smile


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#9 2009-10-02 11:03:01

tsv
Member
From: UK
Registered: 2008-12-03
Posts: 71
Website

Re: Click URIs in xterm

Cheers guys, I think I will stick with the regex approach. Need to check if Conkeror has a go-to-clipboard shortcut, and write one if not!

Offline

#10 2009-10-02 11:46:15

tsv
Member
From: UK
Registered: 2008-12-03
Posts: 71
Website

Re: Click URIs in xterm

shining wrote:

I also use the config/regex to be able to select URL, this is a must-have indeed.

What regex do you use? I thought I had mine working, but... no sad

Offline

#11 2009-10-02 12:36:49

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Click URIs in xterm

tsv wrote:
shining wrote:

I also use the config/regex to be able to select URL, this is a must-have indeed.

What regex do you use? I thought I had mine working, but... no sad

I had one for a long time that I found in an article somewhere, or from another user config.

Recently I realized the xterm package itself actually provided one.
See pacman -Ql xterm
grep -r charClass /usr/share/app/X11/app-defaults/

Note that it is disabled by default.

Also if you are curious how this option works / what it does, xterm has a complete section CHARACTER CLASSES.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#12 2009-10-02 19:56:45

tsv
Member
From: UK
Registered: 2008-12-03
Posts: 71
Website

Re: Click URIs in xterm

Cheers shining, that's a great help. That file makes interesting reading actually...

Offline

#13 2009-10-03 00:41:38

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Click URIs in xterm

Lich wrote:
skottish wrote:

I've searched through tons of pages trying to see if this is possible and I've never found a solution. This is the only thing keeping me using urxvt over xterm.

What about transparency and unicode (I know of uxterm but from what I remember the last time I've used it it does a really poor job.)

As shining pointed out, unicode works as well as in urxvt. I don't bother with transparency or any other desktop effects.

Offline

#14 2015-07-30 19:36:15

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: Click URIs in xterm

I guess posting to this thread is not necrobumping since the information seems to be still relevant.

Is it still impossible to open URLs from XTerm? I came across this page: http://lukas.zapletalovi.com/2013/07/hi … xterm.html, where the following settings in the .Xresource described as enabling the URL opening, but I hasn't managed to get it worked with FireFox (having replaced 'google-chrome' with 'firefox'):

*VT100*translations: #override Shift <Btn1Up>: exec-formatted("google-chrome '%t'", PRIMARY)

bing different

Offline

#15 2015-07-30 19:50:49

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

Re: Click URIs in xterm

nbd wrote:

I guess posting to this thread is not necrobumping since the information seems to be still relevant.

It is still necrobumping, but posting a solution and bringing closure to a thread is acceptable.

Your findings would still be better documented on the wiki though.

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

Board footer

Powered by FluxBB