[Bug 335712] Re: strange escape handling in Exec line of .desktop files

2013-08-20 Thread Cefn
Yes, please provide information how to escape paths with spaces. There's
no example I can find, and it seems impossible to satisfy the parser (I
can't make my entry appear at all).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/335712

Title:
  strange escape handling in Exec line of .desktop files

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-desktop/+bug/335712/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 335712] Re: strange escape handling in Exec line of .desktop files

2010-02-20 Thread wild.ideas
AHA!!!  It's NOT a bug in the 'exec' parser!!!

I found it...  It's a bug in the way the menu editor & Wine
create/manage/display the menus.  It's not acting consistently!

Here's what's happening:  I'm running 64-bit Karmic.  I have an
application I installed in Wine 1.1.38 called "MyApp".  When "MyApp"
installs, it (meaning MyApp's installer, Wine, and Ubuntu in some
combination unknown to the layman) creates a menu folder entry in
'Applications / Wine / Programs' called "MyApp".

Inside the "MyApp" folder, the install process creates several
'.desktop' files for MyApp.exe, a few other associated apps, and entries
to run 'notepad' with arguments that are README files.

In my case, one of these 'notepad' launchers works, one doesn't.
Examining the two revealed that the one that doesn't work fails only
because the README file argument, which contains '\' characters, isn't
quoted with double-quotes.  The one that works has a quoted argument.

I.e., the 'exec' parser is working properly according to
http://library.gnome.org/devel/desktop-entry-spec/ (under "The Exec
key"), which states "If an argument contains a reserved character the
argument must be quoted."

Here's where it gets weird:  When I ran 'System / Preferences / Main
Menu' and edited the Properties for the "notepad README" item, I could
clearly see the change appear in THIS directory & file:

.local/share/applications/wine-Programs-MyApp-MyApp ReadMe.desktop

by cat'ing the file in a terminal window.  My changes appear, and it
automatically doubles my backslashes...

However, that's NOT the '.desktop' file that's launching the "notepad
README" item!

It turns out that MyApp's installer / Wine / Ubuntu is creating TWO sets
of '.desktop' files...  And when you attempt to launch a Wine app, it
uses THIS directory & file:

.local/share/applications/wine/Programs/MyApp/MyApp ReadMe.desktop

which is NOT edited by using 'System / Preferences / Main Menu'.  You
have to manually edit this file (using, e.g., 'vi').  And it my case,
that amounted to correcting the argument to 'notepad' by enclosing it in
double-quotes to meet the rules of the 'exec' key field for '.desktop'
files.

Once done, it launched properly from ''Applications / Wine / Programs /
MyApp', as expected.

So WHY are two sets of '.desktop' files being created / maintained?
That's the bug!  It's not the parser for 'exec'.

Oh, and we still need a 'help' for guidance on escaping/quoting special
characters...   :^)

-- 
strange escape handling in Exec line of .desktop files
https://bugs.launchpad.net/bugs/335712
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 335712] Re: strange escape handling in Exec line of .desktop files

2010-02-20 Thread wild.ideas
I'm experiencing the same problem, and tracked it down to the 'exec'
line in the '.desktop' file.  I'm seeing the same behavior, whether I
use the menu editor to create the '.desktop' file, or if I hand-edit the
file to modify the 'exec' line.

Ironically, I ran into this with Wine, just as the original reporter
did.  I'm trying to launch 'notepad' in Wine, giving it a path to a
document to open.

I've determined that the GUI editor seems to automatically double my
backslash characters.  Per the Wine documentation (and special character
escaping rules), I expected to have to double the backslashes when I
created the menu property.  However, the GUI editor seems to handle this
for me.

The problem is THIS:  When 'exec' execs the command, the parser is
stripping out ALL of the backslash characters -- no matter how many you
have in the line.  And it doesn't seem to matter how you escape the line
with various quotings & backslashing -- it still assiduously finds and
strips them all out.

If I copy the line and paste it into a terminal -- with the backslashes
appropriately doubled -- then the line is parsed and executes correctly,
launching 'notepad' with the text file displayed.  But in the '.desktop'
file, the 'exec' command's backslash stripping means there's no apparent
way to make this work.

One more thing the development team needs to do:  Add a 'help' to
explain what's required as far as quoting and escaping special
characters when creating a command line.  It takes a lot of Googling to
find these rules...

Cheers!

-- 
strange escape handling in Exec line of .desktop files
https://bugs.launchpad.net/bugs/335712
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 335712] Re: strange escape handling in Exec line of .desktop files

2009-03-12 Thread Steve Langasek
On Thu, Mar 12, 2009 at 10:58:29PM -, Chris Coulson wrote:
> I've recreated this now. Steve, did you manually edit the Exec line of
> the desktop file?

No, it was auto-generated by wine.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org

-- 
strange escape handling in Exec line of .desktop files
https://bugs.launchpad.net/bugs/335712
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 335712] Re: strange escape handling in Exec line of .desktop files

2009-03-12 Thread Chris Coulson
I've recreated this now. Steve, did you manually edit the Exec line of
the desktop file? The only reason I ask is that I just created a fresh
desktop file using gnome-desktop-item-edit, and entered the Exec line
that you quoted, but gnome-desktop-item-edit doubled the number of
backslashes in the unquoted string, so the desktop file actually worked
correctly

** Changed in: gnome-desktop (Ubuntu)
   Importance: Undecided => Low
   Status: New => Confirmed

-- 
strange escape handling in Exec line of .desktop files
https://bugs.launchpad.net/bugs/335712
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 335712] Re: strange escape handling in Exec line of .desktop files

2009-03-12 Thread Chris Coulson
FYI, after creating the desktop file with gnome-desktop-item-edit and
the string you quoted above, my desktop file actually contained the
following exec line:

Exec=env WINEPREFIX="/home/vorlon/.wine" wine
"C:comlogoComlogo.exe" c:comlogodemokidspac.lgp

-- 
strange escape handling in Exec line of .desktop files
https://bugs.launchpad.net/bugs/335712
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 335712] Re: strange escape handling in Exec line of .desktop files

2009-03-02 Thread Chris Coulson
And after looking at it again, I am almost certainly wrong. Re-assinging
back.

** Changed in: gnome-desktop (Ubuntu)
Sourcepackagename: glib2.0 => gnome-desktop

-- 
strange escape handling in Exec line of .desktop files
https://bugs.launchpad.net/bugs/335712
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 335712] Re: strange escape handling in Exec line of .desktop files

2009-03-02 Thread Chris Coulson
This is almost certainly caused by glib, so re-assigning.

** Changed in: glib2.0 (Ubuntu)
Sourcepackagename: gnome-desktop => glib2.0

-- 
strange escape handling in Exec line of .desktop files
https://bugs.launchpad.net/bugs/335712
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs