Arch Linux Installation and Configuration

Arch Linux + Xfce has been my desktop operating system of choice for a number of years now. The following documents how I install and configure Arch Linux — mainly just notes for myself so I can setup/rebuild a system very quickly.

  • Base install:
  • set up ssh so you set up system over ssh connection
    • pacman -S openssh
    • systemctl start sshd
    • systemctl enable sshd
  • set up sudo (allows normal user to run commands as root using sudo)
    • pacman -S sudo
    • vi /etc/sudoers
      • uncomment: %wheel ALL=(ALL) NOPASSWD: ALL
    • sudo gpasswd -a <user> wheel
      • this allows <user> to use sudo
  • log into your new system from another computer using ssh. This allows you to copy and paste commands from these instructions. Note, you must log in as a normal user, not root. Root login via ssh is disallowed for security reasons.
    • ssh <user>@<ip address>
    • sudo su (become root user)
  • Install commonly used packages: pacman -Sy xfce4 xfce4-goodies xorg-server xorg-apps xorg-xinit xterm pulseaudio pavucontrol udisks2 udiskie bash-completion ttf-liberation ttf-bitstream-vera ttf-dejavu noto-fonts noto-fonts-emoji thunderbird chromium gimp inkscape git neovim go nautilus file-roller gvfs-mtp gvfs-gphoto2 stow tmux screen base-devel go wget rsync okular evince cups hplip system-config-printer libreoffice-fresh libreoffice-extension-texmaths hunspell¬†hunspell-en_US sudo slim wmctr docker keychain sshfs ansible net-tools lsof tcpdump wireshark jq kicad kicad-library kicad-library-3d easytag python-pip
  • Install video drivers (with pacman -S)
    • x86/Nvidia (OSS): xf86-video-nouveau
    • x86/Nvidia (proprietary): nvidia
    • x86/Nvidia older cards (proprietary): nvidia-390xx
    • rPI video: xf86-video-fbturbo-git
  • Enable and start login manager:
    • systemctl enable slim
    • systemctl start slim
    • (note, slim is not really recommended any more, but other display managers are more work so I’ve not bothered yet)
  • create .xinitrc in every users home directory with the following contents:
    • exec startxfce4
  • Install yay (used to install packages from AUR repository):
  • yay ttf-courier-prime
    • this font is very nice for source code — change terminal to use this font
  • no sudo for /usr/local:
  • add your user name to standard groups
    • sudo gpasswd -a <user> lp
      • required for printing
    • sudo gpasswd -a <user> uucp
    • sudo gpasswd -a <user> audio
    • sudo gpasswd -a <user> video
    • sudo gpasswd -a <user> docker
  • Start neovim when I type vi
    • sudo ln -sf nvim /usr/bin/vi
  • Set up dotfiles
    • git clone git@github.com:cbrake/dotfiles.git
    • cd dotfiles
    • stow tmux
    • stow nvim
    • stow screen
  • Install stuff needed by neovim
    • vi
    • :GoInstallBinaries
  • configure Xfce preferences
    • disable window preview when cycling: Settings->Window manager tweaks->show windows preview in place of icons when cycling
    • don’t have windows changing workspaces. This keeps chromium windows from all ending up in workspace: Settings->Window Manager tweaks->Focus->when a window raises itself->do nothing
    • Settings->Keyboard->Application Shortcuts:
      • (move window to left half of screen) Super + G: wmctrl -r :ACTIVE: -e 0,0,30,1280,1395
      • (move window to right half of screen) Super + H: wmctrl -r :ACTIVE: -e 0,1280,30,1280,1395
      • (launch terminal) Super + Return: dbus-launch gnome-terminal
      • (move workflowy to current desktop) Super + space: wmctrl -R Workflowy
    • Settings->Window Manager:
      • Previous workspace: Super + Left
      • Next workspace: Super + Right
      • Max window: Super + M
      • Hide window: Super + N
    • settings->Window Manager->Tweaks->Accessibility: Key used to grab and move windows: Super (super + left click moves windows, super + right click resizes windows)