Unable to override system-wide xdg/autostart settings

Please post all general support questions for LXDE here.
Locked
yyzyyz
Posts: 3
Joined: Fri Aug 15, 2014 7:10 pm

Unable to override system-wide xdg/autostart settings

Post 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!
sean0000
Posts: 5
Joined: Sat Aug 09, 2014 1:42 am
Location: South Central Pennsylvania

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

Post by sean0000 »

yyzyyz,

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

Sean
seppalta
Posts: 449
Joined: Tue Sep 20, 2011 6:09 am
Location: USA
Contact:

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

Post 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.
yyzyyz
Posts: 3
Joined: Fri Aug 15, 2014 7:10 pm

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

Post 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...
seppalta
Posts: 449
Joined: Tue Sep 20, 2011 6:09 am
Location: USA
Contact:

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

Post 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.
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

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

Post 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.
yyzyyz
Posts: 3
Joined: Fri Aug 15, 2014 7:10 pm

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

Post 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.
Locked