You are not logged in.

#1 2016-05-01 23:13:54

tombbb
Member
Registered: 2016-03-05
Posts: 14

[SOLVED] "Error reading existing Xauthority" when starting lightdm

The error happens whenever I run the following command:

lightdm --test-mode --debug

I am trying to run the webkit2 material theme. The first batch of errors is to do with the X authority. I have checked the permissions of the .Xauthority file in my home directory and the permissions list me as the user and the group. I also checked the /run/lightdm/root/ directory listed in the log file and there is nothing in there except a file titled ":0".
The second error listed, which I assume is related to the first one, is to do with the /var/lib/lightdm-data file. Again, I checked the permissions but this time they are both owned by the lightdm user.

Here is the contents of my  lightdm.conf file minus the commented lines:

[LightDM]
run-directory=/run/lightdm

[Seat:*]
greeter-hide-users=false
greeter-session=lightdm-webkit2-greeter

Here is the full output of the debug log:

[+0.00s] DEBUG: Logging to /home/r00t/.cache/lightdm/log/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.18.1, UID=1000 PID=18570
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: Running in user mode
[+0.00s] DEBUG: Using Xephyr for X servers
[+0.00s] DEBUG: Registered seat module xlocal
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Registered seat module unity
[+0.00s] DEBUG: Monitoring logind for seats
[+0.00s] DEBUG: New seat added from logind: seat0
[+0.00s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.00s] DEBUG: Seat seat0: Starting
[+0.00s] DEBUG: Seat seat0: Creating greeter session
[+0.01s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+0.01s] DEBUG: Seat seat0: Creating display server of type x
[+0.01s] DEBUG: Could not run plymouth --ping: Failed to execute child process "plymouth" (No such file or directory)
[+0.01s] DEBUG: Seat seat0: Starting local X display
[+0.01s] DEBUG: DisplayServer x-7: Logging to /home/r00t/.cache/lightdm/log/x-7.log
[+0.01s] DEBUG: DisplayServer x-7: Writing X server authority to /run/lightdm/root/:7
[+0.01s] WARNING: Error reading existing Xauthority: Failed to open file '/run/lightdm/root/:7': Permission denied
[+0.01s] WARNING: DisplayServer x-7: Failed to write authority: Failed to open X authority /run/lightdm/root/:7: Permission denied
[+0.01s] DEBUG: DisplayServer x-7: Launching X Server
[+0.01s] DEBUG: Launching process 18575: /usr/bin/Xephyr :7 -seat seat0 -auth /run/lightdm/root/:7 -nolisten tcp
[+0.01s] DEBUG: DisplayServer x-7: Waiting for ready signal from X server :7
[+0.01s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.01s] WARNING: Could not enumerate user data directory /var/lib/lightdm-data: Error opening directory '/var/lib/lightdm-data': Permission denied
Failed to use bus name org.freedesktop.DisplayManager, do you have appropriate permissions?

Last edited by tombbb (2016-05-07 14:59:39)

Offline

#2 2016-05-02 20:21:59

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

Ugh, why are you running it as root? This:

[+0.01s] DEBUG: DisplayServer x-7: Logging to /home/r00t/.cache/lightdm/log/x-7.log
[+0.01s] DEBUG: DisplayServer x-7: Writing X server authority to /run/lightdm/root/:7
[+0.01s] WARNING: Error reading existing Xauthority: Failed to open file '/run/lightdm/root/:7': Permission denied
[+0.01s] WARNING: DisplayServer x-7: Failed to write authority: Failed to open X authority /run/lightdm/root/:7: Permission denied

Is very bad because now you have polluted the root user's home and otherwise with random files. If I am not mistaken, that is. I have no idea what you are trying to do other than get themes working. My relative lack of experience with display managers doesnt help, but I feel like you are doing something really wrong. Try looking at the wiki again and see if that helps with anything.


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#3 2016-05-02 21:15:47

tombbb
Member
Registered: 2016-03-05
Posts: 14

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

