How to install minimal Arch Linux desktop (using i3, Mate, Openbox and LightDM)

Arch is largely based around binary packages. Packages are targeted for i686 and x86-64 microprocessors to assist performance on modern hardware. A ports/ebuild-like system is also provided for automated source compilation, known as the Arch Build System. ~600MB

# download ISO from https://archlinux.org/download/, mount and boot
$ loadkeys pt-latin1
# boot uses dhcpcd and wireed, test
$ ping -c 3 www.google.com 

# erase partition table
$ sgdisk --zap-all /dev/sda
# using cgdisk to create GPT (root, home, swap) partitions; alternative to fdisk (which creates MBR partitions)
$ cgdisk /dev/sda
   1        6.0 GiB    Linux filesystem
   2        1024MB GiB  Linux filesystem
   3        1024MB GiB  Linux filesystem
# create filesystems
$ mkfs.ext4 /dev/sda1 ; mkfs.ext4 /dev/sda2
$ mkswap /dev/sda3 ; swapon /dev/sda3
# mount the partitions
$ lsblk -f
$ mount /dev/sda1 /mnt
$ mkdir /mnt/home ; mount /dev/sda2 /mnt/home

# optionally select a mirror
$ nano /etc/pacman.d/mirrorlist
# install the base system
$ pacstrap -i /mnt base base-devel
# generate an fstab
$ genfstab -U -p /mnt >> /mnt/etc/fstab
$ nano /mnt/etc/fstab

# chroot and configure the base system
$ arch-chroot /mnt /bin/bash
# locale, uncomment 'en_US.UTF-8 UTF-8'
$ nano /etc/locale.gen
$ locale-gen
$ echo LANG=en_US.UTF-8 > /etc/locale.conf
$ export LANG=en_US.UTF-8
# console font and keymap
# nano /etc/vconsole.conf
KEYMAP=pt-latin1
FONT=lat9w-16
# time zone
$ ln -s /usr/share/zoneinfo/Europe/Lisbon /etc/localtime
# hardware clock
$ hwclock --systohc --utc
# kernel modules '/etc/modules-load.d/*.conf', no need to set since all are loaded automatically by udev
# hostname
$ echo archlinux > /etc/hostname

# configure the network; wired using dhcpd (see 'ip link')
$ systemctl enable dhcpcd@ens32.service

# generate kernel config
$ nano /etc/mkinitcpio.conf
$ mkinitcpio -p linux

# set the root password
$ passwd

# install and configure a bootloader, using grub
$ pacman -S grub
$(ether BIOS) grub-install --target=i386-pc --recheck --force /dev/sda
$(or UEFI) grub-install --target=x86_64-efi --efi-directory=$esp --bootloader-id=arch_grub --recheck
$ grub-mkconfig -o /boot/grub/grub.cfg

# add users, see https://wiki.archlinux.org/index.php/users_and_groups
$ useradd -m -G wheel -s /bin/bash 
$ passwd 
$ nano /etc/sudoers
%sudo ALL=(ALL) ALL

# add openssh, see https://wiki.archlinux.org/index.php/Secure_Shell
$ pacman -S openssh
$ systemctl start sshd.service
$ systemctl enable sshd.service

# change shell prompt, see https://wiki.archlinux.org/index.php/Color_Bash_Prompt
$ cat ~/.bashrc
PS1='\[\e[1;32m\][\u@\h \W]\$\[\e[0m\] '

# unmount the partitions and reboot
$ exit ; reboot

from arch beginners guide

  • Xorg is the public, open-source implementation of the X window system version 11.
  • LightDM is a lightweight cross-desktop display manager, replaces deprecated SLiM.
  • i3 is a dynamic tiling window manager.
  • MATE Desktop Environment is the continuation of GNOME 2.
  • openbox is a lightweight, powerful, and highly configurable stacking window manager with extensive standards support. Runs independently or within other desktops (e.g.: LXDE).
# update system
$ pacman -Syu
# removing orphaned packages
$ pacman -Rns $(pacman -Qtdq)

# install xorg and drivers
$ pacman -S xf86-video-vmware | xf86-video-intel | nvidia nvidia-utils pangox-compat | xf86-video-ati (see https://wiki.archlinux.org/index.php/xorg)
$ pacman -S xorg-server ttf-dejavu
$ pacman -S xterm (or rxvt-unicode, see https://wiki.archlinux.org/index.php/rxvt-unicode)
$ localectl set-x11-keymap pt

# install lightdm login/display manager, use F9 to change session
$ pacman -S xorg-server-xephyr lightdm lightdm-gtk2-greeter
$ systemctl enable lightdm.service
# see https://wiki.archlinux.org/index.php/LightDM#Missing_icons_with_GTK_greeter
$ pacman -S adwaita-icon-theme
$ nano /etc/lightdm/lightdm-gtk-greeter.conf
[greeter]
theme-name = TraditionalGreen
icon-theme-name = mate
font-name = Sans 10
background = /usr/share/backgrounds/mate/nature/Wood.jpg

# install desktops 
$ pacman -S i3 dmenu
$ pacman -S mate mate-extra (or just 'mate-panel')
$ pacman -S lxde (or just 'lxde-common openbox obconf obmenu lxappearance tint2')
$ pacman -S xfce4 xfce4-goodies
$ pacman -S cinnamon
$ pacman -S gnome gnome-extra (or just 'gnome-shell')
$ pacman -S kde (or just 'kdebase')

# generate openbox menus, see http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html
$ yaourt obmenu-generator
$ obmenu-generator -i -p
$ openbox --reconfigure

from arch install

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s