0

This question is an exact duplicate of:

  1. I'm relatively new to both raspberry pi and unix.
  2. In spite of that, I'm teaching intro to programming classes at a school using raspberry pi's.
  3. These pi's are NOT connected to the internet.
  4. Each student has a separate account I created for them. The student accounts do not have sudo privileges. Only I do when I log in as pi.

Please note: I have been researching this problem for at least a month. Every proposed solution I have tried has failed.

PROBLEM: Seemingly at random, one of the pi's will stop allowing students or pi to log in from the gui login screen. I can login through tty1, but when I run startx I get an error that says...

FATAL ERROR
Could not write pid to lock file in /tmp/.tX1-lock

xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

Attempted solutions that failed:

  1. Deleting .Xauthority
  2. Deleting .xsession-errors and/or .xsession-errors.old
  3. Deleting .tX1-lock
  4. Deleting .tX0-lock
  5. Examining various permissions for files on machines that still work and the machine that doesn't (no differences noticed, but I don't really know where to look)
  6. Running raspi-config in order to expand the file system. Already expanded because the OS was installed with NOOBS.

The ONLY method that has worked has been to back up the student data onto a flash drive and then re-install the operating system using NOOBS. But I have one or two machines failing exactly like this EACH WEEK! Please tell me there is a simpler fix than an OS re-install!

marked as duplicate by Milliways, Community Mar 25 at 17:21

This question was marked as an exact duplicate of an existing question.

  • Agreed. I had not found that question. I deleted a bunch of the log files and that did the trick on the machine that acted up today. Please close this question. Thanks! – Harold Goodwill Mar 21 at 19:41
  • 1
    You can just delete your own question. – Ingo Mar 21 at 20:13
  • 1
    If you are setting up a number of cards NOOBS is not the best option. You would find a normal Raspbian installation easier - not to mention less wasteful of SD Card space. – Milliways Mar 21 at 23:01

Browse other questions tagged or ask your own question.