GNOME Bugzilla – Bug 342031
editing system autostarted .desktop should create an user modified version instead of ignoring the change
Last modified: 2007-01-07 01:24:37 UTC
That bug has been described on https://launchpad.net/distros/ubuntu/+source/gnome-session/+bug/40673 "After a clean installation I noticed that beagled was using a lot of resources (>90% CPU) and I tracked this to be an EvolutionMail indexer issue so I want beagled to start with a --deny-backend EvolutionMail. I headed to System/Preferences/Sessions to change beagled's startup command and I was allowed to do so. I changed the command and to give it a try I logged out and logged in again. A while after login, I noticed that CPU was again being hogged and I tracked it again to beagled. I noticed that the argument I set in gnome-session-properties wasn't there so I executed it again and I noticed that the argument I provided was missing. I'm pretty sure this is because I can't change the file /etc/xdg/autostart/beagled.desktop although I haven't tested this theory by changing the permissions of that file, to allow me to write to it. In any case, if a user changes the arguments of a command listed on the system default autostart, maybe the corresponding autostart .desktop file should be copied to ~/.config/autostart so that the changes can be applied."
Created attachment 67177 [details] [review] Patch to fix it This patch adds the code to do the same as when disabling/enabling, which is to save to the user's config directory. This patch was in SuSE packages, I totally forgot to fix it upstream also, so it is confirmed to work on SuSE installations.
Created attachment 67478 [details] [review] patch by Gary Coady <garycoady@ubuntu.com> That is the patch used for the Ubuntu package, works fine too
The patch in comment #1 looks reasonable to me. I'm not as sure about the patch in comment #2. It seems to me that according to the xdg autostart spec, it is possible to "delete" a system-wide autostart by writing a user-specific one with a Hidden attribute. The properties code ought to know about this and do the right thing for the user.
I properly fixed this in HEAD.