2

Steps to reproduce:

  1. copy latest Raspbian Jessie Lite image to sdcard
  2. install updates, reboot
  3. run raspi-config, choose "boot into Desktop" from boot menu
  4. install lightdm package as suggested by raspi-config
  5. reboot

After these steps cli is only loaded and lightdm service shows only this:

sudo systemctl status lightdm
 lightdm.service - Light Display Manager
   Loaded: loaded (/lib/systemd/system/lightdm.service; enabled)
   Active: failed (Result: start-limit) since Thu 2017-03-30 11:05:44 UTC; 39s ago
     Docs: man:lightdm(1)
  Process: 854 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
  Process: 849 ExecStartPre=/bin/sh -c [ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lightdm" ] (code=exited, status=0/SUCCESS)
 Main PID: 854 (code=exited, status=1/FAILURE)

Mar 30 11:05:44 raspberrypi systemd[1]: Failed to start Light Display Manager.
Mar 30 11:05:44 raspberrypi systemd[1]: Unit lightdm.service entered failed state.
Mar 30 11:05:44 raspberrypi systemd[1]: lightdm.service holdoff time over, scheduling restart.
Mar 30 11:05:44 raspberrypi systemd[1]: Stopping Light Display Manager...
Mar 30 11:05:44 raspberrypi systemd[1]: Starting Light Display Manager...
Mar 30 11:05:44 raspberrypi systemd[1]: lightdm.service start request repeated too quickly, refusing to start.
Mar 30 11:05:44 raspberrypi systemd[1]: Failed to start Light Display Manager.
Mar 30 11:05:44 raspberrypi systemd[1]: Unit lightdm.service entered failed state.

2 Answers 2

2

GUI in Linux is modular and client-server. A display manager (as its name suggests) manages your displays, and nothing more. You will need an X server (which doesn't have to be running on the same computer BTW) to have any displays in the first place, and a desktop environment if you want to have something on your display besides a mouse pointer.

The relevant packages to install are xserver-xorg and lxde, but there's a high chance that I have missed something, so if your goal is to use the GUI, just install Raspbian with GUI included.

5
  • Thanks, I'll try that. raspi-config only suggest to install lightdm package, I thought that raspi-config tool is smart enough to give good suggestion, but it could be that you are right and something is still missing. Maybe this is a bug in dependencies for lightdm package.
    – valentt
    Commented Apr 2, 2017 at 22:40
  • 1
    @valentt It's not a bug, this is by design. You can configure lightdm to use the X server installed on your PC if you want, meaning you don't have to install it on the RPi. You may also want to run without a desktop environment (think web kiosks). This is why those are not dependencies of lightdm Commented Apr 3, 2017 at 7:44
  • @Dmitri you were right, after installing xorg and lxde packages now Raspbian boots into gui desktop. I know that Linux is modular, but I would still argue that this is a bug in raspi-config. When I open raspi-config two options in boot menu are "cli" or "desktop" (no mention of "no X server kiosk mode" or "modular dekstop" that uses remote X server. There is plain vanilla "desktop" option and after it is chosen only suggestion, which I argue is wrong (ie a logical bug), is that it suggest installing lightdm package and nothing else.
    – valentt
    Commented Apr 3, 2017 at 17:28
  • 1
    @valentt Sure, I was arguing that lightdm should not have xserver-xorg as a dependency. I'm not familiar enough with raspi-config, but yeah, it would be nice if it did such checks for you when you select "Boot to desktop". Commented Apr 4, 2017 at 8:44
  • I've just tried this and just apt-get install xerver-xorg lxde (including the recommonded packages) is all you need to add to a fresh install of Raspbian 8 to get an LXDE (not PIXEL) desktop. This does, however, increase disk space usage from about 900 MB to 2.3 GB (1.9 GB after apt-get clean), and includes some moderately large things you may not use, such as firefox-esr (80 MB) and gnome-user-guide (40 MB). Note too that the apt-get install can take quite a long time on an SD card—much longer than a fresh install of the full non-light version.
    – cjs
    Commented Apr 6, 2017 at 15:48
1

I probably didn't do all this correctly, but maybe this will help someone.

After spending much time trying to get OpenCV working, I found ready to use Image based on Lite. But still in the very Noob stage, decided to get a GUI installed and found this/ [GUIDE] [Raspbian Lite with RPD/LXDE/XFCE/MATE/i3/Openbox/X11 GUI]1 Then I installed synaptic and loaded up what I needed without any of the troubles I was having with the OpenCV installation attempts.

Should anyone be interested in the Image: Ready-to-use Image: Raspbian Stretch + ROS + OpenCV

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.