Adding graphical logins to a text only system.

I often find myself in a situation where I have an already installed Linux box, and want to add for graphical logins. This may be because I have installed from the Fedora server DVDs (which no longer include graphical logins), or because I am using a discless Fedora machine installed by following these instructions.

During a normal graphical installation process, the installer will probe your hardware and install the correct drivers for your video card, however if you are adding Xorg to an existing installation then you no longer have that option and need to perform some steps manually

  1. Firstly, use dnf to install Gnome.

dnf groupinstall gnome
On a Fedora 23 basic install, this would install an additional 706 packages.

  1.  We now need to identify the video card.

dnf install pciutils
lspci | grep VGA

  1. Find the correct driver for your video card, the following will list all drivers in your repo.

dnf list xorg-x11-drv*
Then install the one that looks as if it will match your video card (sometimes you can ignore this step and use the generic VGA drivers, although performance may suffer).
dnf install xorg-x11-drv-vesa

  1. I found that I had to install a couple of additional packages

dnf install mesa-libGL mesa-dri-drivers xorg-x11-drv-evdev xorg-x11-drv-fbdev

  1. You should now be able to test your setup by running

When finished, simply log out of the graphical console.
If this does not work, then you will need to look at the logfiles in /var/log/Xorg* for clues as to what has gone wrong.

  1. You can now start gdm to check whether the login prompt is working

systemctl start gdm

  1. If the above doesn’t work, sometimes I have found that I need to disable “Wayland”.

This is done by editing vi /etc/gdm/custom.conf and deleting the ‘#’ at the start of the line WaylandEnable=false Then try starting gdm again.

  1. Once this is all working, you can set it to run by default on system boot.

ln -fs /lib/systemd/system/ /etc/systemd/system/

  1. You should now be able to reboot and login graphically. Once logged in, setup the monitor arrangement (i.e. if you have multiple monitors, then ensure that they are in the correct order)
  1. If the monitor order is incorrect at the initial login prompt, then copy your user’s monitor config to the system default.

cp ~/.config/monitors.xml /var/lib/gdm/.config

Leave a Reply

Your email address will not be published. Required fields are marked *