You are not logged in.

#1 2011-09-24 21:08:53

bjorntj
Member
Registered: 2011-05-10
Posts: 150

How can I make Chromium use VLC as the player when opening m3u files?

As the subject says, how can I make Chromium use VLC as the player when opening m3u files? No matter what I try, when I open the file Chromium opens Totem to play the stream. I have also tried to uninstall Totem but then Chromium doesn't open any program at all...


Regards,

BTJ


Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"

Offline

#2 2011-09-24 21:22:21

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How can I make Chromium use VLC as the player when opening m3u files?

Try https://wiki.archlinux.org/index.php/Ch … n_via_MIME

Last edited by karol (2011-09-24 21:23:29)

Offline

#3 2011-09-24 21:54:52

bjorntj
Member
Registered: 2011-05-10
Posts: 150

Re: How can I make Chromium use VLC as the player when opening m3u files?

Thx but not sure how to make that work... The files I download are called stream.m3u and when I run xdg-mime query filetype stream.m3u I get the following:

text/plain; charset=us-ascii

I have also created a file called mime.xml, as suggested in the link, and tried to connect m3u to video/mpeg but I still get the same result when running the xdg-mime command. And changing the default handler for text/plain to vlc "might" break something... smile


BTJ

Last edited by bjorntj (2011-09-24 21:55:43)


Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"

Offline

#4 2011-09-24 22:00:43

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How can I make Chromium use VLC as the player when opening m3u files?

I think you should do something like

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/x-ms-dos-executable">
         <comment xml:lang="en">Windows Executable</comment>
         <glob pattern="*.exe"/>
  </mime-type>
</mime-info>

but for *.m3u pattern. Those files are text/plain, don't change it to video/mpeg.

Offline

#5 2011-09-24 22:05:30

bjorntj
Member
Registered: 2011-05-10
Posts: 150

Re: How can I make Chromium use VLC as the player when opening m3u files?

My mime.xml looks like this...:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="video/mpeg">
         <comment xml:lang="en">Video MPEG</comment>
         <glob pattern="*.m3u"/>
  </mime-type>
</mime-info>

Should mime-type type still be an msdos executable?


BTJ


Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"

Offline

#6 2011-09-24 22:10:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How can I make Chromium use VLC as the player when opening m3u files?

bjorntj wrote:

My mime.xml looks like this...:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="video/mpeg">
         <comment xml:lang="en">Video MPEG</comment>
         <glob pattern="*.m3u"/>
  </mime-type>
</mime-info>

Should mime-type type still be an msdos executable?


BTJ

m3u file is *not* video/mpeg, it's just a multimedia playlist http://en.wikipedia.org/wiki/M3U

No, it's not an msdos executable either :-)

Last edited by karol (2011-09-24 22:11:01)

Offline

#7 2011-09-25 10:53:14

bjorntj
Member
Registered: 2011-05-10
Posts: 150

Re: How can I make Chromium use VLC as the player when opening m3u files?

Hmmm... Still not sure how to make this work so I found a different solution... I added the following in /usr/bin/xdg-open:

if echo "$1" | grep "m3u"; then
    /usr/bin/vlc "$1"
    exit
fi

inside open_xfce() and before exo-open "$1"


Guess this is kinda ugly workaround but it works... smile


BTJ

Last edited by bjorntj (2011-09-25 10:58:16)


Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"

Offline

Board footer

Powered by FluxBB