Setting up Awesome WM on Ubuntu
Ubuntu is a popular and easy-to-use Linux distro, but its default window manager can become frustrating and inefficient if you’re a keyboard-driven programmer or have a large monitor that you want to use effectively. Some people have heard of tiling window managers such as XMonad, but are intimidated by the arduous setup and configuration process. Admittedly, most window mangers have pretty poor documentation, and it took me many hours of effort to get Awesome (my tiling window manager of choice) working properly on my system. I’ve written this little guide to help new users copy my Awesome-on-Ubuntu setup, so you can take advantage of my learning process and start using a tiling window manager with minimal hassle.
This guide was written for Ubuntu 16.04 and awesome 3.5.6 (the version of awesome that ships in the Ubuntu 16.04 respositories). Suggestions and bugfixes are welcome.
- Install awesome with
sudo apt-get install awesome
- Install the “delightful” widget pack by following the instructions on this website. These will also instruct you to install some other awesome modules, such as Vicious and freedesktop; you should do this.
- If you want to use the Weather widget (I do in my configuration, so if you copy my
configuration exactly you should do this), you’ll need to patch a bug that ships
with awesome’s METAR parser. Replace
~/.config/awesome/metar.luawith this file, which fixes a line that calls the
Setting up a Gnome Session
Now that awesome is installed, we need to set up a “GNOME Session” that will launch awesome as its window manager. This is what allows you to still use Ubuntu utilities like GNOME keyring and the Unity system settings panel while running awesome. It also prevents GTK+ applications (like Firefox) from reverting to an ugly-as-hell “default theme;” they rely on the GNOME Settings Daemon to provide all their style information.
Install gnome-settings-daemon if it isn’t already, with
sudo apt-get install gnome-settings-daemon
Put this file in
awesome-gnome.desktop. You’ll need root permissions to put it there, and it needs to be owned by root.
Put this file in
awesome.session. This is also a file owned by root.
Put this file in
awesome.desktop. This is also a file owned by root.
Copy the following files from
gnome-keyring-*.desktop(there are several files that match this pattern, all related to the GNOME keyring service)
gnome-screensaver.desktop, optionally, if you use GNOME screensaver rather than Xscreensaver
In your home-directory version of each file, find the line
and change it to
This will allow these services to run in the session named “Awesome GNOME,” which is the session we created with the file
awesome-gnome.desktop. These services normally disable themselves when they find that the current GNOME session’s name is not in their “OnlyShowIn” list.
gnome-control-center.desktop. You’ll find that it has the same “OnlyShowIn” line as the files from
autostart. Once again, change
For every file in
/usr/share/applications/that matches the pattern
gnome-*-panel.desktop(you can see them with
ls | grep gnome.*panel.desktop), you also need to add
Awesome GNOME;to the
OnlyShowInline. You can do this quickly by running the following sed script:
sudo sed '/OnlyShowIn/ s/$/ Awesome GNOME;/' \ /usr/share/applications/gnome-*-panel.desktop
Most of awesome’s configuration is done through the file
rc.lua, but colors and
wallpapers are set in a “theme” file. If you start with my config and theme file,
everything should mostly work sensibly out of the box, with a few user-specific exceptions.
- Put this file in
~/.config/awesome/and open it for editing.
- Find the section that starts with the comment “Delightful widget configuration”
(should be on line 107), and change the
[delightful.widgets.imap]to the username and password for your e-mail account. You can also change the
commandsetting to specify a different mail program to launch when you click the widget, such as
thunderbirdif you use Thunderbird. (I use Evolution). Also, if you don’t live in Ithaca, change the
[delightful.widgets.weather]to the city you live in, and change the corresponding
commandto open a browser pointing to your local weather forecast.
- Download the “darklooks” theme by following the instructions on this page.
~/.config/awesome/themes/Darklooks/theme.luawith this file to get my improvements to the theme; they make it more readable and make the “focus highlight” brighter (so it’s easier to see what window is active). Open the file and change line 50,
theme.wallpaper, to specify the location of the wallpaper you’d like to use.
- If you want the clock in your status bar to display 12-hour time instead of 24-hour
~/.config/awesome/delightful/widgets/datetime.luawith this file, which changes line 37 to specify a 12-hour format instead of a 24-hour format. If you want, you can customize this to any date/time string you want; the
textclockformat string uses the same placeholders that
At this point you should be done. Restart your computer, and when you reach
the login prompt again, click the session chooser (the little white button
next to the username/password box) and choose “Awesome GNOME” instead of
“Unity.” Once awesome is loaded, you can press WinKey-Enter to open a terminal
and type “
man awesome” if you aren’t familiar with the keyboard