When Terminal=false in the .desktop files, %F is expanded properly, and filenames with spaces appear correctly as one argumnet to the executing application. But when Terminal=true, somehow the expansion fails, and the application sees filenames with spaces split as two (or more) arguments.
Created attachment 2247 Shell script to be executed by the .desktop file
Created attachment 2248 .desktop file which triggers the bug
Created attachment 2249 Empty test file to download If you save all three attachments (.sh, .desktop, and this empty test file with spaces) in the same directory, and drag the empty file onto the .desktop, you'll see a terminal window popping up where three arguments are recognized, instead of just one.
So thunar just executes: exo-open --launch TerminalEmulator ./quoting-test.sh '/home/squisher/usr/xftasklets/bugs/New Empty File' , quoted correctly. So the bug is in exo-open.
Created attachment 2250 Patch which quotes the arguments Attached is a patch which quotes the arguments when joining them into one string. I think it is pretty straight forward. This should be save because exo-helper will parse the commands again with g_shell_parse_argv (exo-helper.c:416), which takes care of removing the quotes again to properly pass on the args to gdk_spawn_on_screen.
Created attachment 2251 Quote arguments in exo-open Patch idea is good, but it's horrible to read. Could you try the attached patch?
Yes, works fine. Thanks Nick!
Committed in revision 29679.