Comment 6 for bug 335712

Revision history for this message
wild.ideas (wild-ideas) wrote :

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!