Karel Adams
Posts: 4
Joined: Sat Oct 17, 2015 9:30 am

X not starting at boot ; /usr/bin/X not found

Sat Sep 07, 2019 6:43 am

My Raspberry PI had been unused for several weeks. Today I wanted to use it again, it booted as usual but there comes no graphic desktop. Booting terminates at the text mode "login:" prompt. I could log in, as root, and executed startx command. This came back with: "/usr/bin/X not found" which sounds alarming. Do I need to repair the package, or reinstall it? How to do it? O/S version is Raspbian 9 (stretch).

root@rpi-nav2:~# startx

/etc/X11/xinit/xserverrc: 3: exec: /usr/bin/X: not found
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: X not starting at boot ; /usr/bin/X not found

Sat Sep 07, 2019 8:34 am

Karel Adams wrote:
Sat Sep 07, 2019 6:43 am
My Raspberry PI had been unused for several weeks. Today I wanted to use it again, it booted as usual but there comes no graphic desktop. Booting terminates at the text mode "login:" prompt. I could log in, as root, and executed startx command. This came back with: "/usr/bin/X not found" which sounds alarming. Do I need to repair the package, or reinstall it? How to do it? O/S version is Raspbian 9 (stretch).

root@rpi-nav2:~# startx

/etc/X11/xinit/xserverrc: 3: exec: /usr/bin/X: not found
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

This might be a symptom of having no free space left on the root filesystem of your Operating System.

The

Code: Select all

df -h
command might reveal this, there should be no entries at or very near to 100%.

Karel Adams
Posts: 4
Joined: Sat Oct 17, 2015 9:30 am

Re: X not starting at boot ; /usr/bin/X not found

Sat Sep 07, 2019 8:59 am

Thanks! I ought to have thought of that, but didn't. Unfortunately, this is not the cause: / has 2,7 GB free, or 22% of its 13GB capacity. /boot is not full either - not that that one would be very relevant for this issue, I think. There are no other filesystems, except tmpfs
My suspicion is that the issue was caused by an ungentle shutdown; I tried to fsck but it wouldn't work on the root fs, because it is mounted. Would have to boot from an install image, I suppose.

Return to “Raspberry Pi OS”