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
- On x86, run through the standard installation process first.
- On an ARM system (like the Raspbery PI), see this site.
SSH
pacman -S openssh
systemctl start sshd
systemctl enable sshd
- configure ssh keys passphrase
- with keychain, it is fairly painless to use passphrases on ssh keys. This is highly recommended to prevent misuse of the keys if your computer is stolen, etc.
- add the following to
.bashrc
:eval $(keychain --eval --quiet id_rsa ~/.ssh/id_rsa)
- add the following to
.bash_profile
:. ~/.bashrc
sudo
- (allows normal user to run commands as root using sudo)
pacman -S sudo
vi /etc/sudoers
- uncomment:
%wheel ALL=(ALL) NOPASSWD: ALL
- uncomment:
sudo gpasswd -a <user> wheel
- this allows
<user>
to use sudo
- this allows
- 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 packages
- common packages:
pacman -Sy 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 firefox 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 wmctrl docker keychain sshfs ansible net-tools lsof tcpdump wireshark-qt jq kicad kicad-library kicad-library-3d easytag python-pip
- Install development packages:
pacman -S shfmt shellcheck
- 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
- x86/Nvidia (OSS):
- Install desktop environment:
- XFCE:
pacman -S xfce4 xfce4-goodies
- KDE:
pacman -S plasma kde-applications
- XFCE:
Login manager
pacman -S sddm
systemctl enable
sddmsystemctl start
sddm- (slim is an alternative login manager if sddm does not work)
- create
.xinitrc
in every users home directory with the following contents. This is only required if you are not using a login manager.exec startxfce4
Yay
- (used to install packages from AUR repository):
wget
https://aur.archlinux.org/cgit/aur.git/snapshot/yay.tar.gz
tar -xzvf yay.tar.gz
cd yay
makepkg -is
yay ttf-courier-prime
- this font is very nice for source code — change terminal to use this font
Misc customizations
- no sudo for /usr/local:
sudo chown -R $USER
/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/local/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
Desktop manager preferences
Xfce
- configure Xfce preferences
- disable window preview when cycling: Settings->Window manager tweaks->show windows preview in place of icons when cycling (this setting does not seem to be present anymore in xfce4)
- 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
- (move window to left half of screen) Super + G:
- 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)
KDE
- configure KDE preferences
- Shortcuts (starts application or brings to foreground if only one instance is allowed)
- start Konsole with Win->Enter keyboard shortcut
- start Workflowy with Win->Space keyboard shortcut
- Display Configuration
- arrange multiple monitors so they are not touching (otherwise apps may spill from one monitor to the next)
- for 27″ WQHD, set Global scale to 125%
- for 27″ UHD (4K), set Global scale to 175%
- Task Switcher
- don’t show selected window
- Compact switcher
- Cursors
- on 27″ UHD, set size to 36
- Window Behavior
- Focus follows mouse
- Desktop session
- Start with an empty session
- Configure some apps (like workflowy) to show in all Activities
- Window-Rules
- Window class, Exact Match: WorkFlowy
- Add Property -> Activities: Apply Initially: All Activities
- Window-Rules
- Shortcuts (starts application or brings to foreground if only one instance is allowed)
Networking
- for most desktop installations, network manager is recommended:
pacman -S networkmanager
systemctl start NetworkManager
systemctl enable NetworkManager
systemd-networkd
can also be used to manage networks (I often used if only using Ethernet)/etc/systemd/network/20-wired.network
[Match]
Name=enp39s0
[Network]
DHCP=ipv4
MulticastDNS=
yes
Clock/Time Synchronization
Arch by default does not enable time synchronization. To enable it:
sudo systemctl enable systemd-timesyncd sudo systemctl start systemd-timesyncd