Minimal awesome wm installation on Debian 7 ”Wheezy”

Please use minimal netinstall iso (~270mb) when installing Debian.

Boot using installation media and follow on-screen instructions (partitions, locales, sudo and so on). When graphical installation program asks for ”Software selection”, do not check ”Debian Graphical Desktop Environment”. Instead uncheck all boxes, and click ”Next”:

debian_2

When installation is complete, remove your installation media and reboot system. After that, login to command-line interface:

First thing to do, is add your brand new username to sudo group. To do so, add new line to /etc/sudoers -configuration file using ’visudo’ command (do not edit file directly using text editor!):

$ visudo
YOURUSERNAME ALL(ALL:ALL) ALL

I personally like to have packages that are non-free (non-free), and free ones that depends on non-free ones (contrib). Thus, i add them into my repository list:

$ sudo vi /etc/apt/sources.list
deb http://http.debian.net/debian/ wheezy main non-free contrib
deb-src http://http.debian.net/debian/ wheezy main non-free contrib

Next, install X-server and awesome window manager:

$ sudo apt-get update
$ sudo apt-get install xorg awesome

I also wanted sound (alsa), better text editor (vim) & terminal emulator (urxvt):

$ sudo apt-get install alsa-utils vim rxvt-unicode-256color

By default sound is muted, so i ran alsamixer and unmuted master channel using ’m’ on keyboard:

$ alsamixer

My laptops built-in speaker make annoying noises when errors occur (eg. trying tab-complete when there is no matches). So i muted it by unloading and then blacklisting ’pcspkr’ kernel module:

$ sudo modprobe -r pcspkr
$ sudo vi /etc/modprobe.d/nobeep.conf
# Do not load 'pcspkr' module on boot
blacklist pcspkr

Next, copy example awesome wm config file to your home directory:

$ mkdir -p ~/.config/awesome/
$ sudo cp /etc/xdg/awesome/rc.lua ~/.config/awesome/
$ sudo chown YOURUSERNAME ~/.config/awesome/rc.lua

One thing you might wanna change there, is the terminal emulator you like to use (default is xterm, i prefer urxvt):

$ vi ~/.config/awesome/rc.lua
-- This is used later as the default terminal and editor to run.
terminal = "/usr/bin/urxvt"

Next, lets make X-server automatically start on console login, by adding few lines to our ~/.bash_profile (~/.zprofile if you’re using zsh):

$ vi ~/.bash_profile
# startx automatically
if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then
  startx
fi

.. now that X-server starts automatically on login, lets also make it start awesome wm as part of startup process:

$ vi ~/.xinitrc
# ~/.xinitrc
# This file is sourced when running startx and
# other programs which call xinit
 
# Start the window manager
exec awesome

Reboot your system, login, and awesome wm should start automatically:

$ sudo shutdown -r now

Everything worked out of box at least for me; evdev detected my cordless USB mouse automatically, and xorg-package came with proper graphics drivers, set of fonts and all that. Of course, you will need to install more programs that you need, such as: web browser, office suite, video player etc. But other than that, everything is ready!

If you come up with any problems, you should check these Debian wiki sites first: GraphicsCard, ALSA, WiFi/HowTouse, XorgFonts.

Now you have quite minimal Debian-system up and running! Have fun 🙂

3 Comments

Filed under Sekalaiset

  • Guest

    Something went wrong in this line:

    if [ -z ”$DISPLAY” ] && [ $(tty) = /dev/tty1 ]; then

    replace it with:
    if [ -z ”$DISPLAY” ] && [ $(tty) = /dev/tty1 ]; then

    and all will be well 🙂

    Thanks for the nice tutorial. It was very usefull

  • Jarco Voorhees

    In this line

    if [ -z ”$DISPLAY” ] && [ $(tty) = /dev/tty1 ]; then

    In your post the && get replace by & (the html symbol). Replace with && and it will work again

    Thanks for the very usefull guide

  • NCFX

    TOP STUFF!!