Installing a Desktop GUI
If this is your first time installing a Linux server, one of the things that may surprise you once it is finished is that there is no desktop GUI. Once it has completed its installation, you are brought to a command prompt login screen. Logging in also brings you to a command line interface. There are no familiar Start buttons, no program icons to click, no need for your mouse at all in fact. What’s going on?!
On our standard desktops or laptops, we are used to having a GUI (Graphical User Interface) with buttons and menus for us to click. If you have experience with Windows servers also, there is a GUI for you to click your way around. Linux is different. While Linux desktop operating systems do indeed come with graphical interfaces and menus, etc, on servers this is done away with.
The thinking behind this decision is that, while you may be working with a GUI on your laptop all day long, you typically don’t use a GUI for interacting with your server on a day to day basis. For file servers, you will be connecting via file browsers; for a web server you will interact with it through your web browser; for a database server, applications connect across the network to manage or process data. Even for setting up and administering a server, there are web based interfaces through which you can do this work.
Thus the CPU cycles and memory used in displaying the graphical menus and mouse pointer could be put to better use in providing the services the server is being used for.
Finally, linux does provide a user interface on servers – the command line. It uses far less resources to display, is perfectly functional for doing the job, and while it may be less user-friendly than a desktop GUI, the thinking again is that it is not normal users who will be administering the server, but rather skilled and careful administrators.
With all that being said, if you want to, or need to, have a desktop GUI to work with, then this can certainly be installed. Linux has a number of popular desktop environments available to users, including Gnome, KDE, XFCE and LXDE. An important consideration is just how much resources each uses, particularly CPU and Memory (RAM). Gnome and KDE, for example, would be considered very resource heavy environments, while XFCE and LXDE use much less, as much as 50% less CPU by comparison.
A more lightweight desktop environment will also work better if you are connecting remotely via RDP, as there are less graphics and effects to be communicated over the network.
LXDE is considered to be the leanest of these desktop environments, but in my opinion this shows on the desktop, and the look and feel of it is not as appealing. Personally I find XFCE to be a nice combination of lean resource usage, excellent performance and nice, rounded off graphics and menus.
To install XFCE, simply run:
sudo apt-get install xfce4
The server will download about 600Mb of files, and quickly set them up for you. Once finished, if you have a mouse, keyboard and screen attached, you should see the graphical interface straight away. But what if your server is packed away in the attic or a press somewhere? How do you use a graphical interface over the network?
Remote Desktop Protocol (RDP) is a protocol used for connecting to a desktop session remotely. To do this, you need both an RDP server application running on your server, and an RDP client installed on the laptop you are going to connect from. To install RDP on your server, run:
sudo apt-get install xrdp
To connect to this, you need to run an RDP client on your laptop/desktop. On Windows, the built in RDP client is called Remote Desktop Connection. To run it, go to the Start menu, and type ‘mstsc’ and then enter the IP address of your server.
In the window that pops up, enter the username and password of a user on the server. This will then open up to show you the desktop you have just installed on your server.
Customising the XFCE Desktop
The XFCE Desktop is a rather nice looking desktop with a system panel along the top and one along the bottom for frequently used applications. The system menu drops down from the Applications menu on the top left and there is a clock on the top right. Your username is also shown on the top right, and clicking this gives you the menu of options to Log Out, Shut Down or Reboot the machine.
XFCE also has multiple workspaces which you can use. These are essentially multiple desktops, so you can have a web browser open on one, and click over to another to have the file manager open. By default there are 4 workspaces available, but you can change this by right clicking on the icon on the top right panel.
The first thing I would recommend it installing a good browser. I have found the default browser to be troublesome, so to install Chromium, Googles linux version of Chrome, open a terminal (Applications > Terminal Emulator) and enter:
sudo apt-get install chromium-browser
I have found also that the lower panel (Panel 2) prevents windows such as a browser from using the full screen when maximised. While the idea is that it is for frequently used applications, I don’t feel it is worth the space it takes up. To remove it, right click it, go to Panel Preferences and click the Red ‘-‘ icon beside the option for ‘Panel 2’.
Finally, I like to have shortcuts for the applications I am going to use the most on the top Panel. To add a shortcut for Chromium for example, right click the Panel, and go to Panel > Panel Preferences. Under the Items tab, click the Green ‘+’ symbol to add a new application. Chromium is not listed in the New Items menu, but what you want is the Launcher. This is an application which launches other applications. Select Launcher, click Add and then Close.
Click on the newly added Launcher, and click the grey Cog icon to edit it. Click the Green ‘+’ icon, and begin typing ‘Chromium’ in the Search bar. Click the entry for Chromium and click Add. Click Close and Close again on the Panel Preferences menu. You should now have a launcher for Chromium on your top Panel.