Nov 21, 2015

Xubuntu with i3 Tiling Windows Walkthrough

The idea of this setup is to achieve the best of both worlds from convenient desktop features and essential i3 features. See the Lubuntu version of this here.

This walkthrough assumes that you are already familiar with using i3, but you do not have to be in order to complete it. An altered default i3 config file is part of the walkthrough, which adapts default i3 keystrokes to XFCE components. (New and replaced sections of the config file are designated in the file.)

Update! - April 2021

Here is an updated guide

(No PPA necessary)

  • Use the familiar i3 keystrokes and config file for window tiling.
  • Utilize normal application names instead of binaries'. (dmenu still available)
  • Desktop notifications/indicators (not typically easy to find for i3)
  • Fixes the administrator authentication problem when using i3 in Ubuntu.
    • Software Center
    • Updater
    • Users and Groups
  • Elegant color scheme and icons

As usual, i3 is brought to you by the letter i and by the number 3 . . . and by Dexter.

For this guide, you will need to enter terminal commands, but you should not expect to remember them. Conversely, you will always want to understand the i3 config file. The last step will be to create a link to the i3 configuration file on you XFCE panel - to provide a visual reminder that it is central to your user experience, and conveniently available to open and edit.

The i3 site provides the best source about editing the configuration file.

I. Install Xubuntu on your system

Install the Xubuntu desktop in another Ubuntu variant by entering the following in a terminal:

(The general idea of this walkthrough should work for XFCE and Mint XFCE as well.)


 II. Create a Spare User

Especially if you are already using Xubuntu, creating a spare user account ensures that you can easily return to Xubuntu's default desktop.
  1. Open 'Users and Groups'
  2. Click button: 'Add'
  3. Type in your current admin password
  4. Enter a Name title
  5. Enter the official username
  6. Click button: 'OK'
  7. Enter the new user's password
  8. Click button: 'OK'
  9. Click 'Change...', next to 'Account type'
  10. Change the account type to 'Administrator
  11. Click button: 'OK'
  12. Click button: 'Close'
  13. Log out
  14. Select the Xubuntu desktop 
  15. Log in to the new user

III. Install a new background image manager

Xubuntu's desktop settings manager will not work with this setup, but luckily you can install "nitrogen" to change background images. Only remove xfdesktop4 if you (Unfortunately wallch does not work with i3.)

Nitrogen is simple and plays well with i3. It has the ability to set different wallpapers for different monitors or to expand one wallpaper between them.

  1. Open Nitrogen.
  2. Click "Preferences"
  3. Click "Add"
  4. Add any folders you use for background images
    • /usr/share/backgrounds
    • /usr/share/xfce4/backdrop

IV. Install the i3 Window Manager

Enter the following in a terminal to install the i3 window manager:

V. Install i3ipc-GLib and i3 Workspaces Plugin


 Section V UPDATE


This alternative installation method might be required for section V: Ubuntu 20.10 installation straight from the GitHub repos.


i3ipc-glib is a prerequisite for being able to switch between i3 workspaces in XFCE.

Open a terminal and enter the following:

(The details of this source are found here.)

  • Installing individual sources like this should be done rarely. There is a slight security risk, and it can slow down apt updates 


This wonderful plugin allows you to place an i3-compatible workspace switcher on your XFCE panel.

Open a terminal and enter the following:

(The details of this source are found here.)
  • Installing individual sources like this should be done rarely. There is a slight security risk, and it can slow down apt updates

VI. Deactivate Xubuntu's window manager

  1. Open 'Session and Startup', and go to the 'Session' tab.
  2. Note xfwm4 and xfdesktop. These processes will be replaced by the i3 Window Manager.
  3. For xfwm4, click 'Immediately' and change it to the  'Never' option.
  4. For xfdesktop, click 'Immediately' and change it to the 'Never' option.
  5. Click the button: 'Save Session'.
  6. Go to the 'Application Autostart' tab to activate the i3 window manager in the next stage.

Note that you leave the xfce4-panel and Xfsettingsd as they are.

VII. Activate the i3 window manager

  1.  In the 'Session and Startup' window, make sure you are in the 'Application Autostart' tab.
  2. Click the button 'Add' to add i3 to the list of startup applications.
  3. Fill out the form:
    • Name: i3 (or whatever you want to call i3)
    • Description: Tiling Window Manager (or whatever you want)
    • Command: i3 (must be "i3", as below)
  4. Click the button: OK
  5. You should scroll down to the bottom of the list and verify that i3 is listed and checked.
    • (Yes, the intimidating terminal command to start i3 is . . . i3.)
  6. Click the button: Close

