7

The Debian image for the BeagleBone Black that they have on their website comes with a GUI by default. I'd like to completely disable the GUI, but in the simplest way possible. It is used as a headless device and doesn't need those resources sucked up.

I've successfully disabled it, but I feel my procedure is breaking things behind the scenes. All I'm doing is:

$ sudo apt-get remove lightdm

Questions

  • In retrospect, perhaps purge would've been better?
  • Can anyone see holes in the method, or recommend a better method?
chicks
  • 1,112
  • 1
  • 9
  • 27
Atomiklan
  • 231
  • 3
  • 6

4 Answers4

4

Add following to /boot/uboot/uEnv.txt:

## for BBB debian OS  
## this disables lightdm run from "/etc/init.d/lightdm"
## comment it to enable GUI
optargs=text
slm
  • 363,520
  • 117
  • 767
  • 871
atomic
  • 41
  • 2
3

You can set the "runlevel" in a systemd environment to runlevel 3 like so:

cd /lib/systemd/system
ln -sf multi-user.target default.target

References

slm
  • 363,520
  • 117
  • 767
  • 871
Justin
  • 31
  • 1
2

The main download site from BeagleBoard.org includes a link to http://elinux.org, click on it will show you a list of all images available. There you can download "console" images (instead of LXDE):

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Debian_Releases

Charles
  • 123
  • 4
2

Using the same approach that @Justin tried to show you can change your systemd runlevel to one that isn't graphical. This will stop any graphical UI from being loaded/used by your BeagleBoard.

NOTE: Many Linux distros now use Systemd and below I'm showing you how to enable/disable the various runlevels. Don't get hung up that it's from the Fedora FAQ on the subject, the commands are identical.

From the Fedora topic on Systemd:

systemd has the concept of targets which is a more flexible replacement for runlevels in sysvinit.

Run level 3 is emulated by multi-user.target. Run level 5 is emulated by graphical.target. runlevel3.target is a symbolic link to multi-user.target and runlevel5.target is a symbolic link to graphical.target.

You can switch to 'runlevel 3' by running

$ sudo systemctl isolate multi-user.target

You can switch to 'runlevel 5' by running

$ sudo systemctl isolate graphical.target  

How do I change the default target?

$ sudo systemctl set-default <name of target>.target

NOTE: I modified the above verbatim's slightly by adding sudo.

References

slm
  • 363,520
  • 117
  • 767
  • 871