Greeter does not pick mouse or keyboard input when it's not run as root

Bug #1282148 reported by Maxime Gauduin
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Greeter
Invalid
High
Unassigned

Bug Description

Hi,

On Arch Linux, the Pantheon greeter (latest bzr) needs to be run as root or it won't accept mouse or keyboard input.

I'm packaging LightDM and am setting up a lightdm user just for the greeter. This works fine with the GTK greeter but somehow the Pantheon greeter behaves incorrectly.

All directories where LightDM writes are owned by the lightdm user. Have you got any idea what could require root perms in this case?

Maxime Gauduin (alucryd)
description: updated
summary: - Greeter does not pick mouse or keyboard input when lightdm is not run as
- root
+ Greeter does not pick mouse or keyboard input when it's not run as root
Changed in pantheon-greeter:
status: New → Confirmed
importance: Undecided → High
tags: added: distro-archlinux
Revision history for this message
Raphael Isemann (teemperor) wrote :

/var/lib/lightdm/.pam_environment contains "GDK_CORE_DEVICE_EVENTS=true".

I'm not sure why this is in your lightdm-package, but it breaks pantheon-greeter. It seems that the gtk-greeter also runs without it, so i have even less of an idea why it is there. I think we should ask the lightdm-maintainer for Arch and i'm pretty sure you know that person :)

Revision history for this message
Maxime Gauduin (alucryd) wrote :

That line is related to a bug report I got when I first moved lightdm into repos: https://bugs.archlinux.org/task/34289
This is the original bug report: https://bugs.launchpad.net/ubuntu/+source/unity-greeter/+bug/1024482

I'm not sure if that bug is still valid, I'll try to install an icon theme and see what happens. I'll report back here with my findings.

Revision history for this message
Raphael Isemann (teemperor) wrote :

You can also just set the variable in the desktop-file of the pantheon-greeter to false. Also note that i used the greeter-0.3 branch for my testing, you can get it here: https://code.launchpad.net/~teemperor/pantheon-greeter/greeter-0.3

Revision history for this message
Maxime Gauduin (alucryd) wrote :

Good idea, and thx for the link, although I seem to have a another problem on my hands. The greeter won't start anymore, no matter the state of that variable.

It seems to be related to the elementary gtk theme, I tried v3.4 and latest bzr of the gtk theme versus your greeter-0.3 branch and got that (terminal output from lightdm --test-mode, running it for real just hangs and restarts over and over, without any meaningful log produced): https://paste.xinu.at/Ak0y/

Is that trivial to fix or do you need more tests and/or logs? BTW, I'm using the latest bzr of granite.

Revision history for this message
Raphael Isemann (teemperor) wrote :

That errors don't look critical, i also think that we don't depend on the elementary-gtk-theme. The greeter still depends on the elementary-icon-theme (or any other theme that contains all necessary icons). But as there is no output about icon-warnings, it's probably not the case.

My packages are:
granite is 0.2.3-1 from community
elementary-icon-theme is 3.1-4 from community
gtk-theme-elementary-bzr is r204-1 from the AUR

and it works for me.
There are a view logs in /var/log/lightdm, can you post them?

You can also test the greeter without lightdm, especially as lightdm --test-mode doesn't even start for me on arch due to permisson errors on .Xauthority. You can execute the binary in /usr/share/xgreeters/pantheon-greeter and that should produce some useful output in case in case it crashes.

Also note that if you manually installed pantheon-greeter you need to set "greeter-session=pantheon-greeter" and not "greeter-session=lightdm-pantheon-greeter" as the binary directly lands in /usr/share/xgreeters.

Revision history for this message
Raphael Isemann (teemperor) wrote :

Another note: LightDM saves it's logs from the --test-mode in ~/.cache/lightdm/

Revision history for this message
Maxime Gauduin (alucryd) wrote :

Sorry about the late reply, had a long week-end. The greeter crashing was due to granite-bzr, it doesn't crash with granite 0.2.3.

I tried adding "env GDK_CORE_DEVICE_EVENTS=false" to the Exec line in the desktop file, but it seems .pam_environment takes precedence as I still couldn't use mouse or keyboard. However, deleting .pam_environment does the trick. I'll do some tests next time I bump lightdm, see if I can't get rid of that file.

Thx for the help!

Revision history for this message
Raphael Isemann (teemperor) wrote :

I can verify that you have to delete it and setting it to false isn't doing the job. Maybe it's a bug in Clutter as it's the only difference between us and the normal GTK+ greeter.

I'll close this bug for now because it seems to be a downstream problem.

Changed in pantheon-greeter:
status: Confirmed → Invalid
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.