Low Orbit Flux Logo 2 F

Arch Linux How to Install XFCE and X Windows

If you are using Arch to power a desktop system you will probably want to run a nice, relatively lightweight desktop environment like XFCE. On Arch you will have to install XFCE yourself.

Short answer: If you want to run install XFCE on Arch Linux and you already have X Windows installed, just run the following. The first command updates the system and database. The second command installs XFCE.

sudo pacman -Syyu
sudo pacman -S xfce4 xfce4-goodies

This is all you need to do to get it installed but there is more you should know and more you should probably do. If you haven’t yet installed X Windows, you will definitely need more information. Keep reading for all of the details.

Install X Windows

It isn’t hard to install Xorg on Arch Linux. You can install Xorg with this one command ( 3 packages ):

sudo pacman -S xorg xorg-xinit xterm

Here is an explanation of some of the packages you might see people recommending.

xorg includes xorg-server but not xorg-xinit
xorg-server-utils doesn’t exist anymore
xorg-xinit installs: xorg-xinit, inetutils, includes /etc/X11/xinit/xinitrc
xorg-apps group, everything in it is already included in xorg
xterm You will probably want/need this

If you are running on VirtualBox you will want to install guest utils. If you are on a physical machine, don’t install this.

pacman -S virtualbox-guest-utlis

Install some extras that you should have. Xterm is important. Xeyes and xclock aren’t quite so important.

pacman -S xorg-xeyes xorg-xclock xterm

Install Drivers

You may end up needing video drivers. Install the corresponding package for your hardware. You might also be completely fine without them.

sudo pacman -S nvidia nvidia-utils    # NVIDIA 
sudo pacman -S xf86-video-amdgpu mesa   # AMD
sudo pacman -S xf86-video-intel mesa    # Intel

You don’t need this but you might want to install ALSA. You can test it with the alsomixer and speaker-test command.

pacman -S alsa-utils
alsamixer
speaker-test -c2

Install XFCE

Install XFCE and some extra packages that are nice to have. You can leave out the xfce4-goodies package if you don’t want extras installed like the text editor for example.

sudo pacman -S xfce4 xfce4-goodies

During the installation you will be prompted to select different options. You can just press enter to select the defaults unless you have a preference. Press ‘y’ to confirm.

You can configure XFCE to start when X windows starts (Xinit) or use a display manager (LightDM or LXDM). We’re going to cover both of these methods here.

Starting with Xinit ( startx )

This will configure XFCE to run anytime you start X Windows. If you choose this option, you will generally start X Windows manually by typing startx.

Edit this file:

nano /etc/X11/xinit/xinitrc

Uncomment this line:

exec startxfce4

Add execute permissions:

chmod +x .xinitrc

Start X Windows:

startx

If it was already running, kill it and start again.

Starting with LXDM

Installing LXDM is optional if you just want to start X manually or already have a DM. You won’t already have one if you just installed X windows. A display manager will allow you to login and select a graphical environment to launch. I actually prefer LightDM over LXDM. See the next section for more on this.

sudo pacman -S lxdm
sudo systemctl enable lxdm

Starting with LightDM

This is another display manager. I like it because I am more familiar with it.

sudo pacman -S lightdm lightdm-gtk-greeter
sudo systemctl enable lightdm

Reboot your system:

sudo reboot

Once the system boots, select “Xfce Session” from your display manager and then login as usual.

References