gnome-session-properties: Running a script in a subdirectory with spaces in name is not possible

Bug #56457 reported by jdo
0
Affects Status Importance Assigned to Milestone
gnome-session
Fix Released
Medium
gnome-session (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-session

Trying to run a script at startup with the gnome-session-properties was not possible. It has to do with spaces in my directory names.

I have added it to the gnome-session-properties program in 'start program' tab (System > Preferences > Sessions > Startup Programs), but my script is not executed.

This will work: My script 'startup.sh' in my home directory, and adding "sh /home/jdo/startup.sh" to the list.

However, If I add this to the list: "sh /home/jdo/Scripts and Settings/Bash Scripts/startup.sh", the script is never executed.

I tried everything with double quotes, and backslashes before the spaces. Using the brows button, or typing it directly. There seems to be some kind of translation of the text after I click Ok. The result however never works.

Ubuntu: Dapper of 15 august 2006 with updates, upgraded from Breezy.
gnome-session or gnome-session2 ? : version 2.14.3-0ubuntu1
Kernel: K7

jdo

Revision history for this message
jdo (jdo-deactivatedaccount) wrote :

Workaround

The workaround is simple. Edit the file ~/.config/autostart/nice.desktop directly (the file might be called different when viewed with nautilus, like "No name").

Now everything is like normal and next lines with both work:
        sh "/home/jdo/Scripts and Settings/Bash Scripts/startup.sh"
        sh /home/jdo/Scripts\ and\ Settings/Bash\ Scripts/startup.sh

But I have to remember not to press the 'edit'-button on that line in the 'start program'-tab of the gnome-session-properties. The gnome-session-properties do indeed translate the text: all double and single quotes and backslashes are removed. And that is the problem.

jdo

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. I've forwarded it upstream: http://bugzilla.gnome.org/show_bug.cgi?id=351751

Changed in gnome-session:
assignee: nobody → desktop-bugs
importance: Untriaged → Low
status: Unconfirmed → Confirmed
Changed in gnome-session:
status: Unknown → Unconfirmed
Changed in gnome-session:
status: Unconfirmed → Rejected
Changed in gnome-session:
status: Rejected → Unconfirmed
Changed in gnome-session:
status: Unconfirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

fixed upstream

Changed in gnome-session:
status: Confirmed → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

That upload fixes the bug:

 gnome-session (2.17.5-0ubuntu1) feisty; urgency=low
 .
   * New upstream version:
     Misc
     - Add a configure option to specify the directory of at-spi-registryd
     - Build improvements
     - Remove spec file
     Session Manager:
     - Warn the user about more fatal errors
     - Use gtk-window-decorator for compiz
     - Fix crash when two at-spi-registryd are running
     - Don't hardcode start of assistive technologies software
     - Start the dbus daemon if it's not running
     - Kill esd on exit
     - Fix priority order of autostart desktop files with the same name
     - Fix invalid use of memory
     - Fix quoting of commands when migration to new autostart system
       (Ubuntu: #56457)
     Session Properties Dialog
     - Fix priority order of autostart desktop files with the same name
     - Report connection errors more gracefully
     - Use GOption
     - Reuse existing desktop files instead of overwriting them
     - Rework code of edition of startup programs so that it actually works
       well and comply with the freedesktop spec
     - Use a toggle button to enable/disable startup programs (Ubuntu: #35544)
     - Add a "Save current session" button
     - Remove "ask to save" toggle button
     - Remove edition of session names
     - Remove splash screen toggle button
     - Change order of the tabs
     - Fix desktop file to use a correct icon
     - Improve default size of the dialog
     - Show names instead of commands for the startup programs
     - HIGify quit dialog
   * debian/patches/01_fix_autostart_edition.patch:
     - fixed with the new version
   * debian/patches/05_session_save.patch:
     - dropped, the new upstream version has that change
   * debian/patches/07_kill_esd.patch:
     - fixed with the new version
   * debian/patches/08_menu-change.patch:
     - updated
   * debian/patches/17_fix-at-spi-registryd-path.patch:
     - dropped, the new version has a configure option for that
   * debian/patches/18_desensitize_buttons_correctly.patch:
     - dropped, should work fine with the new upstream version
   * debian/patches/18_startup_edit_all.patch:
     - dropped, should work fine with the new upstream version
   * debian/patches/19_gnome-wm-tweaking.patch:
     - updated
   * debian/rules:
     - use --with-at-spi-registryd-directory=/usr/lib/at-spi configure option

Changed in gnome-session:
status: Fix Committed → Fix Released
Changed in gnome-session:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.