JohnBobSmith wrote:

Ugh, why are you running it as root? This:

[+0.01s] DEBUG: DisplayServer x-7: Logging to /home/r00t/.cache/lightdm/log/x-7.log
[+0.01s] DEBUG: DisplayServer x-7: Writing X server authority to /run/lightdm/root/:7
[+0.01s] WARNING: Error reading existing Xauthority: Failed to open file '/run/lightdm/root/:7': Permission denied
[+0.01s] WARNING: DisplayServer x-7: Failed to write authority: Failed to open X authority /run/lightdm/root/:7: Permission denied

Is very bad because now you have polluted the root user's home and otherwise with random files. If I am not mistaken, that is. I have no idea what you are trying to do other than get themes working. My relative lack of experience with display managers doesnt help, but I feel like you are doing something really wrong. Try looking at the wiki again and see if that helps with anything.

I am not running as "root" but rather a user named "r00t". I have only ever logged in as the "root" user when I was installing the OS.

Offline

#4 2016-05-03 00:32:44

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

Well that certaintly is confusing indeed!


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#5 2016-05-03 00:51:32

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 395

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

I do believe I read in these forums that the GTK3 update broke lightdm-webkit2-greeter, but I could be incorrect.

Regards


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

#6 2016-05-03 23:21:58

tombbb
Member
Registered: 2016-03-05
Posts: 14

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

So do you think there's much I can do short of downgrading the package? Would that even work?

Offline

#7 2016-05-04 04:30:36

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

Why not use a greeter from the repos and see if that works, rather than a potentially broken AUR package?  Have you considered testing with another DM e.g. sddm?  Can you even use startx successfully?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#8 2016-05-04 17:09:20

tombbb
Member
Registered: 2016-03-05
Posts: 14

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

I have also tried using the GTK and KDE greeters. The GTK greeter causes the same error message, and the KDE one launches but it gives an error stating:

[+8.58s] DEBUG: Seat seat0: Failed to find session configuration default
[+8.58s] DEBUG: Seat seat0: Can't find session 'default'

Also, startx works perfectly. With my current configurations, when I boot my machine I am shown a command-line prompt for login (the same one shown during installation), at which point I login and run the startx command. This launches my desktop environment and everything works perfectly from there (i3, fonts etc.).

Offline

#9 2016-05-04 18:30:07

Tutti
Member
Registered: 2015-02-26
Posts: 117

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

In OP you said the error happens when you run

lightdm --test-mode --debug

where are you trying to run that? (in X or from TTY?). My understanding is that it is for running lightdm as an X application, for testing purposes and requires X to be running, not to start lightdm.
Have you attempted starting the lightdm.service?

I quit using lightdm a while ago, but based on the message in your last post and what I remember, the "Can't find session" can be solved by explicitly selecting the DE/WM before logging in.

Offline

#10 2016-05-04 22:24:02

tombbb
Member
Registered: 2016-03-05
Posts: 14

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

I am running the command you mentioned in X. It displays a small window which emulates the login screen. When I log in through the emulator window, my credentials are accepted but the screen stays white and does not progress. This is the same behaviour when I run the lightdm.service from the command line and also when I enable the lightdm.service and reboot my machine.

Offline

#11 2016-05-05 02:27:24

Tutti
Member
Registered: 2015-02-26
Posts: 117

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

So lightdm starts and shows a login screen, but will not progress after entering credentials, is this correct? and is this consistent with all greeters you have tried?
I think the above is how test mode is supposed to be, so in the rest of this post I assume that lightdm.service is started from tty.

Did lightdm previously work on your system?
Have you checked the lightdm log after failed start/login? what did it say?
What greeter are you attempting to use now? (I see you initially tried webkit2, and later GTK and KDE)
I would recommend using one of the greeters from the repos, as some of the greeters from the AUR requires more configuration to work, and as loafer said may be broken.

