autostarts under gnome3, conflicts with gnome-shell

Bug #1335738 reported by Daniel Gnoutcheff
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
light-locker (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

To reproduce:
1) Install Gnome 3 (e.g. as part of Ubuntu GNOME, package
   'ubuntu-gnome-desktop')
2) Install some other desktop environment where light-locker is useful (e.g.
   xfce or lxde).
3) Install light-locker

Expected:
light-locker should only be autolaunched when the selected DE needs a
generic screen locker (e.g. xfce or lxde). Gnome 3 has its own screen
locker that's integrated with gnome-shell, so light-locker generally should
not be run under Gnome 3.

Actual:
1) light-locker is autolaunched when Gnome 3 is started.
2) I have my system configured to lock the screen when going to sleep.
   However, when I resume from sleep, sometimes find that light-locker has
   grabbed the keyboard and mouse. This prevents me from using
   gnome-shell's unlock screen.
---
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: GNOME
DistroRelease: Ubuntu 14.04
Package: light-locker 1.4.0-0ubuntu1
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 3.13.0-30.54-generic 3.13.11.2
Tags: trusty
Uname: Linux 3.13.0-30-generic x86_64
UpgradeStatus: Upgraded to trusty on 2014-04-15 (75 days ago)
UserGroups: adm admin cdrom dialout dip fax floppy fuse kvm lpadmin plugdev sambashare sudo tape vboxusers video wireshark
_MarkForUpload: True

Revision history for this message
Daniel Gnoutcheff (gnoutchd) wrote : Dependencies.txt

apport information

tags: added: apport-collected trusty
description: updated
Revision history for this message
Daniel Gnoutcheff (gnoutchd) wrote : ProcEnviron.txt

apport information

Revision history for this message
Simon Steinbeiß (ochosi) wrote :

Hey,
I have to admit that this was not an anticipated use-case. Either way, light-locker installs a desktop-file into /etc/xdg/autostart to ensure it's getting started up when a session starts. It cannot know which DE people want to use it with, so we will certainly not add some built-in DE detection.

The useful thing that you can do to fix your problem is to make sure it gets started in your other sessions by adding it to the session autostart and removing the entry from /etc/xdg/autostart (or: see if gnome-shell can actually inhibit starting certain apps, as I'm not a gnome user I wouldn't know).

In the end I'd say this is not a bug in light-locker, it's entirely expected that it autostarts *by default* after you install it. More complex setups just need a little more tweaking by hand.

Revision history for this message
Daniel Gnoutcheff (gnoutchd) wrote : Re: [Bug 1335738] Re: autostarts under gnome3, conflicts with gnome-shell

On 06/30/2014 04:26 AM, Simon Steinbeiß wrote:
> Hey,
> I have to admit that this was not an anticipated use-case. Either way, light-locker installs a desktop-file into /etc/xdg/autostart to ensure it's getting started up when a session starts. It cannot know which DE people want to use it with, so we will certainly not add some built-in DE detection.

I don't think light-locker would have to do DE detection. The autostart
specification allows applications to be enabled/disabled by DE via the
OnlyShownIn and NotShownIn keys. The DEs themselves enforce these keys,
and many autostart files use them. See:

<http://standards.freedesktop.org/autostart-spec/autostart-spec-0.5.html#idm140084019414432>

> The useful thing that you can do to fix your problem is to make sure it
> gets started in your other sessions by adding it to the session
> autostart and removing the entry from /etc/xdg/autostart (or: see if
> gnome-shell can actually inhibit starting certain apps, as I'm not a
> gnome user I wouldn't know).

AFAIK Gnome respects the OnlyShownIn and NotShownIn keys in autostart
files. (Practically speaking, though, I'll probably just replace
light-locker with xscreensaver, as the former breaks when using GDM.)

> In the end I'd say this is not a bug in light-locker, it's entirely
> expected that it autostarts *by default* after you install it.

While I agree that convenient defaults are nice, it's more important
that the defaults be safe. Blindly injecting light-locker into every
installed DE is not a safe default.

In my case, I installed light-locker to satisfy a "recommends"
dependency in xfce4-session, so I expected that it would only run under
xfce. I did not expect that it would run under other DEs, and I
certainly didn't expect that it would *break* things. It took me
several days to figure out why my Gnome sessions were occasionally
locking up.

I think any one of the following would address this issue:

  - Have at least one of light-locker and gnome-shell declare a
    'breaks' dependency on the other (so apt-get will refuse to install
    them both).

  - Add 'NotShowIn=GNOME;' to /etc/xdg/autostart/light-locker.desktop,
    i.e. blacklist those DEs known to conflict with light-locker.

  - Add 'OnlyShowIn=XFCE;LXDE;' to
    /etc/xdg/autostart/light-locker.desktop, i.e. whitelist those DEs
    known to benefit from light-locker.

  - Remove /etc/xdg/autostart/light-locker.desktop and have the DEs
    start light-locker themselves if and when they want it. (I think
    xfce and razor-qt use xscreensaver this way.)

HTH! (Disclaimer: I haven't actually tested these ideas.)

Revision history for this message
Tim Lunn (darkxst) wrote :

'NotShowIn=GNOME;' will work, however a better fix might be to have light-locker bailout if lightdm is not running (check for name on dbus)

Revision history for this message
Simon Steinbeiß (ochosi) wrote :

I agree that checking for lightdm would be the better solution, for now I've pushed the NotShowIn upstream, hopefully Ubuntu can pick it up as a patch for this bug: https://github.com/the-cavalry/light-locker/commit/1d4b20dc4238b6c1ac99ed34900c51d9e9b0a394

Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Based on the previous comment, this bug can be marked as fixed.

Changed in light-locker (Ubuntu):
status: New → Fix Released
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.