How to setup Awesome Window Manager with Debian

From ETCwiki
Revision as of 13:17, 5 April 2014 by Ddxfish (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Recently I had the desire to try a tiling window manager. I chose Awesome Window Manager over at awesome.naquadah.org and Debian 7. Due to the fact that nothing comes ready-to-go with Awesome, guides helped me a lot during setup and I am here to return the favor.

Skills Needed

This is a moderate difficulty setup. My 6 complete installs took me about 6 days total, including learning time. I recommend you know how to do all of these or be ready to spend an hour on each learning it:

  • Bash - know simple bash shell commands and scripting
  • SSH - know the very basics
  • apt-get - know how to install software and check error logs etc
  • vi vim or nano - know how to edit text files without a GUI
  • Manual partition creation during install of Linux (optional, helpful though)

Setup Rigs Tested

  • Type: Lenovo G450 Laptop
    • Debian Version: Debian 7 x64 DVD
    • Installation Media: x64 DVD (with firmware folder), and USB install from unetbootin
    • Hard Drive: 32gb Memory card! (sandisk ultra, class 10 UHS) on an internal card reader
    • CPU: Intel Dual Core E8400 64-bit
    • RAM: 4GB
  • Type: Homebuilt i5-2500k desktop
    • Debian Version: Debian 7 x64 DVD
    • Installation Media: x64 DVD (with firmware folder), and USB install from unetbootin
    • Hard Drive: 250GB internal SATA-2 Western Digital Caviar SE (all partitions wiped)
    • CPU: i5-2500k
    • RAM: 8GB
  • Type: Dell Optiplex POS (14 years old!)
    • Debian Version: Debian 7 x32 CD
    • Installation Media: x32 CD (with firmware folder), and USB install from unetbootin
    • Hard Drive: 20GB internal Western Digital
    • CPU: 1.7GHz Pentium 4
    • RAM: 512MB
  • Type: Virtual Machine (Virtualbox)
    • Host OS: DEBIAN 7 OF COURSE
    • Debian Version: Debian 7 x32 CD
    • Installation Media: x32 CD ISO image
    • Hard Drive: 8gb VDI disk image
    • CPU: 1x 100%
    • RAM: 512MB

Installing Debian

Setup is straight forward and goes just like a normal install except for the fact that we do not install the Desktop Environment. If you have setup Debian 7 before or know Linux well, just go ahead and install without a desktop. For the rest of us, here are the steps

Get Debian

The first step in this process is to get Debian. You should be using torrents if you know how to help out Debian in return for their great OS, but HTTP is ok if you wont torrent. Make sure you select the proper download.

Download Explanation

  • CPU type
    • amd64 (64-bit) and its all 64 bit CPUs including Intel even tho its called amd64 - recommended
    • i386 (32-bit) is for older computers or for better backwards compatibility.
  • Download size
    • CD Images - Base packages, only the bare essentials
    • DVD Images - Base packages + extra stuff you will end up installing probably (6x larger download) - recommended


Installation Media

  • Use the DVD edition if you can, it contains more packages which will minimize download time during installs. You only need CD 1 or DVD 1, the other discs contain the other packages that are less frequently used.
    • Option 1: Using Unetbootin to create a bootable USB flash drive is convenient if you know how
    • Option 2: Get an ISO and burn it to disc with a program like CDBurnerXP (freeware)

Before Install

  • Unplug all hard drives from the computer except the one you are installing to or say goodbye to your data
  • Clear the drive you are installing to using gparted or a bootable partition manager (I had problems with a pre-existing grub bootloader on my install hard drive)

During Install

  • Select the option to use a network mirror
  • UNSELECT the option "Desktop Environment" during install (it is in a checklist of stuff to install)

Special Notes About Installing

Skipping Desktop Environment install

  • This will make it boot to command line, no windows, make sure you are ready!

Memory Card Install Notes

  • Keep memory card UNPLUGGED until Debian is ready to detect hard drives to install to or it will read errors
  • If you have 2GB+ of RAM, dont make a swap partition, just make one big ext4 / partition (swap + data on a single memory card is slllllooooww.)

Install Your Packages

This section goes over what happens after you install Debian, and are now at a command prompt (note: with NO desktop environment). We will be entering a series of commands as root to get the packages needed to run awesome, like an X server. Each command I list will have only a few packages we are asking to install, but there will be many it will say it needs. This is OK, they are called dependencies and they are essential as "background" programs, etc. Now, the first step is to remove the CD from being checked during program installations. You should no longer have your CD/DVD/USB install media in the system.

Setting up apt-get

Start text editor to edit sources of packages

nano /etc/apt/sources.list

Find this line:

deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44]/ wheezy contrib main