VIII. Remove non-i3 Keyboard Shortcuts

Disabling the shortcuts here is about letting i3 take over in this regard, utilizing the i3 config file. Although my general philosophy is to avoid getting technical wherever possible (ie: avoid using a config file when a GUI is available), managing keyboard shortcuts through the i3 config file is inevitable if you want to use i3 at all. For the sake of peace-of-mind, as well as avoiding strange conflicts, I say avoid using 2 different applications for managing keyboard shortcuts. In this guide, ALL keyboard shortcuts are defined by the i3 config, rather than some here and some there. bleh.

  1. Open the 'Keyboard' dialogue.
  2. Go to the 'Application Shortcuts' tab as above.
  3. Remove all keyboard shortcuts
    • You can shift-select all of them and click the button: 'Remove
  4. Click the button: Close

IX. Paste i3 config

Let's get down to brass tacks and just do this thing.
  1. Create a directory in your user's home directory named '.i3'
    • The file path will be like: /home/<yourusername>/.i3/
  2. Create a new file in the .i3 directory named 'config'
    • the file path will be like: /home/<yourusername>/.i3/config
  3. Open the config file in a text editor and save the following in the file:

The i3 site provides the best source for editing the configuration file.

Here is the magic moment when you can restart your computer and log in with i3 as your window manager.

i3 cheat sheet

The mod key is the 'super key', also called the 'windows key' (left of the space-bar.)

