ArchLinux Tutorial, Part 2: X Window System and I3 Installation
Part -1 Basic ArchLinux Installation
Part -2 X Window System and I3 Installation
Part 3: I3 Configuration and Operation
In the 1st part, we manage to install bear bone ArchLinux and have access to the shell. In this article will cover the installation of X Window System, I3, and a few useful tools that can make us more productive.
I3 s a dynamic tiling window manager inspired by wmii and is entirely different from Desktop Managers you may be used in the past like GNOME or KDE. I3 windows are designed to occupy the entire desktop space. It supports tiling, stacking, and tabbing layouts, which it handles dynamically.
In the below example ArchLinux X Window System and I3 we will get installed on Nvidia GeForce GTX 780 video card and the system have Intel Integrated Graphics Controller that we will need to disable.
Note: your video card may be different and you may need to install different video drivers, please consult Archlinux Wiki for correct video drivers installation
Find your video card
lspci | grep -e VGA -e 3D
The first step is to disable Intel Integrated Graphics Controller
echo “install i915 /bin/false” | sudo tee --append /etc/modprobe.d/blacklist.conf && \cat /etc/modprobe.d/blacklist.conf
Before proceeding with the installation of the X-org is a good idea to update the system to the latest packages available.
sudo pacman -Syyuu && \
yay -Syyuu
Installing Xorg packages, i3 and video drivers
sudo pacman -S nvidia nvidia-utils nvidia-settings xorg-server xorg-apps xorg-xinit i3 numlockx -noconfirm -needed
Note: Nvidia non open source drivers may conflict with nouveau OS drivers and in below case to make drivers work I needed to blacklist nouveau drivers
cat /usr/lib/modprobe.d/nvidia.confblacklist nouveau
Install Display manager
I am using lightdm as is very light and fast display manager but you can install any other Display Manager you are familiar with. Ex. GDM, LXDM, XDM etc.
sudo pacman -S lightdm lightdm-gtk-greeter -noconfirm -needed
Installing additional fonts (Optional) but highly recommended
sudo pacman -S noto-fonts ttf-ubuntu-font-family ttf-dejavu ttf-freefont ttf-liberation ttf-droid ttf-inconsolata ttf-roboto terminus-font ttf-font-awesome -noconfirm -needed
Installing sound drivers and tools
sudo pacman -S alsa-utils alsa-plugins alsa-lib pavucontrol -noconfirm -needed
Installing additional tools for i3 productivity (Optional) but highly recommended
sudo pacman -S rxvt-unicode ranger rofi conky dmenu urxvt-perls perl-anyevent-i3 perl-json-xs -noconfirm -needed
rxvt-unicode is a customizable terminal emulator
ranger is a text-based file manager that run in the shell and navigation is similar to vim key bindings.
dmenu is a fast and lightweight dynamic menu for X
rofi is a window switcher, run dialog, ssh-launcher
conky is a system monitor software for the X Window System
Installing additional tools for shell and ranger (Optional) but highly recommended
sudo pacman -S atool highlight browsh elinks mediainfo w3m ffmpegthumbnailer mupdf -noconfirm -needed
Installing X Window applications (Optional)
sudo pacman -S chromium firefox vlc -noconfirm -needed
Few more optional tools that are recommended we can find in AUR
yay -S urxvt-font-size-git python-pdftotext
Now it time to do some configurations
Configure Intel inbuilt Audio Alsa Sound
sudo vim /etc/modprobe.d/alsa-base.confoptions snd_mia index=0
options snd_hda_intel index=1
It is time to reboot our system and check if all drivers loaded during boot
reboot
Once bask into the shell we will continue configuration and testing sound and X Server
Configure lightdm
grep 'autologin-user=\|autologin-session=\|greeter-session=' /etc/lightdm/lightdm.conf && \
sudo sed -i 's/#autologin-user=/autologin-user=$USER/g' /etc/lightdm/lightdm.conf && \
sudo sed -i 's/#autologin-session=/autologin-session=i3/g' /etc/lightdm/lightdm.conf && \
sudo sed -i 's/#greeter-session=example-gtk-gnome/greeter-session=lightdm-gtk-greeter/g' /etc/lightdm/lightdm.conf && \
grep 'autologin-user=\|autologin-session=\|greeter-session=' /etc/lightdm/lightdm.conf
You may need to specify user name $USER in the autologin field
Now we can start testing configured sound and graphics
Testing sound and configuration
aplay -l && \
lspci | grep -i audio && \
ls -l /dev/snd/
alsamixer -c 1
speaker-test -c 2
X Window System check
lspci -k | grep -A 2 -E "(VGA|3D)" && \
nvidia-smi && \
nvidia-smi -q -d TEMPERATURE && \
xrandr && \
xrandr --listproviders && \
xdpyinfo | grep dots
If everything went well we are ready to start our X Window session
But 1st we will need to enable lightdm to start during boot and edit ~/.Xresources to allow rofi and urxvt to work properly
Edit ~/.Xresources
vim ~/.Xresources!--------------------------
! ROFI Color theme
! -------------------------
rofi.color-enabled: true
!rofi.color-window: argb:ee273238, #273238, argb:3a1e2529
rofi.color-window: #000, #000, #000
rofi.color-normal: argb:00273238, #c1c1c1, argb:3a273238, #394249, #ffffff
rofi.color-active: argb:00273238, #80cbc4, argb:3a273238, #394249, #80cbc4
rofi.color-urgent: argb:00273238, #ff1844, argb:3a273238, #394249, #ff1844
rofi.hide-scrollbar: true!---------------------------------
! Xft settings
! --------------------------------
!Xft.dpi: 110
Xft.dpi: 109
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.autohint: false
Xft.lcdfilter: lcddefault!---------------------------------
! URXVT Terminal config
! --------------------------------
URxvt.depth: 32
URxvt*termName: screen-256color
URxvt*geometry: 240x84
URxvt.loginShell: true
URxvt*scrollColor: #777777
URxvt.scrollStyle: rxvt
URxvt*scrollTtyKeypress: true
URxvt*scrollTtyOutput: false
URxvt*scrollWithBuffer: true
URxvt*skipScroll: true
URxvt*scrollBar: false
URxvt*fading: 30
URxvt*urgentOnBell: false
URxvt*visualBell: true
URxvt*mapAlert: true
URxvt*mouseWheelScrollPage: true
URxvt.foreground: #eeeeee
URxvt.background: #000000
URxvt*colorUL: yellow
URxvt*underlineColor: yellow
URxvt.saveLines: 65535
URxvt.cursorBlink: false
URxvt.utf8: true
URxvt.locale: trueURxvt.letterSpace: -1URxvt.font: xft:monospace:pixelsize=16:style=regular
URxvt.boldFont: xft:monospace:pixelsize=14:style=bold! Perl extensions
URxvt.perl-ext-common: default,matcher
URxvt.matcher.button: 1
URxvt.urlLauncher: chromiumURxvt.perl-ext-common: ...,font-size
URxvt.keysym.C-Up: perl:font-size:increase
URxvt.keysym.C-Down: perl:font-size:decrease
URxvt.keysym.C-S-Up: perl:font-size:incglobal
URxvt.keysym.C-S-Down: perl:font-size:decglobalURxvt.keysym.Home: \033[1~
URxvt.keysym.End: \033[4~
URxvt.keysym.KP_Home: \033[1~
URxvt.keysym.KP_End: \033[4~! Colors
URxvt*background: #000000
URxvt*foreground: #B2B2B2
! black
URxvt*color0: #000000
URxvt*color8: #686868
! red
URxvt*color1: #B21818
URxvt*color9: #FF5454
! green
URxvt*color2: #18B218
URxvt*color10: #54FF54
! yellow
URxvt*color3: #B26818
URxvt*color11: #FFFF54
! blue
URxvt*color4: #1818B2
URxvt*color12: #5454FF
! purple
URxvt*color5: #B218B2
URxvt*color13: #FF54FF
! cyan
URxvt*color6: #18B2B2
URxvt*color14: #54FFFF
! white
URxvt*color7: #B2B2B2
URxvt*color15: #FFFFFF
Reload .Xresources for URXVT
xrdb ~/.Xresources
Enable Start lightdm
sudo systemctl enable lightdm && \
sudo systemctl start lightdm
Start X WIndow session
startx
In next post, we will deep dive into configuring i3 window manager and get maximum out of the productivity provided by tiling window manager.