Skip to content

Arch Post Install

January 9, 2025
January 8, 2021

desktop agnostic installations (but expects GTK-based ones)
try to automate these after installing packages

cinnamon-setup
gnome-notes

ln -sf ~/Dropbox/caravan ~/caravan
ln -sf ~/Dropbox/caravan/wip ~/wip
ln -sf ~/Dropbox/caravan/seasoned.bits ~/seasoned.bits
ln -sf ~/Dropbox/commonroom ~/commonroom

# the script also create symlinks
ln -sf ~/Dropbox/caravan ~/caravan
set -x CARAVAN_ENV [home|64.48]
~/caravan/home/0-install-caravan.sh $CARAVAN_ENV

The packages are to be installed with yay -S --needed (aliased to yinst).
Look them up in Arch and AUR repo to find info about them if you are using other distro/OS.

See pigmonkey/spark: Arch Linux Provisioning with Ansible
Create A List Of Installed Packages And Install Them Later From The List In Arch Linux - OSTechNix

# priority packages
# console tools
yay -S --needed --noconfirm eza fish guake kitty ttf-firacode-nerd noto-fonts-cjk noto-fonts-emoji sshfs starship tmux tree neovim vim xsel yq
yay -S --needed --noconfirm colordiff diff-so-fancy fpp hadolint jshon plocate shellcheck-bin zoxide
# new way to rebind mouse/keyboard keys (rather than using X11 conf)
yay -S --needed --noconfirm sxhkd xautomation xev xdo xdotool
yay -S --needed --noconfirm dropbox pcloud-drive google-chrome sublime-text-3 visual-studio-code-bin 7-zip-full nemo nemo-compare

# admin tools
baobab dconf dconf-editor htop lnav mimeo
# system tools
base-devel ccache clang cmake docker docker-buildx docker-compose lshw nethogs pyenv sysstat
#  udev-browse-git

# runtime
jre-openjdk-headless jre11-openjdk-headless
dotnet-sdk nuget
go zig zls

# browser
firefox google-chrome profile-sync-daemon gnome-browser-connector
# cloud storage
dropbox pcloud-drive
# graphics
drawio-desktop gimp imagemagick inkscape pinta viewnior
# zathura zathura-pdf-mupdf
# yed pencil-bin
# ui tools
nemo
zenity goldendict
rofi rofi-power-menu rofimoji
meld sublime-merge
mediainfo mediainfo-gui mpv subtitleeditor
# office tools
libreoffice-fresh teamviewer turbovnc
# ebook
calibre
# communication tools
teams signal-desktop

# network
openconnect networkmanager-openconnect networkmanager-pptp tailscale

# server tools
dbgate #studio-3t sqlitestudio
# image viewers, need review
meh
feh

pdfchain  # gcc 4.8
lostfiles

/etc/

Increase inotify count for Dropbox, and possibly more.
When Dropbox seems to fail to sync files, start Dropbox in CLI, see if it reports "Unable to monitor entire Dropbox folder hierarchy."

Permanently:

su
cd ~/caravan/home/$CARAVAN_ENV.rfs
cp hosts /etc/

