Install Graphical Desktop for ClearOS 7
A desktop environment is useful for certain applications which require a full graphical desktop manager. For simplicity and security, ClearOS comes with only the graphical console for enough Webconfig components to enable remote administration through a web browser.
Preparation
You will need to install a great deal of packages and also be able to reboot the system. Because you will need to reboot, you can install the packages remotely over SSH or you can do so at the console by pressing Ctrl+Alt+F2.
Installing Packages
From command line, run the following:
yum update
The purpose of this command is to get the packages up to date from the subscription that you are working from. The installation of the ClearOS Desktop will update packages from additional repositories and you will want to ensure that your system is already up to date to limit the number of packages that will be sourced in your install.
yum install gnome-classic-session gnome-terminal control-center liberation-mono-fonts firefox
There will be quite a few packages that get downloaded and installed with these two commands.
Setting the System to Launch Graphically
To make the system start each time in GUI, run the following from command prompt to unlink the current launch target:
unlink /etc/systemd/system/default.target
Now, link in the graphical system:
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
Reboot your system:
reboot
Logging In
Upon reboot, you should be presented with a grey screen with the day and hour listed at the top. There are also controls for usability, sound, and power functions. In the center of the screen it will say 'Not listed?' This is because the system will not list your only user by default under ClearOS, namely 'root'. Click on 'Not listed?' and you will be able to put in the 'root' username. Click Next. Supply the password for 'root' and then click 'Sign In'.
Congratulations. If all is working well, your system is now converted to graphical mode with an interactive desktop.
You can even run Webconfig for the local machine by navigating to https://localhost:81 in the Firefox Web Browser.
Setting up Remote Access to the Graphical Desktop with VNC
Install VNC server and create user
yum install tigervnc-server
Then:
useradd -r vncuser
Setup systemd service parameters from template
cp /lib/systemd/system/[email protected] /etc/systemd/system/vncserver@:1.service
Edit '/etc/systemd/system/vncserver@:1.service' and replace both entries of 'USER' with vncuser. For example:
sed -i 's//vncuser/' /etc/systemd/system/vncserver@:1.service
Setup vncuser password and service
mkdir -p /home/vncuser chown vncuser /home/vncuser su vncuser
Then:
vncpasswd
Finally:
vncserver
Run this once and then press ctrl+d to exit back to root
Setup daemon and configure to run
systemctl daemon-reload systemctl enable vncserver@:1.service reboot
You can now download your favourite VNC viewer to your client (e.g. TightVNC for windows) and connect to your display by using your ClearOS address “hostname:1” or “ipaddress:1”. If you have the firewall enabled you may need to open up port 5901+
It should start automatically after boot, but you can also call manually with:- systemctl start vncserver@:1.service and check status with systemctl start vncserver@:1.service
P.S if you want to change the screen resolution, connect via VNC, and go to top left hand menu Applications → Settings → Displays
Changing the Default Resolution
If you want to change the default resolution, you can modify this line in your /etc/systemd/system/vncserver@:1.service file:
ExecStart=/usr/sbin/runuser -l-c "/usr/bin/vncserver %i"
To:
ExecStart=/usr/sbin/runuser -l vncuser -c "/usr/bin/vncserver %i -geometry 1600x1200"
If you change this, you will need to reload the systemd files and restart the service:
systemctl daemon-reload systemctl restart vncserver@:1.service
Special Considerations - HPE MicroServer Gen10
If you need multi-monitor support for the graphical user interface you MUST install the driver from AMD to support this. This is a secondary driver to the one that comes default on ClearOS. As mentioned, ClearOS does not typically use a monitor for its normal operations so this driver was not included when you installed ClearOS. If your MicroServer came pre-installed with ClearOS then you can find the driver in the /boot/utilities subdirectories but our recommendation is to download the latest version from the ClearCenter FTP site:
- ftp1.clearos.com
- username: pub
- password: pub
- path: pub/MicroServerGen10/drivers