Index: gnome-session/gsm-autostart.c =================================================================== --- gnome-session/gsm-autostart.c (revision 4626) +++ gnome-session/gsm-autostart.c (working copy) @@ -260,3 +260,25 @@ return list; } + +gchar * +gsm_autostart_parse_command_line (GKeyFile *keyfile) +{ + gchar *p, *result; + GString *gs; + gchar *exec = gsm_key_file_get_string (keyfile, "Exec"); + + gs = g_string_new (NULL); + for (p = exec; *p != '\0'; p++) + { + if (*p == '%' && (p[1] == 'u' || p[1] == 'U')) + p++; + else + g_string_append_c (gs, *p); + } + + result = gs->str; + g_string_free (gs, FALSE); + + return result; +} Index: gnome-session/gsm-autostart.h =================================================================== --- gnome-session/gsm-autostart.h (revision 4626) +++ gnome-session/gsm-autostart.h (working copy) @@ -43,6 +43,9 @@ GsmAutostartFreeFunc free_handler, gboolean enabled_only); +gchar * +gsm_autostart_parse_command_line (GKeyFile *keyfile); + G_END_DECLS #endif /* GSM_AUTOSTART_H */ Index: gnome-session/startup-programs.c =================================================================== --- gnome-session/startup-programs.c (revision 4626) +++ gnome-session/startup-programs.c (working copy) @@ -117,7 +117,7 @@ if (client->name == NULL) client->name = gsm_key_file_get_locale_string (keyfile, "GenericName"); - client->command = gsm_key_file_get_string (keyfile, "Exec"); + client->command = gsm_autostart_parse_command_line (keyfile); client->comment = gsm_key_file_get_locale_string (keyfile, "Comment"); client->enabled = gsm_key_file_get_boolean (keyfile, "X-GNOME-Autostart-enabled", Index: gnome-session/save.c =================================================================== --- gnome-session/save.c (revision 4626) +++ gnome-session/save.c (working copy) @@ -373,7 +373,7 @@ Client *client; SmProp *prop; - exec = gsm_key_file_get_string (keyfile, "Exec"); + exec = gsm_autostart_parse_command_line (keyfile); if (!g_shell_parse_argv (exec, &argc, &argv, NULL)) { g_free (exec);