ArchLinux Tutorial, Part 2: X Window System and I3 Installation
The second part of this tutorial focuses on installing X Window System and the I3 dynamic window manager.
Join the DZone community and get the full member experience.
Join For FreePart 2: X Window System and I3 Installation
Part 3: I3 Configuration and Operation
In the first part of this tutorial, we managed to install a bare-bones ArchLinux instance and get 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 is 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, we will installArchLinux X Window System and I3 on an Nvidia GeForce GTX 780 video card. The system has an 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 the Archlinux Wiki for correct video drivers installation.
Find your video card:
lspci | grep -e VGA -e 3D
The first step is to disable the 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
Nvidia non-open source drivers may conflict with Nouveau OS drivers and in this case, to make the drivers work, I needed to blacklist the Nouveau drivers.
cat /usr/lib/modprobe.d/nvidia.conf
blacklist nouveau
Install Display Manager
I am using lightdm as it is a very light and fast display manager, but you can install any other Display Manager you are familiar with, like GDM, LXDM or XDM.
sudo pacman -S lightdm lightdm-gtk-greeter -noconfirm -needed
Installing additional fonts is 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 is also 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 (again, optional).
sudo pacman -S atool highlight browsh elinks mediainfo w3m ffmpegthumbnailer mupdf \
-noconfirm -needed
Installing X Window applications:
sudo pacman -S chromium firefox vlc -noconfirm -needed
A few more optional tools that are recommended we can find in AUR:
yay -S urxvt-font-size-git python-pdftotext
Now it's time to do some configurations.
Configure Intel's Built-In Audio Alsa Sound
sudo vim /etc/modprobe.d/alsa-base.conf
options snd_mia index=0
options snd_hda_intel index=1
It is time to reboot our system and check whether all the drivers loaded during boot
reboot
Once we're back into the shell, we will continue configuration and testing the 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 first 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: true
URxvt.letterSpace: -1
URxvt.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: chromium
URxvt.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:decglobal
URxvt.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 a tiling window manager.
Published at DZone with permission of Ion Mudreac. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Send Email Using Spring Boot (SMTP Integration)
-
Using OpenAI Embeddings Search With SingleStoreDB
-
Integration Testing Tutorial: A Comprehensive Guide With Examples And Best Practices
-
4 Expert Tips for High Availability and Disaster Recovery of Your Cloud Deployment
Comments