[WiP] Minimal i3wm Installation: From Headless to GUI + Desktop Functionality

Preface

This Wiki aims to be a complete guide to creating a functional and usable desktop experience, starting from a headless server install.

You can totally install i3 alongside an existing GNOME or KDE, but this may not be ideal if you have super low-end specs, or simply want to avoid bloat. For me, I don’t like the elements of other WMs being cross-contaminated into my i3 environment.

i3 is highly customizable and can be riced out to be “F***ing Gorgeous!”. While I will cover some basics, I will leave the ricing to those more qualified. Links below.


Table of Contents


Example System Used for this Wiki

This guide assumes you are familiar with Linux and have already installed your preferred distro.



This guide is basically applicable to all distros, but for the creation of this Wiki, I will be using Fedora Server 32; running inside VirtualBox.

In my case, I chose the standard server install, created a user account, and made said user an administrator.

After finishing the install and rebooting, I logged in with my user and installed updates. (My machine was already connected to the internet via a virtual NIC, which was setup during the install process.)



Installing Xwindows (Xorg)

Installing Xwindows


At this point, our OS is connected to the internet, updated, and awaiting our commands. We need to install X server for i3 to function.

Use the command below to install both xorg-x11-server-Xorg and xorg-x11-xinit

sudo dnf -y install xorg-x11-server-Xorg xorg-x11-xinit

for Ubuntu:

sudo apt install -y xorg --no-install-recommends --no-install-suggests

If your machine uses and AMD or NVIDIA graphics card, you’ll need to install the correct display driver. (fill this in later)



Installing i3wm and it's Components

Installing i3wm


i3, by itself, is a little too bare bones. Because of that, I’m also going to install a few other features designed to improve it’s functionality. I’m going to install dmenu and i3status, alongside i3wm.

sudo dnf -y install i3 i3status dmenu

i3status displays a bar along the bottom of the screen. It has useful information like day/time, network connection, battery level, screen brightness, etc…

dmenu provides a way of searching and launching applications without relying on a terminal.

You could install all of your desired applications at this point, but for the sake of this Wiki, we are more concerned with achieving a functional GUI. For now, this is all we need.

It is also recommended to update at this time.



Configuring Xorg to Start i3

Starting i3


With both i3 and Xorg installed, we need a way to initiate the X session and launch i3.

To do this, we must create/edit a file named .xinitrc in the user’s home directory.

vim .xinitrc

We only need to add one line to this file.

exec i3

By default there will be no terminal emulator installed so you should install one before launching i3.

Now we can launch i3 at any time simply by using:

startx

Behold! The glory that is a tiling window manger! Well not exactly, we have some more work to do. If you’re lost at this point, I have a section on i3 keyboard shortcuts that covers basic navigation.

If you selected the default settings at startup the ‘superkey’ will be configured as ‘Alt’, you can select to set it to your command or windows key on config.

For now, if you want, you can exit i3 by pressing and holding superkey ( also known as the Windows key) + shift + e. A popup appears, and you can click “exit”.



Installing a Desktop Manager (optional)

Desktop Manager


Installing a desktop manager (DM) is not required, and I will not be using one in my example. Logging in from the console and typing startx to launch i3 works just fine for me.

That being said, these are the instructions to install one, if you so desire.



Setting up GUI Network Tools

Network Tools


texty text



Setting up Multi Monitors and Screen Resolution

Multi Monitors and Screen Resolution


xrandr can temporarily change your screen resolution until the X session ends.



Setting up Audio/Video Playback

Video and Audio Playback


RPM fusion

ffmpeg

gstreamer1

Audio Playback

This command installs the pulseaudio system, along with both the CLI and GUI versions of the alsa sound mixer.

sudo dnf -y install pulseaudio pulseaudio-utils alsamixer alsamixergui

Next we need to add our user(s) to the pulseaudio group.

sudo usermod -aG pulse,pulse-access “username”

Start the pulseaudio service with:

pulseaudio -D



Choosing Programs that Complement a Tiling WM

Installing Programs


Any program will usually function with a tiling window manager, but some don’t mix as well. Sometimes functionally, but usually just cosmetically. To keep the desktop light-weight and still somewhat theme-able, we’ll be focusing mainly on text-based applications.

Ranger

Vifm

Midnight Commander

cmus

moc

weechat (I mean, who uses IRC anymore, besides me)



Customizing

Customizing


Since our i3 session is running on X server, most of our customizing can be defined in ~/.Xresources and ~/.Xdefaults.

The easiest way to go about this is to download pre-made dot files from GitHub. I’ll be using Solarized Dark.

git clone https://github.com/solarized/xresources.git

This command downloaded both light and dark Solarized themes.

Entering the xresources folder, we can copy the contents of Xresources.dark to the .Xresources file.

The easiest way to change wallpapers on i3 is by using the tool feh.

feh /path/to/image



Additional Features

Additional Featuress


Talk about redshift and f.lux, or whatever it was. Nobody’s gonna read this anyway.

xbacklight



Overview of i3 Specific Keyboard Shortcuts.

Keyboard Functions


List provided by: https://i3wm.org/docs/refcard.html

Moving Around
Superkey + Enter Open new Terminal
Superkey + ( j / ) Focus left
Superkey + ( k / ) Focus down
Superkey + ( l / ) Focus up
Superkey + ( ; / ) Focus right
Superkey + Shift + ( j / ) Move window left
Superkey + Shift + ( k / ) Move window down
Superkey + Shift + ( l / ) Move window up
Superkey + Shift + ( ; / ) Move window right
Superkey + Shift + q Kill a window
Superkey + Shift + <Number> Move window to another workspace
Changing Container Modes
Superkey + e Default
Superkey + h Stacking
Superkey + w Tabbed
Superkey + Shift , f Global fullscreen
Superkey + f Toggle fullscreen
Superkey + Shift , Space Toggle floating
Superkey + <Mouse> Drag floating
Opening Other Application
Superkey + d Open application launcher (dmenu)
Using Workspaces
Superkey + <Number> Switch to workspace num
Restarting i3 Inplace
Superkey + Shift + r Restart i3 inplace
Exiting i3
Superkey + Shift + e Exit i3



Links

i3wm Keyboard Shortcuts: https://i3wm.org/docs/refcard.html
GitHub Solarized Xresources Theme: https://github.com/solarized/xresources.git

Ricing

See Below

Configuring i3: https://www.youtube.com/watch?v=8-S0cWnLBKg
Customizing i3: https://www.youtube.com/watch?v=ARKIwOlazKI
URxvt Customizing: https://www.youtube.com/watch?v=_kjbj-Ez1vU


i3wm

8 Likes

Hey! so nice to see guides on this, i personally followed this one with Ubuntu Server 20 and am running i3 and sorting theming now, i made a couple of edits to this guide to add how to install on Ubuntu and something not covered for i3wm first run.

Will add more to complement once i have theming sorted to have it all in one place.

Solid work, thank you!