Skip to content

Arch Post Install

November 8, 2023
January 8, 2021

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

cinnamon-setup

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 exa fish guake ttf-firacode-nerd noto-fonts-emoji sshfs tmux tree vim xsel
yay -S colordiff diff-so-fancy fpp httpie mlocate shellcheck-bin
# new way to rebind mouse/keyboard keys (rather than using X11 conf)
yay -S xbindkeys xautomation
yay -S dropbox google-chrome sublime-text-3 visual-studio-code-bin

# admin tools
baobab dconf dconf-editor htop lnav xbindkeys xautomation xev xdo
# system tools
base-devel cmake docker docker-buildx lshw nethogs pyenv sysstat udev-browse-git

# runtime
jre11-openjdk-headless
dotnet-sdk nuget

# browser
firefox google-chrome profile-sync-daemon
# cloud storage
dropbox pcloud-drive
# graphics
gimp flameshot inkscape pinta yed pencil-bin zathura
# ui tools
clipit zenity
rofi goldendict
mediainfo-gui meld sublime-merge
# office tools
libreoffice-fresh teamviewer turbovnc
# ebook
calibre
# communication tools
teams signal-desktop

# network
openconnect networkmanager-openconnect networkmanager-pptp

# server tools
studio-3t sqlitestudio
# 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

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/

Terminal

rm -rf ~/.config/fish
ln -sf ~/caravan/home/apps.conf/fish ~/.config/fish
chsh -s /bin/fish $USER

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

ln -s ~/caravan/home/apps.conf/starship.toml ~/.config/

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.

rm -rf ~/.config/psd
ln -sf ~/caravan/home/apps.conf/psd ~/.config/psd

psd preview

# add `{user} ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper` to
sudo visudo -f /etc/sudoers.d/psd

# such that this command does not requires password
sudo -n /usr/bin/psd-overlay-helper

systemctl --user enable --now psd

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

smb.conf.default

sudo cp ~/caravan/home/rfs/etc/samba/smb.conf /etc/samba/
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 lib32-mesa xf86-video-amdgpu
vulkan-radeon lib32-vulkan-radeon # MESA Vulkan, better performance
amdvlk lib32-amdvlk  # AMD Vulkan
libva-mesa-driver mesa-vdpau # video acceleration
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
sudo yremove nvidia nvidia-lts
# need alternate vulkan driver before uninstalling
sudo yremove 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 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

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?)

pacman -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