PDA

View Full Version : Linux - Chromium - xchat2 urlhandlers



Myth
03-12-2010, 09:59 AM
Just been playing round with Chromium (open source version of Chrome).
Will take some getting used to after Firefox, but should be ok.

After much googling, I didn't manage to find an answer to "how do I open an xchat link in Chrome"? Gnome handles this easily because Chromium will set as default. But if you are like me and use KDE/Fluxbox/etc then this is not the case

So in true kiwi style, I had a play...

To do this:
1, go to ~/.xchat2
2, open urlhandlers.conf
3, add following:

NAME Open Link in Chromium
CMD !chromium -remote '%s'
4, Save

Restart xchat, then whenever you want to open the link - right click.. and "Open Link in Chromium" should be there waiting for you :)

Also... for Opera and Firefox:

Opera:

NAME Open Link in Opera
CMD !opera -remote 'openURL(%s)'

Firefox:

NAME Open Link in Firefox
CMD !firefox -a firefox -remote 'openURL(%s,new-tab)'

Hope this helps someone :)

Erayd
03-12-2010, 04:25 PM
Gnome handles this easily because Chromium will set as default. But if you are like me and use KDE/Fluxbox/etc then this is not the caseI assume you realise that it's possible to change the default browser in KDE as well?

Myth
03-12-2010, 05:24 PM
I assume you realise that it's possible to change the default browser in KDE as well?In K-Control? Yeah, for some reason it didn't work

Brooko
04-12-2010, 12:10 AM
Try - in a konsole - as root:

update-alternatives --config x-www-browser

If Chromium doesn't appear as an option, you will have to add it:

update-alternatives --install /usr/bin/x-www-browser x-www-browser /directory/application 50

For above, the directory and application may be /usr/bin/chromium (I don't know - I just use chrome for linux). The number 50 is 50th on the list - so unlikely to be in use.

Then rerun:

update-alternatives --config x-www-browser
and Chromium will list as an option.

Seems to help system wide for setting default in KDE. YMMV.

Myth
04-12-2010, 05:59 AM
as root:

# update-alternatives --config x-www-browser
-su: update-alternatives: command not found
this is on Gentoo

Erayd
04-12-2010, 08:15 AM
In K-Control? Yeah, for some reason it didn't workGotta ask here - why on earth are you still using a KDE that old, on Gentoo? KDE3.x is ancient (or if you're not, I assume you realise that KControl is deprecated and no longer used)!

Myth
04-12-2010, 08:50 AM
In my fluxbox menu I have it as K-control. It is in fact 'systemsettings'
I am using KDE 4.4.x