[LightDM] Magic cookie doesn't work - no protocol specified

Mikhail Morfikov mmorfikov at gmail.com
Thu Oct 29 20:45:04 PDT 2015


When I start an X-session via startx on my debian distro, I can get the
output of the two following commands:

$ xauth extract - $DISPLAY
morfikownia0MIT-MAGIC-COOKIE-1’E!ö½o`q!SD„%

$ xauth extract - morfikownia.mhouse.lh:0.0
À¨–0MIT-MAGIC-COOKIE-1­Ê¹2y0ºˆ%

I know that the output is a little unreadable, but the most important
thing is that I get the output from the two commands above. When I send
that cookie to another machine using this command:

$ xauth extract - morfikownia.mhouse.lh:0.0 | ssh -x morfik at 192.168.10.20 xauth merge -

I can get access to this X-server from that machine, and everything works
as expected.

When I start am X-session via LightDM, the command:

xauth extract - morfikownia.mhouse.lh:0.0

returns nothing, or actually it gives me the following message:

"No matches found, authority file "-" not written"

I can, of course, use the following command to get the cookie:

xauth extract - $DISPLAY

and then send it via:

$ xauth extract - $DISPLAY | ssh -x morfik at 192.168.10.20 xauth merge -

But in that case, when I try to connect remotely to this X-server, I'm
unable to do it. I get a message that "no protocol specified", and nothing happens.

I think I have the exact same options set in both cases, i.e. in the /etc/X11/xinit/xserverrc file I have the following line:

exec /usr/bin/X -auth "$HOME/.Xauthority" -listen tcp "$@"

And in the case of LightDM I have these options set in its config file (/etc/lightdm/lightdm.conf):

egrep -v ^# /etc/lightdm/lightdm.conf
[LightDM]
greeter-user=lightdm
minimum-display-number=0
minimum-vt=7
logind-check-graphical=true
log-directory=/var/log/lightdm
run-directory=/var/run/lightdm
cache-directory=/var/cache/lightdm

[Seat:*]
xserver-command=X -listen tcp -auth "$HOME/.Xauthority"
xserver-allow-tcp=true
greeter-session=lightdm-gtk-greeter
greeter-hide-users=false
greeter-allow-guest=false
greeter-show-manual-login=true
greeter-show-remote-login=true
user-session=openbox
allow-user-switching=true
allow-guest=false
autologin-guest=false
autologin-user-timeout=0
autologin-in-background=false

[XDMCPServer]

[VNCServer]

Do you know why it fails to connect to the X-server when LightDM is used? Is there a way to fix it?


More information about the LightDM mailing list