Will the desktop be consuming resources if Im not using it? If so, how do I turn it on/off?
3 Answers
I assume you have a clean install of Ubuntu Server. The apt command is equivalent to apt-get. I've tested all myself (except the first one). If you want a remote desktop like vnc server, you will need at least 3,4,5 or 6. See more info here: https://help.ubuntu.com/community/ServerGUI
Run GUI applications without GUI
sudo apt install xauthThen any gui application that you install will also install the required dependencies. After you can connect with
ssh -Xcommand and run any gui application with X forwarding (never tried it with just xauth installed).Minimal GUI:
sudo apt install xorg sudo apt install openbox --no-install-recommendsRun the command
startxand openbox will start (you can open a terminal there and run any application you want)Minimal GUI with display manager:
sudo apt install xorg sudo apt install lightdm-gtk-greeter --no-install-recommends sudo apt install lightdm --no-install-recommends sudo apt install openbox --no-install-recommendsAfter reboot you will see the lightdm login menu (I don't know how you can make it not to start automatically but I don't think it consumes too much resources when you haven't logged in). Maybe some themes won't appear correct, so if you don't mind more dependencies install all packages in the same order without the
--no-install-recommendsoption.A more functional minimal desktop environment (the one I use)
sudo apt install xorg sudo apt install lightdm-gtk-greeterInstall lightdm-gtk-greeter first or it will install unity-greeter as dependency:
sudo apt install lightdm sudo apt install lxde-core sudo apt install lxpolkit #(pkexec can't run without it) sudo apt install lxsession-logout #(logout button doesn't work without it)A full lightweight desktop environment
sudo apt install lubuntu-coreIt will install all dependencies like xorg, ligthdm, alsa and many more things.
A bit heavier desktop environment
sudo apt install xubuntu-coreIt will install all dependencies like xorg, ligthdm, alsa and many more things.
You can use the --no-install-recommends option at 5 and 6 but you may need to install additional packages for the full desktop experience.
- 207,228
- 4,501
You can install desktop environments with sudo apt --no-install-recommends install lubuntu-desktop. This would be very lightweight
Thanks to Nick Weinberg from the comments: sudo apt install --no-install-recommends lubuntu-core should be better
- 331
- 3
- 15
Two additional options you can use in SSH connection
Say a newly install application has a web administration interface that can only be accessed via localhost by default. You can forward communications via ssh.
Additionally, you can install a web browser on the server and use x11 forwarding to transmit the application window display through ssh to the client.
Because x11 forwarding is transmitting images, it is usually slower than port forwarding. Both can be useful tools depending on your situation.
- 101
- 3