Xserver cookie isn't valid for remote connections

Bug #1538748 reported by Mikhail Morfikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Triaged
Medium
Unassigned

Bug Description

Several months ago I posted a message on LightDM's mailing list (http://lists.freedesktop.org/archives/lightdm/2015-October/000879.html), in which I described the problem concerning remote network connections to the Xserver. In short, everything was just fine when the session was started via the "startx" command, but when I was using LightDM in order to start the session, I couldn't connect remotely to my machine. After some time, the cause was targeted here (http://lists.freedesktop.org/archives/lightdm/2016-January/000925.html ).

When using LightDM, even when the following options are added to the /etc/lightdm/lightdm.conf file, the Xserver is unable to receive remote connections:

    xserver-command=X -listen tcp -auth "$HOME/.Xauthority"
    xserver-allow-tcp=true

The problem is the cookie file which doesn't have the appropriate entry for the network connection. In the case of the "startx" command, it was something like this:

    $ XAUTHORITY=Xauthority-startx-local xauth list
    morfikownia/unix:0 MIT-MAGIC-COOKIE-1 0a7b2d573a4a722fda829ff57e48b70c
   192.168.1.150:0 MIT-MAGIC-COOKIE-1 5f84d468a9f2d34ea4399512c2729a3b

And in the case of LightDM, this:

    $ XAUTHORITY=Xauthority-lightdm-local xauth list
    morfikownia/unix:0 MIT-MAGIC-COOKIE-1 c95db8e522de76d8ad35d5117e20200a

When the Xserver is started via "startx" using the following command in the /etc/X11/xinit/xserverrc file, everything works fine:

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

I was advised to file a bug here, so I'm doing it because the feature is really useful for people who are using some kind of containers, for instance LXC, and want to be able to start GUI applications in secure environment.

Changed in lightdm:
status: New → Triaged
importance: Undecided → Medium
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.