Based on the debug messages you posted in #8
Have you tried selecting the session, if your greeter allows it, before logging in? alternatively defining the user-session in lightdm.conf, check for available sessions in /usr/share/xsession/

Offline

#12 2016-05-05 16:22:05

tombbb
Member
Registered: 2016-03-05
Posts: 14

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

Yes that is correct with KDE in X and tty. The other two (Webkit2 and GTK) both fail in debug mode from the command line, as seen in my OP, and both produce a blank screen when enabled and a service.

I am currently on a fresh install of Arch and have never had lightdm working. Below you will find the output of two attempts at starting the lightdm.service with KDE and with Webkit2. To obtain this output, I enabled the lightdm.service and rebooted my machine. I'm not sure if this was necessary but when I was running it while logged in, the debug log mentioned something along the lines of "session != NULL" so I figured it was best to log out completely.

Here is the output of a the lightdm.service with Webkit2 as the greeter. Instead of a login, I was displayed a mouse cursor on a blank screen. The mouse and screen color match the configurations of my desktop environment.

-- Subject: Unit lightdm.service has begun start-up
-- Unit lightdm.service has begun starting up.
-- Subject: Unit lightdm.service has finished start-up
-- Unit lightdm.service has finished starting up.
May 05 17:06:35 HAL9000 lightdm[472]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
May 05 17:06:35 HAL9000 systemd[1]: Created slice User Slice of lightdm.
May 05 17:06:35 HAL9000 systemd-logind[288]: New session c1 of user lightdm.
-- Subject: A new session c1 has been created for user lightdm
-- A new session with the ID c1 has been created for the user lightdm.
May 05 17:06:35 HAL9000 systemd[1]: Started Session c1 of user lightdm.
May 05 17:06:35 HAL9000 systemd[475]: pam_unix(systemd-user:session): session opened for user lightdm by (uid=0)

Here is the output of running lightdm.service with KDE as the greeter. This did allow me to enter my credentials but similarly to the Webkit2 greeter, brought me to a blank screen with a mouse cursor matching my desktop configurations.

-- Subject: Unit lightdm.service has begun start-up
-- Unit lightdm.service has begun starting up.
-- Subject: Unit lightdm.service has finished start-up
-- Unit lightdm.service has finished starting up.
May 05 17:11:01 HAL9000 lightdm[467]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
May 05 17:11:01 HAL9000 systemd[1]: Created slice User Slice of lightdm.
May 05 17:11:01 HAL9000 systemd-logind[317]: New session c1 of user lightdm.
-- Subject: A new session c1 has been created for user lightdm
-- A new session with the ID c1 has been created for the user lightdm.
May 05 17:11:01 HAL9000 systemd[1]: Started Session c1 of user lightdm.
May 05 17:11:01 HAL9000 systemd[470]: pam_unix(systemd-user:session): session opened for user lightdm by (uid=0)
May 05 17:11:02 HAL9000 polkitd[375]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.login1.suspend']
May 05 17:11:02 HAL9000 polkitd[375]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=477 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=true]
May 05 17:11:02 HAL9000 polkitd[375]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.login1.hibernate']
May 05 17:11:02 HAL9000 polkitd[375]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=477 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=true]
May 05 17:11:02 HAL9000 polkitd[375]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.login1.reboot']
May 05 17:11:02 HAL9000 polkitd[375]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=477 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=true]
May 05 17:11:02 HAL9000 polkitd[375]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.login1.power-off']
May 05 17:11:02 HAL9000 polkitd[375]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=477 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=true]

Two more things. First, am I not right in saying that the KDE greeter is from the official repositories and not the AUR? Finally, how would I go about selecting/setting a session in the ways you described?

Last edited by tombbb (2016-05-05 16:48:53)

Offline

#13 2016-05-05 19:10:33

Tutti
Member
Registered: 2015-02-26
Posts: 117

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

K, lets ignore webkit2 and lightdm --test-mode for now.

In /etc/lightdm/lightdm.conf ensure that

session-wrapper=/etc/lightdm/Xsession

