Page 1 of 1

Unable to override system-wide xdg/autostart settings

Posted: Fri Aug 15, 2014 8:53 pm
by yyzyyz
Hi,

I'm running the trusty release of Lubuntu with the latest updates and am trying to disable certain applications from starting up with the session.
I went to Preferences > Default applications for LXSession and unchecked these applications under the "Autostart" tab, which creates *.desktop files under ~/.config/autostart directory with NotShowIn setting updated to include LXDE. However, this seems to have no effect at all and the disabled applications still get started with the session. Updating this setting in the system-wide xdg/autostart configuration does disable these applications from starting up.

This appears to violate the freedesktop.org specs, which state:
If the same filename is located under multiple Autostart Directories only the file under the most important directory should be used.
Example: If the two files /etc/xdg/autostart/foo.desktop and ~/.config/autostart/foo.desktop exist then only the file ~/.config/autostart/foo.desktop will be used because ~/.config/autostart/ is more important than /etc/xdg/autostart/"

Is this a defect? Or am I missing something here...?

Cheers!

Re: Unable to override system-wide xdg/autostart settings

Posted: Sat Aug 16, 2014 9:26 am
by sean0000
yyzyyz,

There exists also a /usr/share/autostart folder, which you may want to check.

Sean

Re: Unable to override system-wide xdg/autostart settings

Posted: Sun Aug 17, 2014 2:53 am
by seppalta
There can be multiple autostart files. See http://lxlinux.com/#4 for normal autostart files and folders. And, of course, lubuntu has to have a few extras.

Re: Unable to override system-wide xdg/autostart settings

Posted: Mon Aug 18, 2014 8:02 pm
by yyzyyz
I've checked all autostart locations referenced in the above two posts and didn't find any config that would lead to this behvior.
In fact, it's actually irrelevant and I'll explain why: even if such an autostart config existed, it cannot be higher in priority than /etc/xdg/autostart (since updating the latter configuration does disable the app from automatically starting up). And since ~/.config/autostart is even higher in priority than /etc/xdg/autostart (going by freedesktop.org specs), it *should* override /etx/xdg/autostart configuration, but it doesn't. In fact, the "lxsession-default-apps" command has been written relying on this behavior.
Therefore,
- The "lsxession-default-apps" command is working as designed - it creates the correct configuration files in ~/.config/autostart to override /etc/xdg/autostart
- However, "lxsession" is not working as expected: it fails to apply the settings from ~/.config/autostart (when present), and instead applies /etc/xdg/autostart settings.

Proceeding to submit a bug-report...

Re: Unable to override system-wide xdg/autostart settings

Posted: Wed Aug 20, 2014 5:44 pm
by seppalta
I do not understand. If the system-wide autostart is overriding the users autostart, then just remove the entry from the system-wide file. Are you sure there is not a .desktop file in ~/.config/autostart, or whatever the corresponding file is in Lubuntu? That will generally override everything. There is no bug.

Re: Unable to override system-wide xdg/autostart settings

Posted: Wed Aug 20, 2014 7:03 pm
by drooly
i think op's concern is this:
yyzyyz wrote:This appears to violate the freedesktop.org specs
i wouldn't call that a bug, either, but i can see the point.
but i did not follow the reasoning.

Re: Unable to override system-wide xdg/autostart settings

Posted: Wed Aug 20, 2014 8:57 pm
by yyzyyz
seppalta wrote:I do not understand. If the system-wide autostart is overriding the users autostart, then just remove the entry from the system-wide file. Are you sure there is not a .desktop file in ~/.config/autostart, or whatever the corresponding file is in Lubuntu? That will generally override everything. There is no bug.
How is it not a bug when the "lxsession-default-apps" is not working as expected (it lets users disable apps from autostarting, but really has no effect)?
Also, you are proposing updating system-wide settings to suit one user's preference as a solution?

/etc/xdg/autostart/xyz.desktop should *not* override a custom xyz.desktop in ~/.config/autostart (if a user has one) - read the freedesktop.org specifications referenced in my earlier post. This is clearly a violation of the specs and not the desired behavior.