Export to GitHub

gnome-menu-file-browser-applet - issue #81

Cannot open .m3u playlist files


Posted on May 6, 2010 by Happy Cat

What steps will reproduce the problem? 1. Via the applet select a folder that has a m3u playlist. 2. Left-click that playlist file. 3. Experience that nothing happens.

What is the expected output? What do you see instead? The file should be opened/executed by the application that m3u files are system-wide associated with (totem by default, I guess). Instead nothing happens.

What version of the product are you using? On what operating system? Version 0.6.6 on Ubuntu 10.04

Comment #1

Posted on May 6, 2010 by Happy Wombat

Hmmm. I've never tried this before until now and I get exactly the right behaviour: the playlist is opened in totem.

Are you able to try the version from svn?

Comment #2

Posted on May 7, 2010 by Happy Cat

The applet is installed on two individual machines of mine, and the issue can be observed on both. I did install the package from the official ubuntu repo. Opening the playlist with the "click on mousewheel" option works as expected if configured like that. Only left-click fails. I tried to purge the package, but eventhough it is marked in synaptic as uninstalled now, the applet can still be found in the panel and works as before, so some files of the installation must have remained on my machine. How can I uninstall completely to try the svn version?

Comment #3

Posted on May 7, 2010 by Happy Cat

OK. After a fresh system boot, there was an error message because of the missing applet, and I deleted it from the panel. So it must have remained in some cache or alike, but now it is gone.

I tried installing the svn version by doing this:

sudo apt-get install subversion libgtkhotkey-dev libgtkhotkey1 cmake svn checkout http://gnome-menu-file-browser-applet.googlecode.com/svn/trunk/ gnome-menu-file-browser-applet-read-only cd gnome-menu-file-browser-applet-read-only/ mkdir build cd build cmake -D CMAKE_INSTALL_PREFIX=/usr ../

Then I got an error:

-- checking for modules 'gtk+-2.0>=2.14;gio-unix-2.0;libpanelapplet-2.0' -- package 'gtk+-2.0>=2.14' not found -- package 'gio-unix-2.0' not found -- package 'libpanelapplet-2.0' not found CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:259 (message): A required package was not found Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:311 (_pkg_check_modules_internal) src/CMakeLists.txt:3 (PKG_CHECK_MODULES)

-- checking for module 'gtkhotkey-1.0' -- package 'gtkhotkey-1.0' not found -- libgtkhotkey not found. Keyboard hotkey disabled.

-- Configuring incomplete, errors occurred!

A package gtk-2.0 cannot be fount in the ubuntu repos, but I have the following installed:

gir1.0-gtk-2.0 (2.20.0-0ubuntu4) libpanel-applet2-0 (1:2.30.0-0ubuntu1)

What can I do?

Comment #4

Posted on May 7, 2010 by Happy Cat

OK I found out myself. Now I also did this:

sudo apt-get install libgtk2.0-dev libpanel-applet2-dev checkinstall cmake -D CMAKE_INSTALL_PREFIX=/usr ../ make sudo checkinstall

I added this version of the applet to the panel, but unfortunately the issue remains. I guess it might not be a problem with the applet itself, but with some file association setting in my system. .m3u files are obviously mapped to totem as the default application, as is indicated in the "file properties/open with" panel in Nautilus.

Comment #5

Posted on May 7, 2010 by Happy Wombat

Thanks for trying all that! Too bad it didn't fix the problem :-(

Maybe the problem is with the .m3u file itself. Could you attach it to tis thread please so I can try it?

Thanks.

Comment #6

Posted on May 7, 2010 by Happy Cat

I tried many different files, but none successful. They are all like the one I attached to this comment:

Attachments

Comment #7

Posted on May 7, 2010 by Happy Wombat

Hmmm. It worked as expected for me. It may be the mime associations then. 2 things to try:

1) From the applet, try opening the playlist via a right-click -> "Open with" instead of left-click. What list of applications appear in the "open with" context menu? It should NOT be empty, and the first item on the list is the application that should open the file if you left-click on it.

