After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 343231 - Incorrect quoting of spaces in the command line for manually specified startup programs
Incorrect quoting of spaces in the command line for manually specified startu...
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
2.14.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
: 345030 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-05-28 19:33 UTC by Martin Stjernholm
Modified: 2006-10-03 01:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Martin Stjernholm 2006-05-28 19:33:51 UTC
Under the "Startup Programs" tab in gnome-session-properties, it's not possible to specify commands with spaces inside the arguments.

To reproduce:

1. Open gnome-session-properties and add a command like this:

  gnome-terminal -t "Local terminal"

2. Notice how the command that appear in the list lacks the double quotes. However, if it's edited again one sees that it in reality is:

  gnome-terminal -t Local\ terminal

I.e. the space in the second argument is still escaped.

3. Close gnome-session-properties.

4. Open ~/.config/autostart/gnome-terminal.desktop. It contains this line:

  Exec=gnome-terminal -t Local terminal

I.e. the space is no longer escaped.

5. Exit the session and log in again. Sure enough, the Gnome terminal doesn't appear. Instead there is an error

  Invalid argument: "terminal"

in ~/.xsession-errors.
Comment 1 Vincent Untz 2006-07-27 09:59:57 UTC
2006-07-27  Vincent Untz  <vuntz@gnome.org>

	* startup-programs.c: don't keep around argc and argv, but just the
	command line since we don't need argv
	(client_free): updated for this
	(search_desktop_entries_in_dir): ditto
	(startup_list_write): ditto
	(startup_list_duplicate): ditto
	(startup_list_update_gui): ditto
	(edit_client): ditto, and check if the entered command is correct with
	g_shell_parse_argv()
	(startup_list_add_dialog): updated, and fix small leak
	Side-effect: fix bug #343231
Comment 2 Tom Tromey 2006-10-03 01:47:18 UTC
*** Bug 345030 has been marked as a duplicate of this bug. ***