GNOME Bugzilla – Bug 551700
Stop gnome and kde 4 autostart mess
Last modified: 2014-03-05 11:39:17 UTC
Please describe the problem: Case one: Steps to reproduce: 1) Mark an entry in gnome-session to not autostart 2) Login in kde4 Expected behavior: Kde4 does not autostart that app Current behavior: Kde4 autostarts the app Case two: Steps to reproduce: 1) Mark an entry in kde to not autostart 2) Login in gnome Expected behavior: Gnome shows the app in gnome-session and does not autostart it Current behavior: Gnome does not show the app in gnome-session I would like to list every autostart entries in gnome and kde. Mark them to autostart only in gnome, only in kde or in both. Related bugs: http://bugzilla.gnome.org/show_bug.cgi?id=548339 https://bugs.kde.org/show_bug.cgi?id=163582 Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Same bug in kde bugzilla: http://bugs.kde.org/show_bug.cgi?id=170817
When Gnome disables an autostart entry, it adds the flag "X-GNOME-Autostart-enabled=false". Kde does not understand this flag. When Kde disables an autostart entry, it adds the flag "Hidden=true". The problem is that Gnome uses this flag to mark autostart entries deleted. From gnome-sessions source: /* Two possible cases: * a) We want to remove a system wide startup desktop file. * We can't do that, so we will create a user desktop file * with the hidden flag set. * b) We want to remove a startup desktop file that is both * system and user. So we have to mark it as hidden. */ I think Gnome and Kde hackers need to reach agreement here.
We just need to finish the spec...
The spec says we should be using Hidden=true: http://standards.freedesktop.org/autostart-spec/autostart-spec-0.5.html#id2452224 gnome-session looks at both Hidden and X-GNOME-Autostart-enabled when reading in entries, but the capplet only sets X-GNOME-Autostart-enabled. (I guess that must date back to before the spec was finished?)
Well, after some research... GNOME (gnome-session): Show: It shows autostart entries in /etc/xdg/autostart and in $HOME/.config/autostart. It does not show entries with "Hidden=true", "NotShowIn=gnome" or "OnlyShowIn=kde". Enable/Disable (user): It sets "X-GNOME-Autostart-enabled" flag true or false. Enable/Disable (system): It creates a user desktop file with "X-GNOME-Autostart-enabled" flag. Delete (user): It deletes the desktop file. Delete (system): It creates a user desktop file with "Hidden=true". KDE (systemsettings): Show: It only shows autostart entries in $HOME/.config/autostart. It shows entries with "Hidden=true" or "OnlyShowIn=gnome" (but it does not exec them). Enable/Disable (user): It sets "Hidden" flag true or false. Delete (user): It deletes the desktop file. I like gnome-sessions behavior, but obviously "X-GNOME-Autostart-enabled" flag should be standardized. This is a very annoying bug and i am sure every people would like to see similar behavior in both programs. I can't do much more with this. Thanks for reading.
*** Bug 548339 has been marked as a duplicate of this bug. ***
This is too hard to do via the shell. In particular, it's not obvious (and there is no good documentation that I could find) as to what the format of these files should be. Eg if the extension ".desktop" is missing, it won't work. I'd like to just be able to create a simple symlink in the relevant directory that points to the shell-script I want to execute. In my view, a more "Unixy" approach would be nice. For example, in KDE, this works: $ ls -l $HOME/.kde/Autostart/kde-startup.sh /home/rjn/.kde/Autostart/kde-startup.sh -> ../../bin/kde-startup.sh
gnome-session-properties is no longer included in gnome-session.