How to install GUI desktop on a server?
Solution 1
Depending on which desktop you wish to install, you install the the meta-package that installs all the necessary packages. You can use apt-get
or aptitude
to do this.
sudo apt-get install ubuntu-desktop
installs the Unity desktop
sudo aptitude install kubuntu-desktop
would install the KDE desktop
Other desktop meta-packages are xubuntu-desktop
, ubuntu-gnome-desktop
, lubuntu-desktop
, and edubuntu-desktop
.
Solution 2
If you wan to install a graphical desktop manager without some of the desktop addons like Evolution and OpenOffice, but continue to use the server flavor kernel use the following command
sudo aptitude install --without-recommends ubuntu-desktop
Solution 3
sudo apt-get install ubuntu-desktop
Solution 4
If you just need to run virtual GUI (GUI exsists but you dont need to see it) on the computer for testing or other purposes.
sudo apt-get install xvnc4viewer
Is a setup I have.
:)
Solution 5
From Ubuntu 20.04, we could use sudo apt install ubuntu-desktop-minimal
to minimal install ubuntu-desktop
, it removes around 80 packages (and related cruft) from the default install, including Thunderbird, LibreOffice and so on.
The command could replace the old command sudo apt-get install --no-install-recommends ubuntu-desktop
or sudo aptitude install --without-recommends ubuntu-desktop
.
Related videos on Youtube
Paul Lindner
Defining quotes: "The present letter is a very long one, simply because I had no leisure to make it shorter." — Blaise Pascal "The early bird gets the worm, but the second mouse gets the cheese." —Steven Wright
Updated on September 17, 2022Comments
-
Paul Lindner almost 2 years
After installing Ubuntu server how do I install the desktop environment?
-
Paul Lindner almost 14 yearsFor onlookers, here's additional info I found useful that's on the same wavelength as the answer - ubuntugeek.com/install-gui-in-ubuntu-server.html
-
Scaine over 13 yearsSo, the server isn't running the desktop, but you can still VNC from a client machine and get a desktop? That would be perfect for my needs (dunno about the OP).
-
hookenz about 10 yearsyeah you see a graphical shell.
-
Meirion Hughes about 10 yearsdam... started the install from the answer and scrolled down to this. :(
-
JHowIX over 8 yearsmy version of aptitude doesn't have that option. It does have --without-recommends
-
AZhu over 8 years@JHowIX try using apt-get instead, that one worked for me.
-
Hover Ruan about 8 years
sudo apt-get install --no-install-recommends ubuntu-desktop
orsudo aptitude install --without-recommends ubuntu-desktop