Wednesday 23 March 2016

Installing a minimalistic desktop environment on Fedora

Unfortunately in RHEL and it's derivatives the typical (or documented) way to install a desktop environment is through something like:

yum groupinstall 'Server with GUI'


yum groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts"

I find that there is a lot of unneeded bloat that is bundled in these groups - so this post will look at identifying the core packages that are needed to run a basic instance of X on the 'minimal' Fedora installation.

We can take a look at packages included in the groups with something like:

yum groupinfo "Fonts"

I will start by installing some important packages:

yum install xorg-x11-server-Xorg // This is the core xorg package.

yum install xorg-x11-server-common

yum install xorg-x11-drv-fbdev // This provides the driver for Linux kernel framebuffer devices that use X.

yum install xorg-x11-xinit

yum install xorg-x11-xauth

yum install dwm // A lightweight window manager with very few dependencies.

yum install lightdm // A lightweight display manager

Once installed we should generate our xorg.conf with:

cd /tmp
xorg :0 -configure
cp /etc/X11/xorg.conf

after attempting to launch X (startx) I got an error message complaining that no screens were found and it bombed out - after reviewing the logs (/var/log/Xorg*) I noticed the following error:

open /dev/dri/card0: No such file or directory

So lets probe for a video device:

yum install pciutils
lspci | grep VGA

00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter

I later found that the virtualbox graphics adapter is compatible with VESA - so we install the relevant drivers:

yum install xorg-x11-drv-vesa

and change the 'Driver' variable from 'fbdev' to 'vesa' under the device section in /etc/X11/xorg.conf.

I then got another error complaining about lack of OpenGL support (and again in bombed out):

AIGLX: Screen 0 is not DRI2 capable
AIGLX: reverting to software rendering
AIGLX error: dlopen of /usr/lib64/dri/ failed

To resolve we install the mesa driver package:

yum install mesa-dri-drivers

I also got a load of messages complaining about references to input devices that were not detected - so I installed the following package that allowed X to detect devices such as the mouse etc.

yum install xorg-x11-drivers

Although this time I didn't get any errors in the main logfile and there was no log file generated within:


 After a lot of messing around it trying to get it to work I finally (and rather annoyingly) realized that lightdm service has not been started! So to fix:

systemctl start lightdm
systemctl enable lightdm

and then finally we install the openbox window manager:

yum install openbox

and launch X:


I noticed even though I enabled the lightdm service upon reboot it was not booting into the GUI - so I checked the default runlevel (target) with:

systemctl get-default

Which came back with I then checked the available targets and noticed that '' was not currently enabled / available:

systemctl list-units --type=target --all

So to enable we should issue:

systemctl enable

and then ensure it is the default target on boot:

systemctl set-default


Post a Comment