2) Open the file from the command line using "gnome-open playlist.m3u". I should also launch the default app for that file type.

If ether (or likely both) of those fail, it's he mime association. You can fix that in nautilius via right-click -> properties -> Open with.

Let me know how it works out.

Comment #8

Posted on May 7, 2010 by Happy Cat

1) The list on "open with" shows Video player (Totem), Brasero, VLC media player, Rhythmbox, gedit and OpenOffice.org; Opening the playlist file this way works. 2) Opening with "gnome-open playlist.m3u" works also.

The mime association seems to be correct...

Comment #9

Posted on May 8, 2010 by Happy Cat

I also tried other file formats. Apart from .m3u files I had the issue also with svg image files, while they will be opened in Nautilus with Eye of Gnome.

Comment #10

Posted on May 8, 2010 by Happy Cat

Now in Nautilus I have changed the mime association of .m3u files to a variety of different applications, but even if I changed it to a plain text editor like gedit, the file could not be opened. So it's not an issue with totem but with the mime type. Strange that some types can be opened and some can't...

Comment #11

Posted on May 10, 2010 by Happy Wombat

OK, give me a little time and I'll send you a version of the applet that prints out some debug info so we can figure out WTH is going on.

Also, If you're subscribed to DropBox and are willing to share a folder, we might be ale to speed of the process that way.

a.

Comment #12

Posted on May 10, 2010 by Happy Cat

Actually I am not willing to install a closed source application that has access to my file system. Sorry, but you can send the applet per e-mail or send me a download link.

Comment #13

Posted on May 10, 2010 by Happy Wombat

It's not a closed source application. No problem if you're not comfortable with that though; we can still sort this bug out. I'll post a tarball with debug info here when its ready.

a.

Comment #14

Posted on May 11, 2010 by Happy Wombat

OK, lets try this. I've added a few print statements so we know that code that is being executed. Unpack it and build it as normal, but it's not necessary install it. After you've built it, kill the running version and run this one instead like so.

killall file-browser-applet $your-build-path/src/file-browser-applet reload it from the dialog that pops up.

You should see the printouts in the terminal. Run it on the problem file and post the output here.

Attachments

Comment #15

Posted on May 11, 2010 by Happy Cat

I followed your instructions and rebuilt the applet without any obvious errors. The files were successfully created. The file ~/file-browser-applet-0.6.6/build/src/file-browser-applet exists. I killed the original process and ran:

./file-browser-applet-0.6.6/build/src/file-browser-applet

The list of running processes of the system monitor applet in my panel indicates file-browser-applet to be running, but it is not added to the panel and there is no dialog pop up. I see the applet in the applet list when I select "right click on the panel > add to panel", but I guess this would only add the original version, so I didn't try. After executing the command in the terminal the blinking cursor just jumps to the very beginning of the next line without any output as if waiting for some user input. After 60 seconds or so the process just quits on it own and in the terminal I get the usual command prompt. Something must be missing.

Comment #16

Posted on May 11, 2010 by Happy Cat

OMG! I hope I didn't mess it all up now. I am not a compiling expert. Maybe it didn't work from the terminal, because I had used 'checkinstall', despite you not recommending the installation, so I tried to uninstall the applet with 'make uninstall':

-- Uninstalling "/usr/share/gconf/schemas/file-browser-applet.schemas" CMake Error at cmake_uninstall.cmake:15 (MESSAGE): Problem when removing "/usr/share/gconf/schemas/file-browser-applet.schemas"

make[3]: * [CMakeFiles/uninstall] Error 1 make[2]: [CMakeFiles/uninstall.dir/all] Error 2 make[1]: [CMakeFiles/uninstall.dir/rule] Error 2 make: * [uninstall] Error 2

Comment #17

Posted on May 12, 2010 by Happy Cat

So I did not uninstall but opened a terminal and started the script. I added the applet to the panel and tried to open a .m3u file. On the way I got some errors concerning special characters:

atarax@ubuntu61:~$ ./file-browser-applet-0.6.6/build/src/file-browser-applet (file-browser-applet:1960): GtkHotkey-DEBUG: Listener Type: GtkHotkeyX11Listener

