2

I'm trying to start the gui on raspbian jessie on a pi 3, using the startx command. I get back an error like this:

Fatal server error:
Could not create lock file in /tmp/.tX0-lock

and

xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
xauth:  error in locking authority file /home/pi/.Xauthority

I'm quite new to Linux and don't know how to proceed from here. It seems that my /tmp dir is read-only as touch /tmp/test returns a message saying that, but if that's the problem I don't know the workaround. Thank you.

2
  • I would guess the xserver is already started. What happens if you press Ctrl-Alt-F7?
    – Bex
    Commented Aug 22, 2017 at 6:01
  • Nothing (tty7 does not exist on my system). I can get to tty2-6, and tty1 (Ctrl+Alt+F1) takes me back to the original prompt (no X).
    – anvoice
    Commented Aug 22, 2017 at 7:38

1 Answer 1

1

In my case, the following command worked to launch X:

sudo mount -o remount, rw /

If I understand correctly, this gave X access to the /tmp directory that it wanted. Before the filesystem was read-only. Now tty7 is running the desktop properly.

1
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Commented Dec 15, 2019 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.