# Xorg and friends

Xorg is the most popular display server among Linux users. You can find my X config in .dotfiles/X11.

yay -Ss xorg xorg-xinit xorg-xmodmap xterm xclip

# Xinitrc


When/if you enable #display manager it will run your WM/DE as a session and most of them are using #Xprofile.
You can also run xinit as a session, or even a standalone browser.

You can copy the default xinitrc file from /etc/X11/xinit/xinitrc,
you should edit it before execution, since we didn't install twm and xorg-xclock:

cp /etc/X11/xinit/xinitrc ~/.xinitrc

You can execute xmonad or any other WM/DE with .xinitrc as simple as:

exec xmonad


To execute .xinitrc run startx or xinit. //

# Xresources

~/.Xresources file is useful if you want to add a color theme for some X applications, or configure X fonts appearance, or e.g. change the Xcursor theme.
Check wiki examples. You also can check my config.


Most Display managers load the ~/.Xresources file on login.

# Touchpad


Laptop specific configuration.

For touchpad tap-to-click edit /X11/xorg.conf.d/30-touchpad.conf you can also find it in my dotfiles.

yay -S xf86-input-libinput

# Keboard

If you want to indicate that the current keymap table should be printed on the standard output in the form of expressions that can be fed back to xmodmap.

xmodmap -pke > ~/.Xmodmap


To temporary change your keyboard layout:

setxkbmap dvorak

# Video drivers

Check your video card model first:

lspci | grep -e VGA -e 3D

# Window Manager/Desktop Environment

For Linux newcomers better decision could be to try desktop environment like KDE or GNOME first.

However you could install multiple Window Managers or DE and change them with this script or with display manager.
It is also possible to replace default DE's window manager with desired one, e.g.: xmonad in KDE.

# Xmonad

My favorite tiling window manager, spending 99% of my time using it. See #Xmonad configuration.

# Xmonad with KDE

Install #KDE first. Create a directory ~/.config/plasma-workspace/env if it does not already exist. Create a file there called set_window_manager.sh and add this:

export KDEWM=/usr/bin/xmonad

Restart your session and enjoy xmonad with KDE.


You should have #xmonad config in ~/.xmonad/xmonad.hs.


Read more about KDE5.

yay -S plasma kde-applications kdeconnect powerdevil
sudo systemctl enable sddm.service # enable KDE login manager


Read more about GNOME.

yay -S gnome gnome-extra
sudo systemctl enable gdm.service # enable GNOME login manager

# Display Manager

# Xprofile

Xprofile allows you to execute commands at the beginning of the X user session. It is similar to #xinitrc.
If you want to add/modify this file, means that you decided to use xmonad or any other WM.
Run programs you wish before the window manager is started:

# Start WM
exec xmonad


Xmonad only launching here because you can launch commands like background or composite manager from xmonad.hs startup hook.
Should be obvious, that to launch programs they should be installed first.



If you picked GNOME, or any other Desktop Environment, you probably already have a Display Manager, so just skip this step. SDDM is a part of #KDE group.

yay -S sddm
sudo systemctl enable sddm.service # enable Simple Desktop Display Manager

SDDM will load US by default, if you want to use specific keyboard layout rather then US, generate it with localectl set-x11-keymap:

localectl set-x11-keymap dvorak