Comment 2 for bug 1206533

Revision history for this message
Bevis King (b-king-surrey) wrote : Re: Removing the /unix specification from the /var/run/lightdm/root/:0 file

I've created the following script which does the necessary - I've called it enabletcp and placed it in /etc/lightdm:

#/bin/sh
#
# enable TCP mode MIT-MAGIC-COOKIE-1
#
HOSTNAME=`hostname`
COOKIE=`(cd /var/run/lightdm/root; xauth -f :0 list | grep "$HOSTNAME/unix")`
CLEANED=`echo $COOKIE | sed -e 's/\/unix//'`
(cd /var/run/lightdm/root; xauth -f :0 add $CLEANED)
exit 0

and I've added:
display-setup-script=/etc/lightdm/enabletcp

to the /etc/lightdm/lightdm.conf file.