Skip to content

i3 Tiled Window Manager

This is way out of date now

The information in this post is so out-dated that I wonder why I'm keeping it around. I guess I'm a digital hoarder...

Recently, I stumbled upon a thread on Reddit about the i3 Tiled window Manager.

To say the least, I was intrigued. I've been looking for ways to increase productivity on my Linux desktop for a bit now. Usually that just meant customizing Gnome Shell to display system information (CPU, Net, Temps, etc..) but that wasn't really doing much for me.

Then i3 happened! I'm in love, and may never go back to Metacity.

Fedora 17

On F17, the install was painless since the latest packages (at the time of writing) were in the repos.

yum -y install i3 i3status i3lock

Fedora 16

Sadly, on F16, the packages in the repo are a bit out of date, so I compiled both i3 and i3status from source. I left i3lock out, since I really didn't use it...

Dependencies

yum -y groupinstall "Development Tools"
yum -y install xcb-util-devel libxcb-devel xcb-proto libev-devel libxkbfile-devel libXcursor-devel libX11-devel yajl-devel bison flex asciidoc rxvt-unicode xorg-x11-apps dmenu xorg-x11-fonts-misc dzen2 startup-notification-devel pcre-devel alsa-lib-devel wireless-tools-devel libconfuse-devel

After all that loveliness completes, we should be ready to build i3 from source.

wget http://i3wm.org/downloads/i3-4.2.tar.bz2
tar -xvf i3-4.2.tar.bz2
cd i3-4.2
make
sudo make install

Now, i3status.

wget http://i3wm.org/i3status/i3status-2.5.1.tar.bz2
tar -xvf i3status-2.5.1.tar.bz2
cd i3status-2.5.1
make
sudo make install

At this point, we should have i3 and i3status ready to roll.

After the install, you can logout and select the new i3 session and start using it. If you run the vanilla i3 session, you'll lose a few back-end items that run with gnome (like the keyring manager). The next session covers how I integrated i3 and gnome.

Gnome Integration for Both 16 and 17

i3 is great, but I did miss having the gnome-keyring (among others) so I went on a quest to get this done. I won't bore you with the journey, suffice it to say it was long and full of forums, so here is what gets it all working nicely.

I created a new session to log into so I could keep a vanilla i3 as a fall-back, just in case. The first command echos a string into the file /usr/share/xsessions/gnome-i3.desktop

#Install xsession config
echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=i3 + GNOME\nComment=improved dynamic tiling window manager\nExec=/usr/bin/gnome-session --session=i3-gnome" > /usr/share/xsessions/gnome-i3.desktop

Then I created the gnome-session file that the above xsession file calls during login.

#Install gnome-session config   
echo -e "[GNOME Session]\nName=gnome-i3\nRequiredComponents=gnome-settings-daemon;\nRequiredProviders=windowmanager;notifications;\nDefaultProvider-windowmanager=i3\nDefaultProvider-notifications=notification-daemon\nDesktopName=GNOME-i3" > /usr/share/gnome-session/sessions/i3-gnome.session

This solution 'worked' for only about 30 seconds after login, then gnome would crash. The fix for this was registering the session with dbus. I'll admit, I don't fully understand this script, but it works...

Just create 'dbusregister.sh' in ~/.i3/ and copy this code into it.

### OLD WAY!!! ###

#!/bin/bash - 
if [ -n "$DESKTOP_AUTOSTART_ID" ]; then
echo "Registering with Gnome Session Manager via Dbus and id $DESKTOP_AUTOSTART_ID"
dbus-send --session --print-reply=string --dest=org.gnome.SessionManager "/org/gnome/SessionManager" org.gnome.SessionManager.RegisterClient "string:i3" "string:$DESKTOP_AUTOSTART_ID"
else
echo "DESKTOP_AUTOSTART_ID not set."
fi

Then make it executable.

Next, edit your i3 config file (~/.i3/config) and add this line

### OLD WAY!!! ###
#Fix for Gnome Crash
exec --no-startup-id ~/.i3/dbusregister.sh

The new hotness for the dbus issues!! (Thanks Leho Kraav!!)

### NEW WAY ###
# Add this line to your ~/.i3/config file
exec echo “.i3/config: DESKTOP_AUTOSTART_ID $DESKTOP_AUTOSTART_ID, registering with org.gnome.SessionManager”

Now that we have the xsession, gnome-session, and dbus-fix in place, we can log-out and select the "i3 + Gnome" session.

The next step is configuring i3 to your liking. I won't put my configs here yet, as they are still evolving (almost daily). i3 is VERY well documented, so just head over to the site and start reading the user guide!