3

I was working on my Pi when suddenly it stuck. I attempted to restart but upon entering startx I got the error "Could not write pid to lock file in /tmp/xtX0-lock'

I've looked around and many people advised running the df -h Command. I have done that and nothing has changed for me.

Looking at the error screen it seems to be out of space, but placing it on my windows computer it shows me space. But even if it really is out of space. How do I clear up some items or what can I delete as I really have scripts I need. Thank you

Error SCreen

Grace
  • 103
  • 1
  • 2
  • 7

2 Answers2

1

This is usually caused by a stale lock file from a crashed previous session. As root, look for an existing /tmp/xtX0-lock and delete it, then try starting X again.

Being out of drive space will also do it. Try deleting everything under /var/log, then use sudo apt-get erase <packages...> to perhaps remove some packages you don't actually need.

NOTE: Don't delete the directory structure under /var/log...just delete files; otherwise some services that expect certain log directories to exist will fail to start.

Realistically, 4GB is much too small a root device on a system which runs X. Image the SD card onto a larger one and expand the fs.

0

I had the same situation after installing opencv from source files. even erasing of files was only hardly possible - sometimes with crazy error msgs.

i uninstalled the gimp package. i deleted the source files of opencv. after deleting the whole opencv the strange effects were gone.

bertil
  • 1