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.- Open 'Users and Groups'
- Click button: 'Add'
- Type in your current admin password
- Enter a Name title
- Enter the official username
- Click button: 'OK'
- Enter the new user's password
- Click button: 'OK'
- Click 'Change...', next to 'Account type'
- Change the account type to 'Administrator'
- Click button: 'OK'
- Click button: 'Close'
- Log out
- Select the Xubuntu desktop
- 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.
- Open Nitrogen.
- Click "Preferences"
- Click "Add"
- 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
*********************************************
*********************************************
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
- Open 'Session and Startup', and go to the 'Session' tab.
- Note xfwm4 and xfdesktop. These processes will be replaced by the i3 Window Manager.
- For xfwm4, click 'Immediately' and change it to the 'Never' option.
- For xfdesktop, click 'Immediately' and change it to the 'Never' option.
- Click the button: 'Save Session'.
- 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
- In the 'Session and Startup' window, make sure you are in the 'Application Autostart' tab.
- Click the button 'Add' to add i3 to the list of startup applications.
- 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)
- Click the button: OK
- 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.)
- 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.- Open the 'Keyboard' dialogue.
- Go to the 'Application Shortcuts' tab as above.
- Remove all keyboard shortcuts
- You can shift-select all of them and click the button: 'Remove'
- Click the button: Close
IX. Paste i3 config
Let's get down to brass tacks and just do this thing.- Create a directory in your user's home directory named '.i3'
- The file path will be like: /home/<yourusername>/.i3/
- Create a new file in the .i3 directory named 'config'
- the file path will be like: /home/<yourusername>/.i3/config
- Open the config file in a text editor and save the following in the file:
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+e initiates Xubuntu's session logout dialogue
X. Configure the XFCE Panel
- Right-click the XFCE Panel at the top of the screen.
- Select the menu option 'Panel >' and then 'Panel Preferences'
- The panel preferences dialogue should open
- This looks different in Xubuntu 16.04.
- Click on the plus button to add the i3 workspaces plugin you installed earlier.
- Use the arrows to place the i3 workspaces plugin where you want it on the panel.
- 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
- Remove the 'Window Buttons' from the panel items by selecting it and clicking the minus button.
- You can change the icon on the 'Whisker Menu' so that it is not an infantile mouse icon.
- Add or remove any application launchers to the panel.
XI. Create a launcher for i3's config file
- In the XFCE Panel items list, add a launcher next to the clock in order to create convenient access to the i3 config file.
- 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.
24 comments:
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!
When I run sudo apt-get update, I get this:
W: The repository 'http://ppa.launchpad.net/aacebedo/libi3ipc-glib/ubuntu 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 http://ppa.launchpad.net/aacebedo/libi3ipc-glib/ubuntu/dists/zesty/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
~
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 README.md. Hope you don't mind. Cheers.
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".
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.
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: https://getpikiz.com/wordpress-plugin/
It’s free.
I cant get i3 workspace plugin working are there any alternatives or solution?
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?
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.
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.
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.
Is there a way to automate this so i can switch between default xfce and i3 without having to switch sessions?
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.
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.
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 ?
good job!!! the best,best
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?
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.
https://feeblenerd.blogspot.com/2020/12/ubuntu-2010-i3-workspaces-plugin.html
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?
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.
Perhaps that was obvious, so let me know. I'm not sure what else might be.
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
How can I execute step 6? I'm unable to open session and startup...
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