Make it into this line:

#deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44]/ wheezy contrib main

Press Ctrl + X to exit, and press y to save

Packages to apt-get

Here is a list of commands, one by one I used during my setup to build my own features from scratch on an awesome install. Accept all dependencies it asks you to download, some may have many. I will describe what set of programs and utils each command gives you also, so if you dont want that feature, skip it.

Use root user

su

Essential: Update list of packages available from apt-get

apt-get update

Essential: Get 2 important packages, sudo and vim

apt-get install vim sudo

Essential: Get the basic X window server, awesome, terminal (200+ packages)

apt-get install xinit awesome xterm

Recommended: If you want better than just an xterm window (100+ Packages)

apt-get install gnome-terminal

Recommended: If you want a good file browser (100 packages)

apt-get install nautilus

Recommended: clock, calc, notepad, code editor (8 total packages)

apt-get install galculator x11-utils leafpad geany

Recommended: If you want some internet apps (58 total packages)

apt-get install iceweasel pidgin transmission-gtk

Recommended: If you want media and audio (65 packages)

apt-get install alsa-utls mplayer mirage rhythmbox

Optional: If you want to connect to other computers (10 packages)

apt-get install filezilla putty vncviewer samba

Optional: If you want advanced utilities (48 packages)

apt-get install virtualbox q4wine gparted

Create Awesome Config Files (required)

Run these commands as your regular user, NOT ROOT!

Creates Awesome config directory (for current user only!), copies default config to it (make sure no trailing slashes!

mkdir ~/.config
cp -fr /etc/xdg/awesome ~/.config


Basic System Setup

Here is where I take the time to change some config files before I go deep into configuring the GUI. I will explain each change, what it does and why I do it.

Require no password for logon (optional)

Yes, a security risk. I am behind a great firewall, and this is not my work PC so you may or may not want to do this. I personally love it. Here is how its done:

Switch to root account

su

Open inittab in an editor

vi /etc/inittab

Put a # symbol before this entry:

1:2345:respawn:/sbin/getty 38400 tty1

Make a new line above the one you changed with this:

1:2345:respawn:/bin/login -f MYUSERNAME tty1 </dev/tty1 >/dev/tty1 2>&1

No password for sudo (optional)

This one is a huge security risk if you are on a shared PC or whatnot. If your user gets hacked, root account is hacked also. That being said, I LOVE THIS ONE TOO LOL here is how its done:

Switch to root

su

Open /etc/sudoers

vi /etc/sudoers

Go to the end of the document, press INSERT to type, and on a new line enter this:

yourusername ALL=(ALL) NOPASSWD: ALL

Force a save over the read only file - in command mode it is :w!

Setup Awesome to Autostart

This step takes setting up some files that will be executed every time a user is logged on (or AUTO logged on in the above example). You will be creating files using either vi/vim or nano, whichever is your favorite text editor.

.xinitrc (essential)

This file goes in your home directory. it is called .xinitrc with a period starting its name to indicate it is hidden. My .xinitrc goes here: /home/bander/.xinitrc because my user is bander. Here is what should go inside this file:

#!/bin/sh
xsetroot -solid black
xsetroot -cursor_name top_left_arrow
#bell volume 20%
xset b 20
#screensaver off
xset s off
#monitor power savings in minutes for standby, sleep, off
xset dpms 300 600 900
xmodmap $HOME/.Xmodmap
xrdb -load $HOME/.Xdefaults
ivman &
#last line has to be the one to exec awesome
exec /usr/bin/awesome


.xprofile (recommended)

This is where I set my display resolution to run how I want it when I login (default I think is 1024x768 even on a 1080p monitor). You will have to do some research as to what each video output is called on your system. You will have to modify my code to your own video output names. You can check what your video outputs are called by running:

xrandr -q


My .xprofile:

#Laptop Video Display Something, auto(max) resolution
xrandr --output LVDS-1 --auto
#External VGA port, off
xrandr --output VGA-1 --off


.bash_profile (essential)

This one is simple, but I wonder if it could be redundant to .xinitrc. Either way, this goes in your home folder and only contains this:

xinit awesome


Here is my sample of

External Links