Roman Sokolkov
Arch Linux with Awesome wm
<p>
Let’s try to install Arch with Awesome window manager.
</p>
<p>
<b>WARN: Please try it on Virtual machine first.</b>
</p>
<h2 style="text-align: left;">
Installing base system
</h2>
<h4 style="text-align: left;">
1. Create bootable USB (<a href="https://wiki.archlinux.org/index.php/USB_Installation_Media">https://wiki.archlinux.org/index.php/USB_Installation_Media</a>)
</h4>
<p>
<b><br /></b><br />
</p>
<div style="text-align: left;">
<b>wget http://mirror.yandex.ru/archlinux/iso/2013.06.01/archlinux-2013.06.01-dual.iso</b>
</div>
<div style="text-align: left;">
<b>dd bs=4M if=archlinux-2013.06.01-dual.iso of=/dev/sdx</b>
</div>
<div style="text-align: left;">
</div>
<p>
Where “/dev/sdx” NOT mounted USB stick.
</p>
<h4 style="text-align: left;">
2. Boot from this stick. It prompts you into root console.
</h4>
<h4 style="text-align: left;">
3. Partitioning with LVM.
</h4>
<p>
Use “lsblk” to find target block device (i.e. /dev/sda). I prefer fdisk for partitioning. Command below will create two partitions (200M and all remain space).
</p>
<p>
<b>echo -e “onnnnnn+200Mnnnnnnnwn”|fdisk /dev/sda</b><br /> <b><br /></b><br /> <b>mkfs.ext2 /dev/sda1</b><br /> <b>pvcreate /dev/sda2</b><br /> <b>vgcreate vgroot /dev/sda2</b><br /> <b>lvcreate -n root -L 10G vgroot</b><br /> <b>lvcreate -n swap -L 1G vgroot</b><br /> <b>lvcreate -n home -L 5G vgroot</b><br /> <b>mkfs.ext4 /dev/vgroot/root</b><br /> <b>mkfs.ext4 /dev/vgroot/home</b><br /> <b>mkswap /dev/vgroot/swap</b><br /> <b>mount /dev/vgroot/root /mnt</b><br /> <b>mkdir /mnt/{boot,home}</b><br /> <b>mount /dev/vgroot/home /mnt/home</b><br /> <b>mount /dev/sda1 /mnt/boot</b><br /> <b>swapon /dev/vgroot/swap</b>
</p>
<h4 style="text-align: left;">
4. Connect to the Internet.
</h4>
<p>
By default DHCP service is enabled, but if you need some other network settings (i.e. static or wireless) read <a href="https://wiki.archlinux.org/index.php/Configuring_network" target="_blank">this</a>. To check Internet:
</p>
<p>
<b>ping -c 3 www.google.com</b>
</p>
<p>
</p>
<h4 style="text-align: left;">
5. Install base system.
</h4>
<p>
Enable preferred mirror in /etc/pacman.d/mirrorlist and
</p>
<p>
<b>pacstrap /mnt base base-devel</b>
</p>
<p>
</p>
<h4 style="text-align: left;">
6. Configure system.
</h4>
<p>
<b>genfstab -p /mnt >> /mnt/etc/fstab</b><br /> <b>arch-chroot /mnt</b><br /> <b>echo “myhostname” > /etc/hostname</b><br /> <b>ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime</b><br /> <b>sed -i -e ‘s/#ru_RU.UTF-8/ru_RU.UTF-8/’ -e ‘s/#en_US.UTF-8/en_US.UTF-8/’ /etc/locale.gen</b><br /> <b>locale-gen</b><br /> <b>echo ‘LANG=”en_US.UTF-8″‘ > /etc/locale.conf</b>
</p>
<p>
Edit /etc/mkinitcpio.conf. Add “lvm2” hook between “block” and “filesystems”.
</p>
<p>
…<br /> <i>HOOKS=”base udev autodetect modconf block lvm2 filesystems keyboard fsck”</i><br /> …
</p>
<p>
<b>mkinitcpio -p linux</b>
</p>
<p>
Set root password with “passwd” and create regular user:
</p>
<p>
<b>useradd -m -s /bin/bash user1</b><br /> <b>passwd user1</b>
</p>
<p>
Enable DHCP service:
</p>
<p>
<b>systemctl enable dhcpcd.service</b>
</p>
<p>
</p>
<h4 style="text-align: left;">
7. Installing GRUB.
</h4>
<p>
See also <a href="https://wiki.archlinux.org/index.php/GRUB">https://wiki.archlinux.org/index.php/GRUB</a>
</p>
<p>
<b>grub-install –recheck /dev/sda</b><br /> <b>grub-mkconfig -o /boot/grub/grub.cfg</b>
</p>
<p>
</p>
<h4 style="text-align: left;">
8. Umount and reboot
</h4>
<p>
<b>exit</b><br /> <b>umount /mnt/{boot,home,}</b>
</p>
<h2 style="text-align: left;">
Installing Awesome wm
</h2>
<div>
This is cool tiling window manager. Official page <a href="http://awesome.naquadah.org/">http://awesome.naquadah.org/</a>.
</div>
<div>
</div>
<div>
Execute commands below from root.
</div>
<div>
</div>
<h4 style="text-align: left;">
1. Install video driver.
</h4>
<div>
Detailed instruction <a href="https://wiki.archlinux.org/index.php/Beginners'_Guide#Install_a_video_driver" target="_blank">here</a>.
</div>
<div>
</div>
<div>
<b>pacman -S xf86-video-vesa</b>
</div>
<div>
</div>
<div>
For nvidia “xf86-video-nv”, ATI “xf86-video-ati”
</div>
<div>
</div>
<h4 style="text-align: left;">
2. Install X server, awesome wm and <a href="http://slim.berlios.de/" target="_blank">slim</a> dm.
</h4>
<div>
<div>
<div>
<b>pacman -S xorg-server xorg-server-utils xorg-xinit xterm awesome slim</b>
</div>
</div>
</div>
<div>
<b>systemctl enable slim.service</b>
</div>
<div>
</div>
<h4 style="text-align: left;">
3. Configure xinitrc.
</h4>
<div>
<b>su – user1</b>
</div>
<div>
<b>echo “exec awesome” > .xinitrc</b>
</div>
<div>
<b>mkdir -p .config/awesome</b>
</div>
<div>
<b>cp /etc/xdg/awesome/rc.lua .config/awesome/</b><br /> <b>reboot</b>
</div>
<div>
</div>
<h4 style="text-align: left;">
4. Using awesome.
</h4>
<div>
For advanced usage should read official <a href="http://awesome.naquadah.org/wiki/Main_Page" target="_blank">wiki</a>
</div>
<div>
</div>
<h4 style="text-align: left;">
Keys:
</h4>
<div>
win+{1, 2, 3,.., left, right} – switch between tags (like screens in gnome)
</div>
<div>
win+r – execute command (i.e. “firefox”)
</div>
<div>
win+enter – open terminal
</div>
<div>
win+{j, k} – switch between windows
</div>
<div>
win+tab – switch to prev. window
</div>
<div>
win+w – open awesome menu
</div>
<div>
</div>
<h4 style="text-align: left;">
rc.lua:
</h4>
<div>
In internet a lot of info about customizing rc.lua. Here is only simple example. This will set capslock key to switch keyboard layout.
</div>
<div>
</div>
<div>
<b>echo ‘awful.util.spawn_with_shell(“setxkbmap -layout ‘us,ru’ -option ‘grp:caps_toggle,grp_led:scroll'”)’ >> .config/awesome/rc.lua</b>
</div>
<div>
</div>
<div>
Check syntax:
</div>
<div>
</div>
<div>
<b>awesome -k .config/awesome/rc.lua</b>
</div>
<div>
</div>
<div>
Then type “ctrl+win+r” to restart awesome.
</div>
<div>
</div>
<div>
Now you are free to install necessary software with “pacman”, customize awesome with “rc.lua”, etc. ,etc. ,etc.
</div>