I am trying to run xserver on a read-only raspbian. I get the following errors.
root@ClientX:/var/log# startx
xauth: error in locking authority file /root/.Xauthority
xauth: error in locking authority file /root/.Xauthority
(EE)
Fatal server error:
(EE) Cannot move old log file "/var/log/Xorg.0.log" to "/var/log/Xorg.0.log.old"
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE)
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
xauth: error in locking authority file /root/.Xauthority
root@ClientX:/var/log#
So I tried to solve one problem at a time, but didn't get too far. First, I tried linking the .Xauthority file to /tmp which is mounted on tmpfs and it's writable.
root@ClientX:~# ls -la
total 28
drwx------ 3 root root 4096 Oct 27 07:52 .
drwxr-xr-x 21 root root 4096 Jan 1 1970 ..
lrwxrwxrwx 1 root root 16 Oct 27 07:52 .Xauthority -> /tmp/.Xauthority
I tested it by writing to .Xauthority "echo hello > .Xauthority" and it's writable. But still, when root tries to startx, it still complains for not being able to lock .Xauthority.
I also found this in /usr/bin/startx and changed it to point to /tmp, but no luck either.
if [ x"$enable_xauth" = x1 ] ; then
if [ x"$XAUTHORITY" = x ]; then
XAUTHORITY=$HOME/.Xauthority
export XAUTHORITY
fi
And I also tried setting the XAUTHORITY variable in /etc/rc.local, in ~/.profile and in /etc/environment but it didn't work either.
And I didn't even get started on the second problem yet
Cannot move old log file "/var/log/Xorg.0.log" to "/var/log/Xorg.0.log.old"
I tried finding the xorg configuration file and see if there's an option to write .Xauthority and log files to another path, so I can put them in /tmp, but I read that xorg.conf doesn't exist any more.
Any suggestions on how to run xserver on a read-only raspbian?