is uncommented.

With kde-greeter do the following:
From a TTY, without X running, do

systemctl start lightdm.service

The greeter has a blue down arrow button next to the power button. The blue button should be a dropdown with an expanding session entry.
After specifying a selection (not the previously used entry), attempt to login.
If login fails, switch to another TTY, stop lightdm and post the complete contents of /var/log/lightdm/lightdm.log (you may need to be root to access the log).

Offline

#14 2016-05-05 23:21:31

tombbb
Member
Registered: 2016-03-05
Posts: 14

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

Hey, it worked! Thanks a lot. Do you think there's anything I can do to get one of the other greeters to work? Or is there even any way to make the KDE greeter look nicer? I can't seem to find much online with regards to customising it.

Offline

#15 2016-05-06 15:32:16

Tutti
Member
Registered: 2015-02-26
Posts: 117

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

That's good, I'm not sure how much or if you can modify the KDE greeter.

As for the webkit2 greeter, I installed and tried to use it, the default antergos theme was broken for me and material resulted in a blank screen.
GTK greeter worked, so you could try running lightdm test-mode with GTK and check the logs in ~/.cache/lightdm/log
Did you make any changes to lightdm-gtk-greeter.conf?

Offline

#16 2016-05-06 16:42:02

tombbb
Member
Registered: 2016-03-05
Posts: 14

Re: [SOLVED] "Error reading existing Xauthority" when starting lightdm

I ran the GTK greeter in test mode and it displayed initially. I could enter in my password but it did not give any indication that the login was successful. When I tried it again, it gave the error that I was getting in my OP. Here's the log.

[+0.00s] DEBUG: Logging to /home/r00t/.cache/lightdm/log/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.18.1, UID=1000 PID=13236
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: Running in user mode
[+0.00s] DEBUG: Using Xephyr for X servers
[+0.00s] DEBUG: Registered seat module xlocal
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Registered seat module unity
[+0.00s] DEBUG: Monitoring logind for seats
[+0.00s] DEBUG: New seat added from logind: seat0
[+0.01s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.01s] DEBUG: Seat seat0: Starting
[+0.01s] DEBUG: Seat seat0: Creating greeter session
[+0.01s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User4035 added
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+0.01s] DEBUG: Seat seat0: Creating display server of type x
[+0.01s] DEBUG: Could not run plymouth --ping: Failed to execute child process "plymouth" (No such file or directory)
[+0.01s] DEBUG: Seat seat0: Starting local X display
[+0.01s] DEBUG: DisplayServer x-3: Logging to /home/r00t/.cache/lightdm/log/x-3.log
[+0.01s] DEBUG: DisplayServer x-3: Writing X server authority to /run/lightdm/root/:3
[+0.01s] WARNING: Error reading existing Xauthority: Failed to open file '/run/lightdm/root/:3': Permission denied
[+0.01s] WARNING: DisplayServer x-3: Failed to write authority: Failed to open X authority /run/lightdm/root/:3: Permission denied
[+0.01s] DEBUG: DisplayServer x-3: Launching X Server
[+0.01s] DEBUG: Launching process 13241: /usr/bin/Xephyr :3 -seat seat0 -auth /run/lightdm/root/:3 -nolisten tcp
[+0.01s] DEBUG: DisplayServer x-3: Waiting for ready signal from X server :3
[+0.01s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.01s] WARNING: Could not enumerate user data directory /var/lib/lightdm-data: Error opening directory '/var/lib/lightdm-data': Permission denied

I made changes to lightdm-gtk-greeter.conf via the lightdm-gtk-greeter-settings GUI. The changes are reflected in the .conf file

**EDIT**
I deleted the lightdm-gtk-greeter.conf file and reinstalled the package to get the original file back. Login now works perfectly with the GTK greeter. Thanks for all the help! I guess its true what they say about the Arch community wink

Last edited by tombbb (2016-05-06 16:45:46)

Offline

Board footer

Powered by FluxBB