Install and Configure
The first step is to determine what GUI you want. LXDE is a good choice because it runs very light, but it doesn’t include all the tools of a regular Ubuntu desktop. The next step then is to install the standard Lubuntu desktop on your server, with one of the following commands:sudo tasksel install lubuntu-desktop
Once the installation is done, the Light Display Manager (LightDM) may start up for you right away — it will on your next boot, in any case.
By default, GUIs are set to run on start-up. We’ll want to turn this off, since a “regular” boot for our machine should just be in “server mode.” This involves removing three scripts that start up LightDM:
- one in “/etc/init.d” (where the base script to start the service lives)
- one in “/etc/init”
- one in “/etc/rcX.d” (directories containing links to the scripts depending on runlevel)
- Back-up (don’t just delete) the “/etc/init.d/lightdm” file. You’ll need to be root to do so, which makes the “/root/” directory a nice place to keep it out of the way.
- Likewise, remove “/etc/init/lightdm.conf” and keep it somewhere safe.
- Next, you’ll need to remove all links in “/etc/rc.d/*” that pointed to that. Fortunately, there’s a nice tool that will do so for you:
sudo update-rc.d lightdm remove
startx
command, but first you need to create a config file. Create a new text
file in your home directory called “.xinitrc”, and for LXDE, add the
following line followed by a return:exec startlubuntu
startx
This will allow you to start up LXDE when you need it, and when you exit, you’ll be back to command-line heaven.
Comments