Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 210350

Summary: media-video/mplayer-1.0_rc2_p24929-r1 can't open files with space in filename from nautilus
Product: Gentoo Linux Reporter: Fabio Bonfante <bfx81>
Component: New packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED WONTFIX    
Severity: trivial CC: bugzilla, gumanzoy, jakub, jiri, moloh, onedown6, pacho
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Fabio Bonfante 2008-02-16 11:46:17 UTC
Opening file from nautilus with a space in the filename or in the path results in a message error from mplayer.
Probably an upstream problem (founded in ubuntu too - http://ubuntuforums.org/showthread.php?t=620200).

Solved this replacing 'Exec=gmplayer %U' to 'Exec=gmplayer %F' in the mplayer.desktop file (and restarting nautilus)
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-02-16 11:58:24 UTC
The fix is obviously incorrect...

http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
Comment 2 Fabio Bonfante 2008-02-16 12:14:39 UTC
well... not exactly
Passing more files to mplayer fill the playlist, so the "upper case" is right, anyway probably the real problem form mplayer is in parsing URL string (not happened some times ago).

As temporary workaround i tested now that using %F works nicely
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2008-02-16 12:26:56 UTC
mplayer needs %U obviously for streams; %F is no solution here.
Comment 4 Fabio Bonfante 2008-02-16 13:20:33 UTC
i agree that mplayer need %U for streams, but what others applications use the command line specified in mplayer.desktop for launch streams video? (really i don't know, it's not ironic)

Starting from my ignorance (i know it's not a good starting point...) i believe it's a more common usage launch mplayer passing a local file param (hoping that stream-oriented application can start mplayer with the full URI)


Comment 5 Jeffrey Gardner (RETIRED) gentoo-dev 2008-02-24 18:40:31 UTC
Exec=gmplayer %F is the only solution I've seen that will fix this annoying issue that probably inconveniences the majority of our users. beandog agreed and gave me the go-ahead to fix it... if anyone can find a solution that works globally, now is the time to speak up! :)
Comment 6 Fabio Bonfante 2008-02-24 20:08:42 UTC
no others solutions, but if someone can find if this is a mplayer regression in parsing uri (maybe this issue is appeared quite changing the exec param...) i think it will be a good starting point (to send obviously upstream if not already known)
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2008-02-25 14:14:22 UTC
Was wondering what other distributions do.. or is their mplayer too old..
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2008-02-25 14:16:23 UTC
Reassigning to media-video, this is not a Gnome or Nautilus issue, breaks also Thunar and I'm suprised if not others..
Comment 9 Jiří Vyskočil 2008-02-25 22:21:31 UTC
(In reply to comment #7)
> Was wondering what other distributions do.. or is their mplayer too old..

Ubuntu 8.04 alpha has the same bug as of today.
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2008-02-28 21:06:47 UTC
(In reply to comment #5)
> Exec=gmplayer %F is the only solution I've seen that will fix this annoying
> issue that probably inconveniences the majority of our users. beandog agreed
> and gave me the go-ahead to fix it... if anyone can find a solution that works
> globally, now is the time to speak up! :)

Well, seriously crippling streaming functionality because someone uses stupid filenames is no solution and pretty much a regression.

Comment 11 Michal Kurgan (RETIRED) gentoo-dev 2008-02-29 01:36:28 UTC
(In reply to comment #10)
> 
> Well, seriously crippling streaming functionality because someone uses stupid
> filenames is no solution and pretty much a regression.
> 

I didn't know that space indicate stupid file name.
You also forgot that mplayer used to work with that kind of names, so regression is present now too.
Comment 12 Niko 2008-05-08 08:22:42 UTC
i have the same problem with Thunar and mplayer (latest stable version)
when i do right click on a media file and press Open With Mplayer i get the error, but when i drag n drop a file (from thunar) there is no error.

the solution that i see here is somebody to write a patch, that parse special charecters like spaces and - and other... this patch must be accepted form the Mplayer project manager.

you know that if you want to open a file from a command line you have to write:
mplayer File\ name.mp3   
(\ before space). the parser must do this.

or there is a parser but there is an error and someone have to fix it...

well, i never worked with large source codes so i cant do this...
Comment 13 Ben de Groot (RETIRED) gentoo-dev 2008-05-08 23:27:03 UTC
The problem, as far as I understand it, is that gtk+ urlencodes the spaces and other special characters because of the %U in mplayer.desktop. In itself this is correct, but if it is a local file, mplayer seems not to parse the urlencoding. Using %F fixes this for local files. Can somebody test that change and see if it still works correctly with streams?

On the other hand, gmplayer is pretty ancient and outdated, and users would do better to use one of the modern frontends (smplayer, gnome-mplayer, kmplayer).
Comment 14 Niko 2008-05-14 09:04:26 UTC
well, i am using mplayer, and i have the same bug. maybe the prolem is in the core.

the solution that is in my mind, is to make mplayer smarter ;)
if you are opening a local file (such as right click, open with) automaticly should open it with %F, but when a stream file is opening it should be used %U.

the question is "how to understand what type is opening?"
Comment 15 Fabio Bonfante 2008-05-25 00:56:34 UTC
Well... %U, %F and similar are freedesktop standard of .desktop entry files. These file define calling convention useful for file-manager.

Specifing %U in the mplayer desktop file permit to a file manager to invoke mplayer transparently using an URI, very useful when browsing samba shares with nautilus or to open streaming files.

It's a good idea use a URI but to get all works we needs that:
1. the "caller" calls the program with a well-formed URI in the command line
2. the "called" programs (mplayer here) handle the argument passed.
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2009-08-03 20:32:47 UTC
gmplayer is deprecated and there's no .desktop installed without it

use smplayer or gnome-mplayer
Comment 17 Ben de Groot (RETIRED) gentoo-dev 2010-03-13 19:29:58 UTC
*** Bug 309289 has been marked as a duplicate of this bug. ***