Posted about 4 years ago. Visible to the public.

Running the Awesome window manager within Gnome

Awesome is a very good tiling window manager that provides neat features like automatic layouting of windows, good multi-display support with per display workspaces and more. Unfortunately, it is only a window manager, and lacks a lot of Gnome’s conveniences like the network manager, application menus, automatic updates etc.

Fortunately, Gnome allows you to selectively replace only the window manager, so you get all of Gnome’s features with all of Awesome’s awesomeness. With Gnome 3 you can even set it up to switch between Awesome and regular Gnome on login. Here is how:

(Tested on Fedora 15 / Ubuntu 11.10/12.04 with Gnome 3, and Ubuntu 10.10 with Gnome 2):

Install Awesome

On Ubuntu, run sudo apt-get install awesome

On Fedora, register this repository and run sudo yum install awesome.

On Ubuntu 11.10 and 12.04, run sudo apt-get install gnome-session-fallback notification-daemon

Register Awesome with Gnome 2

Make sure you have the following file:

/usr/share/applications/awesome.desktop:

[Desktop Entry] Version=1.0 Type=Application Name=awesome TryExec=awesome Exec=awesome

To register Awesome as the default window manager, open the gconf-editor, go to /desktop/gnome/session/required-components and set windowmanager to awesome.

Now boot normally into gnome. To undo your change, set windowmanager to metacity.

Register Awesome with Gnome 3

Create (or update) the following files:

/usr/share/applications/awesome.desktop:

[Desktop Entry] Version=1.0 Type=Application Name=awesome TryExec=awesome Exec=awesome

/usr/share/xsessions/gnome-awesome.desktop:

[Desktop Entry] Name=Gnome with Awesome Comment=Gnome with Awesome as window manager TryExec=gnome-session Exec=gnome-session --session=awesome Type=Application

/usr/share/gnome-session/sessions/awesome.session:

[GNOME Session] Name=Awesome RequiredComponents=gnome-panel;gnome-settings-daemon; RequiredProviders=windowmanager;notifications; DefaultProvider-windowmanager=awesome DefaultProvider-notifications=notification-daemon

In newer versions of Gnome this may not work anymore (awesome will simply not start). What seems to do it is this: /usr/share/gnome-session/sessions/awesome.session:

[GNOME Session] Name=Awesome RequiredComponents=gnome-panel;gnome-settings-daemon;awesome

Now log out, and select “Gnome with Awesome” as the session type in gdm.

Optional (only with Gnome 3)

You will make some changes to the Gnome settings when you run Awesome (for example move the Gnome panel). If you want these changes to only apply to your “Gnome with Awesome” sessions, but not for regular Gnome sessions, you can do this:

Create an executable script /etc/X11/xinit/xinitrc.d/set-dconf-profile.sh:
#!/bin/sh

DCONF_PROFILE_DIR=/etc/dconf/profile if [ -e "$DCONF_PROFILE_DIR/$GDMSESSION" ] then export DCONF_PROFILE=$GDMSESSION fi

This allows you to have per-session dconf profiles.

Now create such a profile for gnome-awesome. Look into /etc/dconf/profile and find the current profile (probably) called gdm. Duplicate it as gnome-awesome and change the line user into user-gnome-awesome. For me, it looks like this:

/etc/dconf/profile/gnome-awesome:
user-gnome-awesome
gdm

Now create the dconf settings database itself, by duplicating your current database ~/.config/dconf/user as ~/.config/dconf/user-gnome-awesome.

Configure Gnome

By default, the Gnome panel will hide the more important awesome bar. I suggest you:

  • Remove the bottom Gnome panel (with the task list)
  • Move the top panel (with the menus) to the bottom
  • Untick the expand option
  • Set it to autohide
  • Most importantly: Remove the notification area (Awesome has its own)

In Gnome 2, you can do all this through alt-dragging, and context menus.
In Gnome 3, install and open dconf-editor. You will find all settings under /org/gnome/gnome-panel.

First steps in Awesome

  • Press Meta-Enter. This should open a terminal. Open a few more.
  • Press Meta-Space. This should cycle through layouts.
  • Windows can be dragged while holding down the Meta-key.
  • Open the Awesome man page (with man awesome) and look at the other key bindings
  • Have a look at the Awesome wiki
  • Improve your font-rendering
  • Copy /etc/xdg/awesome/rc.lua to ~/.config/awesome/rc.lua. Take a look, it’s pretty self-explanatory. You can instantly apply changes by reloading Awesome with Meta-Ctrl-R.

Caveat

If you quit Awesome, Gnome will keep running, but you will be short a window manager.

This might be fixable, but it’s probably best to simply log out (or shut down) using the Gnome panel.

Growing Rails Applications in Practice
Check out our new e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Author of this card:

Avatar
Tobias Kraze
Last edit:
9 months ago
by Tobias Kraze
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code

License for source code

All source code included in the card Running the Awesome window manager within Gnome is licensed under the license stated below. This includes both code snippets embedded in the card text and code that is included as a file attachment. Excepted from this license are code snippets that are explicitely marked as citations from another source.

The MIT License (MIT)

Copyright (c) 2011-2014 makandra GmbH

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
Posted by Tobias Kraze to makandropedia