The first step in my steps towards a perfect Arch-Sytem is the installation of X and the choice of a suitable window-manager.
The installation of X is pretty easy. After following the corresponding wiki-entry we simply install X by:
pacman -S xorg xf86-input-keyboard xf86-input-mouse xcompmgr nvidia nvidia-utils
This installs X along with drivers for mouse and keyboard, drivers for my nvidia graphics card and xcompmgr, which is a composite window manager capable of (among other things like transparency with transset) rendering drop shadows. We need to create a file called /etc/X11/xorg.conf, the configuration file for X.
Section “ServerLayout”
Identifier “Layout0″
Screen 0 “Screen0″
InputDevice “Keyboard0″ “CoreKeyboard”
InputDevice “Mouse0″ “CorePointer”
EndSectionSection “Module”
Load “dbe”
Load “extmod”
Load “freetype”
Load “glx”
EndSectionSection “InputDevice”
Identifier “Mouse0″
Driver “mouse”
Option “Protocol” “auto”
Option “Device” “/dev/psaux”
Option “Emulate3Buttons” “no”
Option “ZAxisMapping” “4 5″
EndSectionSection “InputDevice”
Identifier “Keyboard0″
Driver “keyboard”
Option “XkbLayout” “de”
Option “XkbRules” “xorg”
EndSectionSection “Monitor”
Identifier “Monitor0″
VendorName “Unknown”
ModelName “Unknown”
HorizSync 30.0 - 110.0
VertRefresh 50.0 - 150.0
Option “DPMS”
EndSectionSection “Device”
Identifier “Device0″
Driver “nvidia”
VendorName “NVIDIA Corporation”
Option “NoLogo” “true”
Option “RenderAccel” “true”
EndSectionSection “Screen”
Identifier “Screen0″
Device “Device0″
Monitor “Monitor0″
DefaultDepth 24
SubSection “Display”
Depth 24
EndSubSection
EndSectionSection “Extensions”
Option “Composite” “Enable”
EndSection
I just list my working xorg.conf here. xorg.conf may be generated using several ways. This is described in detail by the above cited wiki-entry. I just made a few simple changes to the standard xorg.conf, namely:
- at the end, the section “extensions” was added (needed for xcompmgr)
- in the section “device”, the option “NoLogo” was set to “true”. This just means that the nvidia logo is not displayed when X is started
- in the section “device” the option “RenderAccel” was set to “true”. This is again needed for xcompmgr.
It is worth noting, that one can easily test and debug a X configuration file using the following command
X -config /path/to/your/config-file
and looking at the output in /var/log/Xorg.0.log.
When X is working fine, it is time to choose a suitable window manager. When I started using linux a couple of years ago, I always installed a complete desktop environment like gnome. Gnome for example uses metacity as its window-manager. However, if you install gnome (or kde) you get a nice window manager but a lot of installed programs and dependancies as well. Personally, I now prefer something very lightwight, something that just works and manages my windows. Especially, I like awesome.
Awesome is a tiling window manager. Awesome is (and I quote from the awesome-webpage)
… a floating and tiling window manager initialy based on a dwm code rewriting. It’s extremely fast, small, dynamic and awesome.
And - to make a long story short - awesome definately IS awesome. Installation in Archlinux is - as always - easy. A simple
pacman -S awesome
installs the awesome window-manager. To start awesome when we start X, we need to add a line to ~/.xinitrc. If the file does not exist, we create it (as the corresponding user) with
touch .xinitrc
and then we add
exec awesome
into this file. If everything went well, we are able to start X by startx and are presented with a nice, clean standard awesome-desktop as presented in the screenshot below:
We see that - by default - we get 9 different virtual desktops (”one” to “nine”) with nothing open. In the taskbar next to the link to the virtual desktop “nine” is the current layout of the actual virtual desktop listed. This tells us, how windows will be organised.
By default, new terminals are opened in awesome using the mod4-key (by default the “windows-key”) and “return”. After 4 windows are opened on the first virtual terminal, the desktop looks as follows:
We see, that the windows are organised as the window-layout in the upper bar indicates. By clicking Mod4+Space, we can flip through the available layouts. A complete reference list of available commands for awesome is available in the awesome awesome wiki.
Configuration of awesome is done using a - quite self explaining - configuration file named ยจ/.awesomerc. Personally, I am using pretty much the default values, changing only small things. What I did change were the following things:
- I did change the default terminal from xterm to urxvt
- I reduced the number of virtual desktops available to 6 and renamed them
- I added a rule, that firefox is always started at virtual desktop 2
- I created an additional keyboard-shortcuts that brings up dmenu using Mod4+p
Changing the default terminal from xterm to urxvt is easy. After installing urxvt in Arch using
pacman -S rxvt-unicode
I replaced all instances of “xterm” in .awesomerc to urxvt. Additionally I configured urxvt to my needs by defining fonts and colors in .Xdefaults
Renaming and changing the number of available virtual desktops means changing the “tags { }” section of .awesomerc. My tags-section looks as follows:
tags
{
tag 1:sys { }
tag 2:net { }
tag 3:mozart { }
tag 4:jabberoo { }
tag 5:hxrw { }
tag 6:stuff { }
}
I am using virtual desktop (VT) 1 usually for file operations, updating, manual reading and stuff, VT2 is the terminal where my browser lives, VT3-VT5 are reserved for servers I have to administer and on VT6 I usually have mutt and ncmpc open.
Awesome allows to specify rules for specific programs. That means one can control easily if programs should - for example - be started at a specific virtual desktop. I created a rule in the rules {} - section of .awesomerc which says:
rule { name = “firefox” tags = “2:net” }
Thus, firefox is always started on virtual desktop 2 (which is called “2:net” in the tags {} - section.
I got used to dmenu which is a handy application to call programs. It can be installed in Arch by simply:
pacman -S dmenu
To bind dmenu to Mod4-p, we need to create an additional entry in the keys {} - section of .awesomerc. So I just added:
key
{
modkey = {”Mod4″}
key = “p”
command = “spawn”
arg = “exec `dmenu_path | dmenu -b`”
}
After restarting X (Ctrl-Alt-Back) and restarting X, we are presented with a nice, clean and functional awesome Desktop.
We note, that an additional line was added to .xinitrc.
xcompmgr -c -t-5 -l-5 -r4.2 -o.55 &
gives some nice shadows and my eyes are loving it.
To summarize, we now have installed X together with awesome. We have a fully functional desktop and have awesome up and running. The next part of “my perfect Arch” will deal with how I read my Emails using offlineimap and mutt.
2 Comments
Hey! Nice little Awesome WM peek you got here.
I recently discovered the wonderfulness of Awesome, and I find it to be a lot better than ion3 and wmii combined… Awesome is indeed awesome!
Hi Shara.
Thx for your comment. Personally, I haven’t tried ion3 but I’ve played around with wmii and xmonad (which is really nice btw). However, it is so ridiculous simple to set up awesome compared to xmonad for example that I just felt home using this. Usually, I want to work and not to spend hours to configure stuff.
Do you want to share a screenshot of your awesome config? I am always eager to learn something new!
One Trackback/Pingback
[…] Nice introduction to Awesome especially for Arch Linux users […]
Post a Comment