(file-browser-applet:1960): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Fehler in Zeile 1: Entität endete nicht mit einem Semikolon; wahrscheinlich haben Sie ein &-Zeichen benutzt, ohne eine Entität beginnen zu wollen - umschreiben Sie das »&« als &

Anyway I continued to a valid destination:

Processing (null) Application specified: /home/atarax/Musik/01 Deutsch/1_Männer/Andreas Dorau/PLAYLIST.m3u

/home/atarax/Musik/01 Deutsch/1_Männer/Andreas Dorau/PLAYLIST.m3u: 3: Andreas: not found /home/atarax/Musik/01 Deutsch/1_Männer/Andreas Dorau/PLAYLIST.m3u: 5: Andreas: not found

I think there are some problems with special characters and unescaped blank spaces. So I moved a playlist file to my user root directory and tried to open it:

Processing (null) Application specified: /home/atarax/PLAYLIST.m3u

/home/atarax/PLAYLIST.m3u: 3: 01: not found /home/atarax/PLAYLIST.m3u: 5: 02: not found /home/atarax/PLAYLIST.m3u: 7: 03: not found /home/atarax/PLAYLIST.m3u: 9: 04: not found /home/atarax/PLAYLIST.m3u: 11: 05: not found /home/atarax/PLAYLIST.m3u: 13: 06: not found /home/atarax/PLAYLIST.m3u: 15: 07: not found /home/atarax/PLAYLIST.m3u: 17: 08: not found /home/atarax/PLAYLIST.m3u: 19: 09: not found /home/atarax/PLAYLIST.m3u: 21: 10: not found /home/atarax/PLAYLIST.m3u: 23: 11: not found /home/atarax/PLAYLIST.m3u: 25: 12: not found

Comment #18

Posted on May 12, 2010 by Happy Cat

I tried this also with a svg image file and got this:

Processing (null) Application specified: /home/atarax/sriyantra.svg