mod+Enter opens a terminal
mod+d opens Xubuntu's whisker menu (in place of the dmenu)
mod+Shift+d opens the dmenu
mod+Shift+q closes the current window tile
mod+r initiates resize-tile mode
mod+1, mod+2, etc. (1-0) switches to a different workspace
mod+Shift+1, mod+Shift+2, etc. (1-0) moves the current window tile to a different workspace
mod+Shift+` (` is left of '1') Moves a window tile to the scratch-pad workspace
mod+` Reveals/hides the scratch-pad workspace
mod+Shift+e initiates Xubuntu's session logout dialogue

X. Configure the XFCE Panel

  1. Right-click the XFCE Panel at the top of the screen.
  2. Select the menu option 'Panel >' and then 'Panel Preferences'
    • The panel preferences dialogue should open
    • This looks different in Xubuntu 16.04.
  3. Click on the plus button to add the i3 workspaces plugin you installed earlier.
  4. Use the arrows to place the i3 workspaces plugin where you want it on the panel.
  5. Click the gear button, and configure the i3 workspaces plugin with colors that will show up on the panel.
    • I like to incorporate the i3 window color, which is #285577
  6. Remove the 'Window Buttons' from the panel items by selecting it and clicking the minus button.
  7. You can change the icon on the 'Whisker Menu' so that it is not an infantile mouse icon.
  8. Add or remove any application launchers to the panel.

XI. Create a launcher for i3's config file

  1. In the XFCE Panel items list, add a launcher next to the clock in order to create convenient access to the i3 config file.
  2. Edit the launcher details to be as below
    • Click the icon to change it. (The icon above is included with xubuntu-desktop)
    • Name: i3 Config
    • Command: mousepad config
    • Working Directory: /home/<yourusername>/.i3

The i3 site provides the best source about editing the configuration file.


Unknown said...

This was just what I was looking for!

I got accustomed to using i3 on top of Arch Linux.

Switched to an X86_64 Chromebook, and it was a pain trying to get everything set up in Arch Linux.

All of the hardware was immediately functional on my Acer 14 in GalliumOS. Although Ubuntu, XFCE4, sublime text editor, and github atom, and the like, were a good combination for me when I first decided to start using Linux/GNU, the advantages of using vim, tmux, were too appealing to let the small learning curb of using such programs deter me from getting the most out of them.

These instructions allowed me to bypass the pain of using i3 alone, and having to fix a bunch of things in order to get full keyboard functionality, networking, ect.

Thanks to your clear instructions, I truly get to enjoy the best of both worlds (XFCE4 & i3).

Thank you so much for this post!

@eamoc said...

When I run sudo apt-get update, I get this:

W: The repository ' zesty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

denesb said...

xfce4-i3-workspaces-plugin developer here. Since I had to google this myself (haven't used i3+xfce in some time) I added a link to this post to the Hope you don't mind. Cheers.

denesb said...

There is a way (i.e. hack) around the `apt-get update` errors until the maintainer uploads binaries for zesty.
Go to /etc/apt/sources.list.d and open aacebedo-ubuntu-xfce4-i3-workspaces-plugin-zesty.list and aacebedo-ubuntu-libi3ipc-glib-zesty.list in your favorite editor and replace "zasty" with "xenial".

XeroDesign said...

This is just what I needed. The lack of creature comforts in i3 was causing me to lose my mind and switching back to anything more cushy like Unity was also causing me to lose my mind. This is the perfect balance for me.

Unknown said...

Thanks for this helpful Blog.
I used a WordPress plugin that I found interesting. So I would like to recommend it.
The plugin helps me quickly create and customize images before inserting them in my blog post.
Check at:
It’s free.

Admin said...

I cant get i3 workspace plugin working are there any alternatives or solution?

Taylor said...

I haven't found any alternatives for XFCE. You can try to go without it, or use LXQT, which includes functionality for showing i3 desktops.

What is the problem you had?

CosmoTopper said...

I followed these instructions very carefully. I had a completely working Xubuntu 16.04 installation, and when I got to the magic moment when I was supposed to login with my new i3 window manager, I now have a box which is completely bricked. Won't even start the bios post.

Taylor said...

Eric Eskildsen: the plugin creates an i3 compatible graphical switcher item for xfce. (Though the xfce switcher can be configured to show numbers, it unfortunately does not work with non-consecutive desktop numbers, even with the latest version)

People can try to influence XFCE to fix this in their switcher.

The LXQT desktop switcher allows for desktop "names" to be used. It works flawlessly with i3.

People can also try to get xfce and lxqt to include compatibility with wlroots and sway for their upcoming Wayland efforts.

Thank you. I fixed the typo.

Taylor said...

Eric Eskildsen: If you refer to step X, the steps/picture show where/when the plugin is added to the panel after it is installed.

Nath_SoM said...

Is there a way to automate this so i can switch between default xfce and i3 without having to switch sessions?

Taylor said...

Hi!. The only way I would know how to do that is to create a batch script which you could run. The two directories that contain the important files for sessions and autostart programs are

1. "/home//.cache/sessions"
2. "/home//.config/autostart

Write a batch script that moves the session and autostart.desktop files in and out of those directories and into spare directories.

I will look into this at some point.

Taylor said...

Sorry for the typos.

You will still need to login and log back out.

Additionally, there might be some other issues. It's hard to tell, because these session managers are not designed to work like that.

Telis said...

Thanks for the great guide. Noob question here: when i log in i3-workspaces-plugin won't show up. I need to restart xfce4-panel ($ xfce4-panel -r).
Any suggestions ?

Darkd said...

good job!!! the best,best

rigapeen said...

Thanks. Everything worked except the workspaces plugin. Following denesb's comment I was able to install libi3ipc-glib but xfce4-i3-workspaces-plugin had a conflict

xfce4-i3-workspaces-plugin : Depends: xfce4-panel (< 4.13) but 4.14.3-1 is to be installed

On Xubuntu 20.04.1 LTS

Did anyone get around this?

Taylor said...

To everyone who is having trouble - that is probably everyone who tries to follow this guide - I wrote up a bunch of commands as an alternate method for installation.

As of Xubuntu 20.04, they've change XFCE a bit, in removing GTK2 support. So I think that is interfering with the launchpad repo.

Consequently, this new installation guide goes straight to the the Github repos, and requires that you build the binaries from source.

Sorry it's a little messy. Here is the link.

4fthawaiian said...

Loving this (running it now!) - but I can't get the xfce panel to display at the top of the screen (it's stuck to the bottom). Any thoughts?

Taylor said...

Right-click the panel, and got to Panel Preferences.

Uncheck "Lock Panel"

Then, you can grab the panel with the dotted lines on the ends of the panel.

Taylor said...

Perhaps that was obvious, so let me know. I'm not sure what else might be.

archftw said...

The best guide, used for arch. Always revert back to it. I bet there are many more who use this that haven't said thank you...

Thank you

Samarth Mayya said...

How can I execute step 6? I'm unable to open session and startup...

Taylor said...

Samarth Mayya:

Are you perhaps trying to get into those settings from an i3 session? You have to access that program having logged into an XFCE Session.

Post a Comment