Index: plugins/thunar-uca/thunar-uca-editor.c =================================================================== --- plugins/thunar-uca/thunar-uca-editor.c (revision 25631) +++ plugins/thunar-uca/thunar-uca-editor.c (working copy) @@ -582,7 +582,13 @@ if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_ACCEPT) { filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser)); - s = g_strconcat (filename, " %f", NULL); + + /* quote the command when the filename contains spaces */ + if (G_LIKELY (strchr (filename, ' ') == NULL)) + s = g_strconcat (filename, " %f", NULL); + else + s = g_strconcat ("'", filename, "' %f", NULL); + gtk_entry_set_text (GTK_ENTRY (uca_editor->command_entry), s); g_free (filename); g_free (s);