/home/atarax/sriyantra.svg: 1: cannot open ?xml: No such file /home/atarax/sriyantra.svg: 2: cannot open !DOCTYPE: No such file /home/atarax/sriyantra.svg: 2: svg: not found /home/atarax/sriyantra.svg: 3: cannot open svg: No such file /home/atarax/sriyantra.svg: 4: cannot open !--: No such file /home/atarax/sriyantra.svg: 4: Created: not found /home/atarax/sriyantra.svg: 5: cannot open !--: No such file /home/atarax/sriyantra.svg: 5: Date:: not found /home/atarax/sriyantra.svg: 6: cannot open style: No such file : No such fileriyantra.svg: 7: cannot open ![CDATA[ /home/atarax/sriyantra.svg: 8: path: not found /home/atarax/sriyantra.svg: 8: fill-rule:evenodd: not found /home/atarax/sriyantra.svg: 8: stroke:#000000: not found /home/atarax/sriyantra.svg: 8: stroke-width:1px: not found /home/atarax/sriyantra.svg: 8: stroke-linecap:round: not found /home/atarax/sriyantra.svg: 8: stroke-linejoin:round: not found /home/atarax/sriyantra.svg: 8: stroke-opacity:1: not found : not foundx/sriyantra.svg: 8: } /home/atarax/sriyantra.svg: 9: .bhupura0: not found /home/atarax/sriyantra.svg: 9: stroke:#772200: not found /home/atarax/sriyantra.svg: 9: fill:#993399: not found : not foundx/sriyantra.svg: 9: } /home/atarax/sriyantra.svg: 10: .bhupura1: not found /home/atarax/sriyantra.svg: 10: stroke:#772200: not found /home/atarax/sriyantra.svg: 10: fill:#cc33cc: not found : not foundx/sriyantra.svg: 10: } /home/atarax/sriyantra.svg: 11: Syntax error: newline unexpected (expecting ")")

Attachments

Comment #19

Posted on May 12, 2010 by Happy Cat

Now I replaced all blank spaces in file names with underscore and updated the playlist file. When I run the applet and try to open that playlist, I get this:

(file-browser-applet:1826): GtkHotkey-DEBUG: Listener Type: GtkHotkeyX11Listener Processing (null) Application specified: /home/atarax/test/PLAYLIST.m3u

: not foundx/test/PLAYLIST.m3u: 3: 01_Du_bist_nicht_wie_die_anderen.mp3 : not foundx/test/PLAYLIST.m3u: 5: 02_Kein_Liebeslied.mp3 : not foundx/test/PLAYLIST.m3u: 7: 03_Schwarze_Furchen.mp3 : not foundx/test/PLAYLIST.m3u: 9: 04_Im_September.mp3 : not foundx/test/PLAYLIST.m3u: 11: 05_40_Frauen.mp3 : not foundx/test/PLAYLIST.m3u: 13: 06_Wir_sind_keine_Freunde.mp3 : not foundx/test/PLAYLIST.m3u: 15: 07_Zwei_Hände_im_Sand.mp3 : not foundx/test/PLAYLIST.m3u: 17: 08_Heut_kommt_Er.mp3 : not foundx/test/PLAYLIST.m3u: 19: 09_Die_Klette.mp3 : not foundx/test/PLAYLIST.m3u: 21: 10_Hinterhaus.mp3 : not foundx/test/PLAYLIST.m3u: 23: 11_Du_gehst_fremd.mp3 : not foundx/test/PLAYLIST.m3u: 25: 12_Die_Besondere.mp3

To me it seems as if the applet even tries to find the files within the playlist, even though this should be the duty of the actual application associated with m3u files. Similar strange behaviour with svg images. Somehow plain text files are not being opened but read and the applet attempts to execute the content of the file (that's my guess).

Comment #20

Posted on May 12, 2010 by Happy Wombat

Hey,

Well those printouts helped a lot. I think I know what the problem is: I think those files have there executable bit set so the applet is trying to run the files (like a script) instead of launching the appropriate mime handler. This would not be limited to .m3u or .svg files.

Try running the following on the .m3u file.

chmod -x PLAYLIST.m3u

Then try opening it with the applet.

Comment #21

Posted on May 12, 2010 by Happy Cat

Bingo. But why does Nautilus correctly launch the associated application instead of 'executing' such files like the applet does?

Comment #22

Posted on May 12, 2010 by Happy Wombat

Probably because the nautilus devs are much cleverer than me, and look at other properties of the file to determine of they should be executed, whereas I just look at gio's "access::can-execute" attribute.

Maybe I should make vfs_file_is_executable more clever...

Comment #23

Posted on May 12, 2010 by Happy Cat

The root cause obviously was global bug #1. The problem occured, because I mounted an external hard drive with NTFS file system and tried to open files from this device with the applet. I forgot that NTFS does not support unix permissions, so I cannot change the file permissions of these files unless I format the whole device with another file system. Too bad.

Comment #24

Posted on May 12, 2010 by Happy Wombat

Hah! Too true!

Comment #25

Posted on May 12, 2010 by Happy Cat

OK. I guess that's it. Thank you very much for your assistance and good luck with your nice proggy...

Comment #26

Posted on May 14, 2010 by Happy Wombat

Thanks for your help debugging! I think I will have to rely on something more than just "access::can-execute" to determine is a file should be executed.

Comment #27

Posted on May 14, 2010 by Happy Cat

You're welcome! I'm heavily looking forward to the next release...

Comment #28

Posted on Aug 10, 2010 by Massive Bird

Actually I'm experiencing the same defect with .vnc files stored in a NTFS partitions. The best solution ATM seems to set xdg-open command for middle click and use the middle button to open such files.

Comment #29

Posted on Aug 11, 2010 by Happy Wombat

Yes, it will happen with any file with the executable bit set. A fix should be easy...

Comment #30

Posted on Jan 23, 2011 by Happy Wombat

Fix is in git. I'll close this bug when I make the next release.

Comment #31

Posted on Mar 13, 2011 by Happy Wombat

(No comment was entered for this change.)

Status: Done

Labels:
Type-Defect Priority-Medium