cp ./home.rfs/etc/systemd/journald.conf /etc/systemd/journald.conf
cp ./home.rfs/etc/sysctl.d/* /etc/sysctl.d/
sysctl --system

Temporarily:

cat /proc/sys/fs/inotify/max_user_watches
sudo echo 150000 > /proc/sys/fs/inotify/max_user_watches

Terminal

# setup dotfiler
git clone https://github.com/svetlyak40wt/dotfiler ~/.dotfiles

cd ~/.dotfiles
# create symlinks to this folder
./bin/dot update
chsh -s $(which fish) $USER

fish
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
fisher update

Profile sync

Profile-sync-daemon - ArchWiki
How To Sync Browser Profile Into Tmpfs (RAM) In Linux

graysky2/profile-sync-daemon: Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.

sudo cp ~/caravan/home/home.rfs/etc/sudoers.d/10-psd-overlay-helper /etc/sudoers.d
# such that this command does not requires password
sudo -n /usr/bin/psd-overlay-helper

psd preview
# quit all browsers first
systemctl --user enable --now psd

Dracula theme

Dark theme for Gnome Terminal and 142+ apps — Dracula
Dark theme for Gedit and 142+ apps — Dracula

cd /tmp && git clone https://github.com/dracula/gnome-terminal
cd gnome-terminal && ./install.sh

cd /tmp && wget https://raw.githubusercontent.com/dracula/gedit/master/dracula.xml
mkdir -p $HOME/.local/share/gedit/styles/
cp dracula.xml $HOME/.local/share/gedit/styles/

overGrive

Add ~/caravan/applications/overGrive-3.3.9-x86_64.AppImage to startup

Sublime Text

sublime-text-3 is installed as subl3

subl3

# use my settings in Dropbox/caravan
mv ~/.config/sublime-text-3/Packages ~/.config/sublime-text-3/Packages.bak
ln -s ~/caravan/home/apps.conf/sublime-text-3/Packages/ ~/.config/sublime-text-3/Packages

Visual Studio Code

use built-in Settings Sync

vscode#Settings Sync

SSH Server

OpenSSH - ArchWiki

sudo systemctl enable --now sshd

Java

Java - ArchWiki

Use archlinux-java to select Java Runtime

Samba

Samba - ArchWiki
smb.conf.default

yay -S samba
cd ~/caravan/home.rfs
sudo cp etc/samba/smb.conf /etc/samba/
sudo testparm -d 5 etc/samba/smb.conf # this should pass
sudo systemctl enable --now smb.service

# add samba user
sudo smbpasswd -a $USER
# list users
sudo pdbedit -L -v
# show shares
smbclient -L <server> -U%

display driver

Proprietary (non-free) drivers is a source of problem. You will have to rebuild the driver every time the kernel is updated. Otherwise X will fail to start.
If performance is not an issue it is recommended to use the free drivers.

Install Video Drivers on Arch Linux | DominicM

Vulkan - Industry Forged
Vulkan (API) - Wikiwand
Vulkan - ArchWiki

Install And Test Vulkan On Linux vulkaninfo in vulkan-tools

arunsivaramanneo/GPU-Viewer: A front-end to glxinfo, vulkaninfo, clinfo and es2_info - Linux gpu-viewer

Hybrid graphics - ArchWiki
Complete disable of discrete GPU : linux

AMD

AMD: Download Drivers
AMDGPU - ArchWiki
AMDGPU PRO - ArchWiki


mesa xf86-video-amdgpu
vulkan-radeon # MESA Vulkan, better performance
amdvlk  # AMD Vulkan
libva-mesa-driver mesa-vdpau # video acceleration

lib32-mesa
lib32-vulkan-radeon # MESA Vulkan, better performance
lib32-amdvlk  # AMD Vulkan
lspci -k

# kernel driver should show amdgpu

nVidia

NVIDIA - ArchWiki
NVIDIA/Tips and tricks - ArchWiki
Nvidia installer – Discovery

Nvidia glx is not loading / Kernel & Hardware / Arch Linux Forums
(EE) NVIDIA: Failed to load module "glxserver_nvidia" (module does not exist, 0) in Xorg.0.log, glxinfo shows MESA driver

ubuntu-mate/mate-optimus: NVIDIA Optimus GPU switcher

# drivers
nvidia nvidia-lts nvidia-utils nvidia-libgl lib32-nvidia-utils lib32-nvidia-libgl

How to set Nvidia GPU Power Limit (nvidia-smi)? - Software & Operating Systems / Linux - Level1Techs Forums

# query power limit
sudo nvidia-smi -q -d POWER
# apply power limit
sudo nvidia-smi -pl (base power limit+11)
# `-pm` to persist settings
# `-i N` for N-th GPU
# uninstall
yay -R nvidia nvidia-lts
# need alternate vulkan driver before uninstalling
yay -R nvidia-utils nvidia-libgl lib32-nvidia-utils lib32-nvidia-libgl
# [How to Fix - Failed to Start Light Display Manager Error [Solved]](https://www.debugpoint.com/failed-to-start-lightdm/)
# !important, regenerate X conf and replace `/etc/X11/xorg.conf`
sudo X --configure

Intel

Intel graphics - ArchWiki
man intel

xf86-video-intel now used DRI3 by default, modify /etc/X11/xorg.conf.d/20-intel.conf to change to DRI2:

Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
  Option      "DRI" "2"             # DRI3 is now default
  #Option      "AccelMethod"  "sna" # default
  #Option      "AccelMethod"  "uxa" # fallback
EndSection

Hardware acceleration

Hardware video acceleration - ArchWiki
HardwareVideoAcceleration - Debian Wiki
There are two APIs for hardware video acceleration: VA-API and VDPAU. It's better to install both.

Note: mpv's wiki says both are old and not needed for hardware decoding

# tools
# libva-* or driver for graphic card
libvdpau-va-gl      # VDPAU backend for VA-API
libva-vdpau-driver  # VA-API backend for VDPAU
libva-utils vdpauinfo

pacman repo

not needed for modern distro like Endeavour OS

Multilib - ArchWiki

sudo vi /etc/pacman.conf
# Uncomment `[multilib]` section

# update mirrorlist
sudo su
sudo pacman-mirrors -i # or -g

sudo pacman -Syy

# update
pacman -Syyu

IME

黑眼珠 2: GNOME3: 選擇您的輸入法(openSUSE 13.1)

fcitx

Fcitx - Fcitx
Fcitx - ArchWiki

Fcitx5 - ArchWiki
hosxy/Fcitx5-Material-Color: 一款使用 Material Design 配色的 fcitx5 皮肤,喜欢的话给个 star 吧 ヾ(≧ へ ≦)〃 😉
fcitx/fcitx5-table-extra

Fcitx: Input Method Editor Made Easy On Linux - YouTube

yay -S --needed --noconfirm fcitx5-im fcitx5-table-extra

# reload
fcitx5 -r
# dump settings and environments
fcitx5-diagnose
$ vi ~/.xprofile
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx
export GLFW_IM_MODULE=ibus

Settings

"Cangjie3" has </kbd> as Pinyin shortcut and ? as wildcard

Mozc

google/mozc: Mozc - a Japanese Input Method Editor designed for multi-platform
Mozc - ArchWiki
Mozc: How To Start Typing With Japanese Input - YouTube

gcin

Gcin - ArchWiki
Chinese input in terminal w Gcin issue / ArchBang Forums

$ vi ~/.xprofile
export GTK_IM_MODULE=gcin
export XMODIFIERS=@im=gcin
export LC_CTYPE=zh_TW.UTF-8
gcin &

Bluetooth

Bluetooth - ArchWiki
Bluetooth – EndeavourOS
Get bluetooth auto-connected with A2DP – EndeavourOS

Remove indexer (Antergos only?)

yay -Rs tracker bijiben gnome-music gnome-online-miners totem zeitgeist

Network

systemd-networkd - ArchWiki

DNS resolver

~/caravan/home/rfs/etc/resolv.conf

Get Started | Public DNS | Google Developers

Static IP

Edit /etc/systemd/network/wired.network:

[Match]
Name=enp63s0

[Network]
Address=10.6.64.48/24
Gateway=10.6.64.1

Revert to DHCP:

[Match]
Name=enp63s0

[Network]
DHCP=ipv4
sudo systemctl enable systemd-networkd
sudo systemctl restart systemd-networkd

You can lookup interface name with ifconfig/ls /sys/class/net.
Network configuration - ArchWiki
systemd-networkd - ArchWiki

virtualbox

virtualbox may require new kernel, update kernel before installing it

add /etc/modules-load.d/virtualbox.conf:

vboxdrv
vboxnetadp
vboxnetflt
vboxpci

Steam

Steam - ArchWiki
You can now move your game install folders using Steam
Moving a Steam Installation and Games - General Troubleshooting - Knowledge Base - Steam Support

5 Reasons Why This Linux Gaming OS Is Great For Your Living Room
gamer-os/steam-tweaks: Various tools for tweaking Steam/game settings

flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak --user install flathub com.valvesoftware.Steam
# to allow using $HOME
sudo flatpak override com.valvesoftware.Steam --filesystem=$HOME
flatpak run com.valvesoftware.Steam
linux-steam-integration steam-native-runtime

install 32 bits graphic drivers!!!

# use native runtime
STEAM_RUNTIME=0 steam

teamviewer

sudo systemctl enable --now teamviewerd

mlocate

sudo updatedb

add user to group

# for wireshark
sudo usermod -a -G wireshark $USER
# for nginx
# enable `user http;` in `/etc/nginx/nginx.conf`
sudo usermod -a -G http $USER
chgrp -R http /www/public/
# for /dev/tty*
sudo usermod -a -G uucp $USER