[arch-general] associations for chromium
Hi folks, I wonder if somebody could already figure out how to handle file and protocol associations for Chromium. For those who use a DE like KDE/Gnome most probably everything works out of box. There is an article in wiki how to use chromium with no DE [1]. It suggest to use mimeo and xdg-utils-mimeo, but it simply does not work (at least in my case). For those who are interested to read further the details are below. When I click a link pointing to mms:// stream chromium pops up a message that it's going to use xdg-open to handle it. The xdg-utils-mimeo allows to associate a protocol with an application, which I already has done - set to mplayer. Instead it tries to open smplayer with no (or bad) link passed. I've uninstalled smplayer and it tried to use realplayer, I've uninstalled realplayer and now it uses vlc. I couldn't find where that sequence is hardcoded. But now I see that the link itself is getting transformed in something weird: ----------------------------8<---------------------------- File reading failed: VLC could not open the file "/etc/X11/mms:/76.191.112.53/streams_e/stb1_s_8b700762e4ba88f62c33ce2291e1baaa.wmv". Your input can't be opened: VLC is unable to open the MRL 'file:///etc/X11/mms%3A/76.191.112.53/streams_e/stb1_s_8b700762e4ba88f62c33ce2291e1baaa.wmv'. ----------------------------8<---------------------------- The strange path "/etc/X11" comes is the directory I've accidentally started X from... Any ideas? TIA Sergey [1] https://wiki.archlinux.org/index.php/Chromium
On Sun, Nov 28, 2010 at 8:26 PM, Sergey Manucharian <ingeniware@gmail.com>wrote:
Hi folks,
I wonder if somebody could already figure out how to handle file and protocol associations for Chromium. For those who use a DE like KDE/Gnome most probably everything works out of box. There is an article in wiki how to use chromium with no DE [1]. It suggest to use mimeo and xdg-utils-mimeo, but it simply does not work (at least in my case).
For those who are interested to read further the details are below.
When I click a link pointing to mms:// stream chromium pops up a message that it's going to use xdg-open to handle it. The xdg-utils-mimeo allows to associate a protocol with an application, which I already has done - set to mplayer. Instead it tries to open smplayer with no (or bad) link passed. I've uninstalled smplayer and it tried to use realplayer, I've uninstalled realplayer and now it uses vlc. I couldn't find where that sequence is hardcoded. But now I see that the link itself is getting transformed in something weird:
----------------------------8<---------------------------- File reading failed: VLC could not open the file "/etc/X11/mms:/ 76.191.112.53/streams_e/stb1_s_8b700762e4ba88f62c33ce2291e1baaa.wmv". Your input can't be opened: VLC is unable to open the MRL 'file:///etc/X11/mms%3A/ 76.191.112.53/streams_e/stb1_s_8b700762e4ba88f62c33ce2291e1baaa.wmv'. ----------------------------8<----------------------------
The strange path "/etc/X11" comes is the directory I've accidentally started X from...
Any ideas?
TIA
Sergey
I too am interested in seeing a better solution for this. I frequent torrent sites that feature magnet links. Chromium doesn't seem to know what a magnet link is for... so I'll keep watching this for updates then.
Le 29/11/2010 03:26, Sergey Manucharian a écrit :
I wonder if somebody could already figure out how to handle file and protocol associations for Chromium. For those who use a DE like KDE/Gnome most probably everything works out of box. There is an article in wiki how to use chromium with no DE [1]. It suggest to use mimeo and xdg-utils-mimeo, but it simply does not work (at least in my case).
It works for me with mimeo and xdg-utils-mimeo (I'm using Chromium with Awesome WM -- no DE). You have to use ~/.config/mimeo.conf to store your associations, and to use at least mimeo 2010.11.02 (first version that integrates my patch to use this file by default). Here is my mimeo.conf: -----------------8<----------------- # Spotify URLs /usr/local/bin/spotify %U ^http://open.spotify.com/ ^spotify: # Regular URLs /usr/bin/chromium ^http:// ^https:// ^ftp:// # E-mails /usr/bin/thunderbird -compose ^mailto: -----------------8<----------------- This is enough to have working Spotify URLs. I guess that for VLC and MMS streams, you would just need the following: -----------------8<----------------- /usr/bin/vlc ^mms: -----------------8<----------------- To test mimeo, you should first try by running directly "mimeo mms://my-url" in a shell, then "xdg-open mms://my-url", and finally from Chromium. Does such a setup work for you? If it doesn't, could you please post your mimeo.conf here? Regards, -- Thomas/Schnouki
On Mon, Nov 29, 2010 at 09:10:21AM +0100, Thomas Jost wrote:
Le 29/11/2010 03:26, Sergey Manucharian a écrit :
I wonder if somebody could already figure out how to handle file and protocol associations for Chromium. For those who use a DE like KDE/Gnome most probably everything works out of box. There is an article in wiki how to use chromium with no DE [1]. It suggest to use mimeo and xdg-utils-mimeo, but it simply does not work (at least in my case).
It works for me with mimeo and xdg-utils-mimeo (I'm using Chromium with Awesome WM -- no DE). You have to use ~/.config/mimeo.conf to store your associations, and to use at least mimeo 2010.11.02 (first version that integrates my patch to use this file by default).
Here is my mimeo.conf:
-----------------8<----------------- # Spotify URLs /usr/local/bin/spotify %U ^http://open.spotify.com/ ^spotify:
# Regular URLs /usr/bin/chromium ^http:// ^https:// ^ftp://
# E-mails /usr/bin/thunderbird -compose ^mailto: -----------------8<-----------------
This is enough to have working Spotify URLs. I guess that for VLC and MMS streams, you would just need the following:
-----------------8<----------------- /usr/bin/vlc ^mms: -----------------8<-----------------
To test mimeo, you should first try by running directly "mimeo mms://my-url" in a shell, then "xdg-open mms://my-url", and finally from Chromium.
Does such a setup work for you? If it doesn't, could you please post your mimeo.conf here?
Regards,
-- Thomas/Schnouki
Can one also use this method to open downloaded files? E.g. I download a .torrent file, click to open it in the download tab and voila, there's rtorrent/transmission/.. loading the file? (Same with mp3, avi, pdf, ..) Regards, Adrian
Le 29/11/2010 14:11, howitzer@archlinux.us a écrit :
On Mon, Nov 29, 2010 at 09:10:21AM +0100, Thomas Jost wrote:
Le 29/11/2010 03:26, Sergey Manucharian a écrit :
I wonder if somebody could already figure out how to handle file and protocol associations for Chromium. For those who use a DE like KDE/Gnome most probably everything works out of box. There is an article in wiki how to use chromium with no DE [1]. It suggest to use mimeo and xdg-utils-mimeo, but it simply does not work (at least in my case).
It works for me with mimeo and xdg-utils-mimeo (I'm using Chromium with Awesome WM -- no DE). You have to use ~/.config/mimeo.conf to store your associations, and to use at least mimeo 2010.11.02 (first version that integrates my patch to use this file by default).
Here is my mimeo.conf:
-----------------8<----------------- # Spotify URLs /usr/local/bin/spotify %U ^http://open.spotify.com/ ^spotify:
# Regular URLs /usr/bin/chromium ^http:// ^https:// ^ftp://
# E-mails /usr/bin/thunderbird -compose ^mailto: -----------------8<-----------------
This is enough to have working Spotify URLs. I guess that for VLC and MMS streams, you would just need the following:
-----------------8<----------------- /usr/bin/vlc ^mms: -----------------8<-----------------
To test mimeo, you should first try by running directly "mimeo mms://my-url" in a shell, then "xdg-open mms://my-url", and finally from Chromium.
Does such a setup work for you? If it doesn't, could you please post your mimeo.conf here?
Regards,
-- Thomas/Schnouki
Can one also use this method to open downloaded files? E.g. I download a .torrent file, click to open it in the download tab and voila, there's rtorrent/transmission/.. loading the file? (Same with mp3, avi, pdf, ..)
Regards, Adrian
Sure, you can associate any program with any regexp :) For a torrent file, it would probably be something like this: /usr/bin/transmission-gtk \.torrent% (The downside is that if does not work with file managers that don't rely on xdg-open...) Regards, -- Thomas/Schnouki
Hi Thomas, Excerpts from Thomas Jost's message of Mon, 29 Nov 2010 09:10 +0100:
Le 29/11/2010 03:26, Sergey Manucharian a écrit :
I wonder if somebody could already figure out how to handle file and protocol associations for Chromium. For those who use a DE like KDE/Gnome most probably everything works out of box. There is an article in wiki how to use chromium with no DE [1]. It suggest to use mimeo and xdg-utils-mimeo, but it simply does not work (at least in my case).
It works for me with mimeo and xdg-utils-mimeo (I'm using Chromium with Awesome WM -- no DE). You have to use ~/.config/mimeo.conf to store your associations, and to use at least mimeo 2010.11.02 (first version that integrates my patch to use this file by default).
Here is my mimeo.conf:
-----------------8<----------------- # Spotify URLs /usr/local/bin/spotify %U ^http://open.spotify.com/ ^spotify:
# Regular URLs /usr/bin/chromium ^http:// ^https:// ^ftp://
# E-mails /usr/bin/thunderbird -compose ^mailto: -----------------8<-----------------
This is enough to have working Spotify URLs. I guess that for VLC and MMS streams, you would just need the following:
-----------------8<----------------- /usr/bin/vlc ^mms: -----------------8<-----------------
To test mimeo, you should first try by running directly "mimeo mms://my-url" in a shell, then "xdg-open mms://my-url", and finally from Chromium.
Does such a setup work for you? If it doesn't, could you please post your mimeo.conf here?
Thank you for the information! I trusted the wiki page and haven't looked into the mimeo code: wiki states the conf file is "~/.mime.types"- and, of course, it didn't work for me. Now everything is ok. Also I have fixed the wiki page for Chromium. Another question - why Chromium depends on gconf? IMHO that dependency could be optional. Thanks again, Sergey
participants (4)
-
howitzer@archlinux.us
-
Jeffrey Lynn Parke Jr.
-
Sergey Manucharian
-
Thomas Jost