You are not logged in.

#1 2011-06-15 19:27:39

archtom
Member
Registered: 2011-05-04
Posts: 58

xdg-open for irc links in chromium

Hey!

I know that the first thing to do is search before bothering other people wink and I did it a lot. Google, posts, how-to`s, wikis... I see my last chance in asking this community wink
So here is my problem:

I use chromium as default browser and konversation for irc on lxde desktop. chromium uses xdg-open to associate files and links with programs. I tried everything I found but couldn`t get it to work. When I click on an IRC link, it asks me for opening the associated program, I confirm with yes and nothing happens. When trying to open an irc link from the terminal I get

xdg-open: no method available for opening 'irc://...'

I got it to work with mimeo, so please no suggestions in this direction, I would like to learn how to do it without it and so to learn it distribution independently.

For anyone looking for it, this is the working mimeo solution

$ yaourt -Sy mimeo xdg-utils-mimeo mime-type
$ nano /home/tom/.config/mimeo.conf
/usr/bin/konversation
  ^irc://
# there have to be exactly two spaces in front of ^irc://

This is the working solution in gnome using gconf:

$ gconftool-2 --set --type=string /desktop/gnome/url-handlers/irc/command 'konversation "%s"
$ gconftool-2 --set --type=bool /desktop/gnome/url-handlers/irc/enabled true
$ gconftool-2 --set --type=bool /desktop/gnome/url-handlers/irc/need-terminal false

This is what I tried in lxde:

$ yaourt -Sy mime-type xdg-utils

$ xdg-mime default konversation.desktop application/irc
$ xdg-mime default konversation.desktop x-scheme-handler/irc
$ xdg-mime default konversation.desktop application/x-xdg-protocol-irc

$ nano /usr/share/applications/kde4/konversation.desktop
MimeType=application/irc;x-scheme-handler/irc;x-xdg-protocol-irc

$ nano /usr/share/mime/packages/irc.xml
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/irc">
<comment>irc url</comment>
<magic priority="50">
<match value="%irc://-" type="string" offset="0"/>
</magic>
<alias type="application/irc"/>
</mime-type>
</mime-info>

$ update-mime-database /usr/share/mime/

I appreciate every suggestion. I`ll be on the road for two days and will try your suggestions on the weekend and will give feedback.
Please explain as understandable as possible, at best with all commands and paths to the files - this is the newbie corner, right? wink

Thanks in advance

Tom

Last edited by archtom (2011-06-15 19:44:57)

Offline

#2 2011-06-17 14:21:52

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: xdg-open for irc links in chromium

really noone? Would be so glad if anyone could help!

Last edited by archtom (2011-06-20 20:21:06)

Offline

Board footer

Powered by FluxBB