Common Software and Configuration for Arch Linux
2024-11-18  / Arch Linux Series

Input method

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Install Pinyin Input Method fcitx5

# 1. Install fcitx5 related packages
# fcitx5-pinyin-zhwiki: Offline dictionary
$ sudo pacman -S fcitx5-im fcitx5-chinese-addons fcitx5-material-color fcitx5-pinyin-zhwiki

# 2. Configure environment variables
$ sudo vim /etc/environment
# set fcitx5
INPUT_METHOD=fcitx5
GTK_IM_MODULE=fcitx5
QT_IM_MODULE=fcitx5
XMODIFIERS=@im=fcitx

# Supplement:
$ vim ~/.xprofile
export INPUT_METHOD=fcitx5
export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
export XMODIFIERS=@im=fcitx5

# 3. Add autostart
System Settings / Startup and shutdown / Autostart:点击 Add / Add Application,搜索 fcitx5,并添加 /usr/bin/fcitx5。

# 4. Restart, take effect

# 5. Add input method
# System Setting / Search `Input method`: Click `Add Input Method`, search for `pinyin`, and add.

Install zsh/oh-my-zsh and related plugins

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Most default shells are bash, it is recommended to use zsh, which provides more useful features
# Install zsh
$ yay -S zsh
# Change default shell, or edit /etc/passwd file, modify the default shell (/bin/zsh) after the username to change the default shell
$ chsh -s /bin/zsh

# Install oh-my-zsh-git: It is a community-driven zsh management tool that provides rich plugins and themes
$ sudo pacman -S oh-my-zsh-git
# Default configuration
$ sudo cp /usr/share/oh-my-zsh/zshrc ~/.zshrc

# Change theme: Modify ZSH_THEME to the theme you want, themes can be seen at: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
$ vim ~/.zshrc

# Plugins: https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins-Overview
# Install plugins:
# zsh-syntax-highlighting: Provides command highlighting, for example, commands that are entered incorrectly are displayed in red, and commands that are entered correctly are displayed in green
# zsh-autosuggestions: Provides command suggestions, which can automatically suggest completion based on the Shell commands you execute
$ yay -S zsh-syntax-highlighting zsh-autosuggestions
# Plugins that need to be installed are placed in `/usr/share/oh-my-zsh/custom/plugins/`
$ sudo ln -s /usr/share/zsh/plugins/zsh-syntax-highlighting /usr/share/oh-my-zsh/custom/plugins/
$ sudo ln -s /usr/share/zsh/plugins/zsh-autosuggestions /usr/share/oh-my-zsh/custom/plugins/
# autojump: Fuzzy address jump based on access records, usage document: https://github.com/wting/autojump
$ yay -S autojump

# Configure plugins to be added
$ vim ~/.zshrc
plugins=(
git
autojump
zsh-syntax-highlighting
zsh-autosuggestions
)

# Take effect .zshrc
$ source ~/.zshrc

# After the autojump plugin is configured, you can view the recorded access paths (stored in autojump.tx)
$ j --stat
10.0: /home/ray/Project
14.1: /usr/share/fonts
________________________________________

24: total weight
2: number of entries
0.00: current directory weight

data: /home/ray/.local/share/autojump/autojump.tx
# Fuzzy match "pro" directory, and open it with file manager
$ jo pro

# Create personal profile file: Since the shell is changed to zsh, you need to activate the configuration `.profile` in `.zshrc`, subsequent personal environment variables and other configurations can be written to `~/.profile`
# Or you can add `\$HOME/.profile` to the end of `.zshrc` yourself
$ echo "\n# activate home custom profile\n. \$HOME/.profile" >> ~/.zshrc
# Activate the newly added configuration
$ source ~/.zshrc

# Supplement: Install the required symbol fonts
# https://github.com/powerline/fonts
$ sudo pacman -S powerline-fonts

System common tools/commands

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Support for recognizing ntfs format hard drives
$ sudo pacman -S ntfs-3g

# Common commands
# net-tools: Supports ifconfig, netstat, route, ...
# dnsutils (bind): Supports dig, nslookup, ...
# inetutils: Supports hostname, telnet, ...
# iproute2: Supports ip, nstat, ...
# htop: A process management tool similar to top
$ sudo pacman -S net-tools dnsutils inetutils iproute2 htop

# System monitor: If you want to use Netspeed Widget (depends on ksysguard), you need to install this, otherwise it won't display
$ sudo pacman -S ksysguard

# dialog is a tool that can be used with Shell scripts to create dialog boxes in a text interface (useful when writing shell scripts)
$ sudo pacman -S dialog

# View most of the system hardware information, including difficult-to-get memory frequencies, motherboard BIOS, etc.
$ sudo pacman -S dmidecode

# Linux power management, can save battery for laptops
# TLP Wiki: https://wiki.archlinux.org/title/TLP_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
$ sudo pacman -S tlp
$ sudo systemctl enable --now tlp

# Theme with Kvantum Manager can achieve better results
$ sudo pacman -S kvantum-qt5

Software Package Management

Downgrade

1
2
3
4
5
6
7
8
9
# expac: Can print various formats of Pacman package information
$ sudo pacman -S expac
# Sort by package size
$ expac -H M '%m\t%n' | sort -h
# View the 100 most recently installed packages
$ expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -n 100

# Draw package graph http://kmkeen.com/pacgraph/
$ sudo pacman -S pacgraph

Paru

1
2
3
4
5
6
7
8
9
10
11
12
# Based on Yay, a new AUR helper
# Official GitHub: https://github.com/Morganamilo/paru
# https://dbigr.com/article/481262/

# Install Paru
$ sudo pacman -S --needed base-devel
$ git clone https://aur.archlinux.org/paru.git
$ cd paru
$ makepkg -si

# Paru can use proxychains
$ proxychains paru -S <package>

Other Package Management Software

1
2
3
4
5
6
7
8
9
# expac: Can print various formats of Pacman package information
$ sudo pacman -S expac
# Sort by package size
$ expac -H M '%m\t%n' | sort -h
# View the 100 most recently installed packages
$ expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -n 100

# Draw package graph http://kmkeen.com/pacgraph/
$ sudo pacman -S pacgraph

Bluetooth

1
2
3
4
5
6
7
8
# Bluetooth
# bluedevil: Bluetooth graphical management tool
# pulseaudio-bluetooth: Supports Bluetooth speakers, Bluetooth headsets
$ sudo pacman -S bluez bluez-utils bluedevil pulseaudio-bluetooth
# Enable startup
$ sudo systemctl enable bluetooth.service
# Start immediately
$sudo systemctl start bluetooth.service

SSH Service

1
2
3
4
5
6
7
8
9
10
# ssh tool
$ sudo pacman -S openssh
# Start ssh service
$ sudo systemctl start sshd.service
# Enable ssh service to start on boot
$ sudo systemctl enable sshd.service
# Stop ssh service
$ sudo systemctl stop sshd.service
# Restart ssh service
$ sudo systemctl restart sshd.service
1
2
3
4
5
6
7
8
9
# fzf: Fuzzy search file artifact https://github.com/junegunn/fzf
$ sudo pacman -S fzf
# You can set the fzf display style as needed
export FZF_DEFAULT_OPTS="--height 50% --reverse --border --preview 'cat {}'"
# Personal preference, add to startup configuration file
$ vim ~/.profile
export FZF_DEFAULT_OPTS="--border --preview 'cat {}'"
# Take effect immediately, but closing the current terminal will be invalid
$ . ~/.profile

Fonts

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Install fonts
$ sudo pacman -S noto-fonts-cjk noto-fonts-emoji noto-fonts-extra adobe-source-han-serif-cn-fonts wqy-zenhei ttf-dejavu wqy-microhei

# Install windows fonts - Method 1:
$ sudo mkdir /usr/share/fonts/winfonts
# Copy windows fonts to Linux, win_font_path represents the absolute path of your `C:/Windows/Fonts`, here is `/run/media/ray/OS/Windows/Fonts`
$ sudo cp win_font_path/* /usr/share/fonts/winfonts/
$ cd /usr/share/fonts/winfonts/
$ sudo rm *.fon
# Create font index information, update font cache
$ sudo mkfontscale
$ sudo mkfontdir
$ fc-cache -fv

# Or, install windows fonts - Method 2: https://wiki.archlinux.org/title/Microsoft_fonts
$ yay -S ttf-ms-win10

Plasma Widgets

  1. Netspeed Widget: Displays upload and download network speeds, depends on ksysguard
    Pasted image 20230119145715.png

  2. Event Calendar: With time, calendar, weather, timer, Google Calendar/Tasks synchronization and other functions, highly configurable (only available for Plasma 5)
    Pasted image 20230119195648.png

  3. Tiled Menu: Magnetic start menu, similar to the start menu on Win10
    Pasted image 20230119203204.png

  4. Sticky notes: Built-in widget, convenient for taking notes
    Pasted image 20230119203834.png

KDE Apps

1
2
# kdeconnect: Enables Android phones and Arch Linux to interact on the same LAN, such as sending files, clipboard synchronization, message notifications, etc.
$ sudo pacman -S kdeconnect

dock Software / Launcher

latte-dock

1
2
# latte dock: A dock software, similar to the dock area on macOS
$ sudo pacman -S latte-dock

Rofi

1
2
3
4
5
6
7
8
9
10
11
# Rofi: https://wiki.archlinux.org/title/rofi
$ sudo pacman -S rofi

# some commands:
$ rofi -show drun -show-icons
$ rofi -combi-modi window,drun -show combi -show-icons

# https://github.com/Mange/rofi-emoji
$ sudo pacman -S rofi-emoji
# Install adapters to copy and use emojis: https://github.com/Mange/rofi-emoji#optional-dependencies
$ sudo pacman -S xdotool xsel

Browsers

1
2
3
4
5
6
7
8
9
10
11
# Google Chrome (Stable version)
$ yay -S google-chrome

# Microsoft Edge (Stable version)
$ yay -S microsoft-edge-stable-bin

# Google's open-source browser chromium
$ sudo pacman -S chromium

# Firefox browser
$ sudo pacman -S firefox

Proxy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 1. ssr
$ yay -S electron-ssr

# 2. shadowsocks-qt5
$ sudo pacman -S shadowsocks-qt5

# 3. clash
# Usage document: https://docs.cfw.lbyczf.com/
# Configuration reference: https://github.com/Dreamacro/clash/wiki/configuration
# TUN mode: For software that does not follow system proxy, TUN mode can take over its traffic and hand it over to CFW for processing
# Mixin: Supports injecting public attribute settings into all configuration files (the content of the configuration files will not be modified, and the mixing behavior will only occur in memory)
$ yay -S clash-for-windows-bin

# proxychains: For specific usage, please refer to https://wiki.archlinux.org/title/Proxy_server#Using_a_SOCKS_proxy
$ sudo pacman -S proxychains
$ sudo vim /etc/proxychains.conf
# Edit /etc/proxychains.conf, change the last line to:
socks5 127.0.0.1 1080

Downloads

aria2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# aria2 is a lightweight, multi-protocol command-line download utility. It supports protocols including HTTP(S), FTP, BitTorrent, Metalink, etc. The aria2 tool can download concurrently and also supports splicing and resuming, automatically replacing slow threads, etc.
# After installation, you can use the aria2c command
$ sudo pacman -S aria2

# You can directly refer to the configuration organized by the big guy, download to your Home directory's .aria2 directory, because the default configuration file path of aria2 is $HOME/.aria2/aria2.conf
$ git clone https://github.com/P3TERX/aria2.conf ~/.aria2
# Simply modify the downloaded aria2 configuration:
# (1) dir=/root/Download change to the download directory you need, such as dir=/home/ray/Downloads
# You can directly replace the remaining /root in batches with your own Home directory path /home/ray
# (2) rpc-secret=P3TERX it is recommended to modify

# If you encounter an error: Caught an exceptionException: [download_helper.cc:562] errorCode=1 Failed to open file $HOME/.aria2/aria2.session, reason: File not found or it is a directory
# You can create the file by yourself
$ touch /home/ray/.aria2/aria2.session

# Start aria2c, it will start listening on port 6800
$ aria2c --enable-rpc
01/26 09:45:38 [NOTICE] IPv4 RPC: Listening on TCP port 6800
01/26 09:45:39 [NOTICE] The session has been successfully serialized to /home/ray/.aria2/aria2.session.

Install Aria2 plugins for browsers:

After installing the browser plugin and enabling it, open the Aria2 plugin interface: Click AriaNG Settings -> RPC (localhost:6800)
Pasted image 20230126095145.png

Enter the RPC settings interface, you can see the default port is 6800, no need to adjust, set the Aria2 RPC key to the just set rpc-secret value, and reload the interface, if successful, you can see Aria2 status display as connected.
Pasted image 20230126095304.png

Every time you use it, you need to execute aria2c --enable-rpc, which is quite troublesome, change to start automatically.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ mkdir -p ~/.config/systemd/user
$ cd ~/.config/systemd/user
$ vim aria2.servide
[Unit]
Description=Aria2 Daemon

[Service]
ExecStart=/usr/bin/aria2c

[Install]
WantedBy=default.target

# Enable
$ systemctl --user enable aria2.service
# Start
$ systemctl --user start aria2.service
# Check status
$ systemctl --user status aria2.service

Motrix

1
2
# Multi-threaded downloader
$ sudo pacman -S motrix

Communication/Conference Software

1
2
3
4
5
6
7
8
9
10
11
# Telegram
$ sudo pacman -S telegram-desktop

# Team collaboration tool slack
$ sudo pacman -S slack-desktop

# Cisco's video conferencing software
$ yay -S webex-bin

# VDI virtual desktop, for remote office use
$ yay -S vmware-horizon-client

WeChat

docker WeChat

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
### Installation ###
# Method 1: You can directly use the following command to start
$ curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh | bash
# If the above installation is slow, domestic users (Chinese) can use the following script
$ curl -sL https://gitee.com/mirrors/dochat/raw/main/dochat.sh | bash

# Method 2: Or, directly pull down the entire project with git
$ git clone https://github.com/huan/docker-wechat.git
# Then, enter the docker-wechat directory and execute the following script to automatically download the image and start:
$ ./dochat.sh

### Installation Issues ###
# 1. Permission is not enough, and the following prompt appears:
[DoChat] Boxed WeChat v0.15.0
Disabling patch for /home/user/.wine/drive_c/users/user/AppData/Roaming/Tencent/WeChat ...
Disabling patch for /home/user/.wine/drive_c/users/user/Application Data/Tencent/WeChat ...
mkdir: cannot create directory “/home/user/.wine/drive_c/users/user/Application Data/Tencent”: Permission denied

# Solution:Grant permissions to the DoChat directory under the home directory
$ sudo chmod -R 777 ~/DoChat

# 2. main:line 82: lshw: command not found
# Solution: Install the `lshw` command
$ sudo pacman -S lshw

# 3. docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
# Solution:
# (1) First confirm whether the current NVIDIA installation is correct, refer to https://wiki.archlinuxcn.org/wiki/NVIDIA#%E5%AE%89%E8%A3%85
# (2) Then consider whether to install nvidia-container-toolkit, refer to https://github.com/NVIDIA/nvidia-docker/issues/1243

# 4. If it cannot be started, and there is no clear error message, such as `DoChat Exited with code [0]`, you can increase the debug start as follows to view:
$ curl -sL https://gitee.com/mirrors/dochat/raw/main/dochat.sh | DOCHAT_DEBUG=true bash
# If it includes the following error message
00dc:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
00dc:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
# You need to authorize access to the X server:
# The following allows all users to access the X server (https://wiki.archlinux.org/title/Xhost), and then start wechat
$ xhost +

### After Installation ###
# View images
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
zixia/wechat 3.3.0.115 69b2b2eb6770 8 months ago 3.73GB

# After starting, you can see the container DoChat
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f6068b03e6e9 zixia/wechat:3.3.0.115 "/entrypoint.sh" 20 minutes ago Up 20 minutes DoChat

# But when you leave and exit WeChat, the container will be automatically deleted because dochat.sh adds --rm to docker run, which automatically deletes the container after the container exits

# Create Desktop shortcut, more: https://wiki.archlinux.org/title/Desktop_entries
# Exec fill in the specific command to execute, use 1 as “curl -sL https://gitee.com/mirrors/dochat/raw/main/dochat.sh | bash”,use 2 as “/home/ray/Project/docker/docker-wechat/dochat.sh”``
$ cd ~/.local/share/applications/
$ vim wechat-docker.desktop
[Desktop Entry]
Name=WeChatDocker
Comment=Dockerized WeChat (盒装微信) PC Windows Client for Linux
Exec=curl -sL https://gitee.com/mirrors/dochat/raw/main/dochat.sh
Icon=wechat
Type=Application
# Verify the desktop file
$ desktop-file-validate wechat-docker.desktop
# Then you can search for "WeChatDocker" in the Menu to see it

Note-taking Software

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Obsidian note-taking software
$ sudo pacman -S obsidian

# Joplin note-taking software
# cli
$ yay -S joplin
# desktop
$ yay -S joplin-desktop

# Trilium open-source electron note-taking software
$ yay -S trilium-bin
$ yay -S trilium-server-bin

# Markdown editor
$ sudo pacman -S marktext-git

# Mind map
$ yay -S xmind

Drawing Software

1
2
# drawio
$ sudo pacman -S drawio-desktop-bin

Unarchiving Software

1
2
3
4
5
6
7
8
# ark belongs to the kde-utilities package group
$ sudo pacman -S ark

# unar, lsar
$ sudo pacman -S unarchiver

# Unzip/zip
$ sudo pacman -S unzip zip

Image/Screenshot Software

1
2
3
4
5
6
7
8
9
# gwenview belongs to the kde-graphics package group
$ sudo pacman -S gwenview

# Flameshot
$ sudo pacman -S flameshot
# You can configure the shortcut key Ctrl+Alt+A, the command configuration is: flameshot gui

# Snipaste screenshot + paste
$ yay -S snipaste

Audio/Video Software

1
2
3
4
5
# NetEase Cloud Music
$ sudo pacman -S netease-cloud-music

# Audio/video player
$ sudo pacman -S vlc

Office/Reading/PDF Software

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# LibreOffice stable version
$ sudo pacman -S libreoffice-still

# KDE's default PDF lightweight reader
$ sudo pacman -S okular

# A highly customizable, feature-rich, minimalist, vim-like shortcut key PDF reader
# Official doc: https://pwmt.org/projects/zathura/documentation/
# Supported plugins: https://pwmt.org/projects/zathura/plugins/
$ sudo pacman -S zathura-pdf-mupdf

# Foxit Reader
$ yay -S foxitreader

# WPS Office
# wps-office-mui-zh-cn: Chinese language pack
$ yay -S wps-office wps-office-mui-zh-cn wps-office-mime-cn wps-office-fonts ttf-ms-fonts ttf-wps-fonts wps-office-all-dicts-win-languages
# If wps pdf cannot start, then install libtiff5 dependency
$ yay -S libtiff5

# Comic reader
$ yay -S yacreader-poppler

# Reader suitable for touch screens
$ yay -S koreader-bin

# Hammer PDF: A new scientific and technological intelligent reader developed and maintained by the DataHammer research group of the Computer College of Beijing Institute of Technology, which can quickly analyze PDF academic literature and provide reliable academic information in real-time.
# https://github.com/HammerPDF/Smart-Scientific-Reader
$ yay -S hammer-pdf

Software Development Related Tools

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# vscode
$ yay -S visual-studio-code-bin
# If vscode's terminal cannot display some characters when using zsh, you can install the font patch
$ sudo pacman -S powerline-fonts
# Open vsode's configuration and find Terminal › Integrated: Font Family: You can change the font to Hack, it will work

# nodejs npm environment
$ sudo pacman -S nodejs npm
# Configuration: "/home/ray/" is your home directory, adjust as needed
$ npm config set prefix "/home/ray/.nodejs"
$ npm config set cache "/home/ray/.nodejs/cache"

# Database management tool
$ sudo pacman -S dbeaver

# RESP.app: Redis visualization management tool
$ sudo pacman -S resp-app

# ZooKeeper visualization management tool
$ yay -S prettyzoo

RDP

xfreerdp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# xfreerdp performs better than rdesktop
$ yay -S krdc-xfreerdp libvncserver

# Usage:
$ xfreerdp [file] [options] [/v:<server>[:port]]
# /sec:rdp Force specific rdp protocol security
# /f Fullscreen mode (<Ctrl>+<Alt>+<Enter> toggles fullscreen)
# +smart-sizing Allow RDP client to dynamically adjust the resolution of the remote desktop according to the window size
# +clipboard Enable Redirect clipboard
# /bpp:<depth> Set the color depth of the session, such as 16 efficient color depth, suitable for situations with limited bandwidth; 24: Provides richer colors, suitable for most scenarios; 32: The highest color depth, suitable for applications that require high-quality images
# +compression Enable compression to improve performance
$ xfreerdp /v:<server>[:port] /u:<username> /p:<password> /sec:rdp /f +smart-sizing +clipboard /bpp:24 +compression

# If you are not sure what the username of the Windows you want to connect to is, you can check it by entering whoami in the CMD

# If the following error occurs, try modifying the registry on the Windows to be connected: Open `Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp` and change `SecurityLayer` from 2 to 1
[ERROR][com.freerdp.core] - transport_ssl_cb:freerdp_set_last_error_ex ERRCONNECT_PASSWORD_CERTAINLY_EXPIRED [0x0002000F]
[ERROR][com.freerdp.core.transport] - BIO_read returned an error: error:0A000438:SSL routines::tlsv1 alert internal error

rdesktop

1
2
3
4
5
# rdesktop: an open source client for Windows Remote Desktop Services.
$ sudo pacman -S rdesktop

# Usage:
$ rdesktop -u <username> -p <password> <server>[:port]

Virtual Machines/Technology

Virtual Box

1
2
3
4
5
6
7
# Install virtualbox
# Determine the kernel version
$ uname -r
$ sudo pacman -S linux-headers
# Choose virtualbox-host-dkms
$ sudo pacman -S virtualbox
$ sudo pacman -S virtualbox-guest-iso

VMware

1
2
3
# Install VMware
$ sudo pacman -S linux-headers
$ sudo pacman -S vmware-workstation

Docker

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Install docker
$ sudo pacman -S docker
# Start docker
$ sudo systemctl start docker
# Set to start on boot
$ sudo systemctl enable docker

# Set docker to run without sudo
# (1) Create a docker group
$ sudo groupadd docker
# (2) Add the current user to the docker group
$ sudo usermod -aG docker $USER
# (3) Log out and log back in to the shell

# Install docker compose: container orchestration tool
$ sudo pacman -S docker-compose

Waydroid (Android Emulator)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Check the kernel version: The default Arch Linux kernel does not support binder, you need to switch to another available kernel, such as linux-zen, DKMS
$ uname -r
6.2.6-arch1-1
# Install the available kernel module linux-zen
$ sudo pacman -S linux-zen
# Regenerate the grub configuration file, and restart to find the kernel in the grub interface
sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found Linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-zen-fallback.img
Found Linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-fallback.img
Warning: os-prober will run to detect other bootable partitions. It will use the output of os-prober to detect bootable binaries in the partitions and create new boot entries. Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding UEFI firmware setup entries...
Done
# Restart and switch to the linux-zen kernel: Select the advanced options in the grub boot interface and choose to boot linux-zen
$ reboot
# Verify the current kernel, you can find that it has switched to linux-zen
$ uname -r
6.2.6-zen1-1-zen

# Waydroid requires Wayland
$ echo $XDG_SESSION_TYPE

# https://wiki.archlinux.org/title/Weston
$ sudo pacman -S weston

# Install
$ sudo pacman -S waydroid
# Initialize
$ sudo waydroid init -s GAPPS -f
# Start the service with systemctl
$ sudo systemctl start waydroid-container.service
# Start the UI
$ waydroid show-full-ui

Common Issues

Network Issues

1
2
3
4
5
6
7
$ sudo pacman -S ufw
$ sudo ufw status
$ sudo ufw enable

$ sudo ufw allow 53
$ sudo ufw allow 67
$ sudo ufw default allow FORWARD

Failed to start Clipboard manager service

1
$ sudo pacman -S python-pyclipper

Google Play: This device is not certified with Google Play Protect

1
2
3
4
5
6
# Log in to the shell
$ sudo waydroid shell
# Then enter the following command to get an android_id -> Enter https://www.google.com/android/uncertified, enter this id and register, wait for a while
ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"

$ sudo systemctl restart waydroid-container.service
1
# https://github.com/casualsnek/waydroid_script

File Sharing

Alibaba Cloud Drive WebDAV Service

  • aliyundrive-webdav github: The main scenario is to cooperate with client apps that support the WebDAV protocol such as Infuse, nPlayer, etc., to directly watch videos in the cloud drive on the TV, support client apps to directly obtain files from Alibaba Cloud Drive for playback without going through the server where this app is running, support file uploads, but limited by the WebDAV protocol does not support file second transmission.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Method one: Install Alibaba Cloud Drive WebDAV Service
$ yay -S aliyundrive-webdav-bin

# Start the service
# 1. Get the Alibaba Cloud Drive refresh token, refer to: https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh-token
# 2. Command to start, more command help can refer to: aliyundrive-webdav --help
$ aliyundrive-webdav -p <port> --auth-user <user> --auth-password <password> --refresh-token <refresh token>

# Usage
# 1. Access with Dolphin:
# 1.1. Direct url access: webdav://<ip>:<port>
# 1.2. Create a new network folder: Click "Network" -> Click "Add Network Folder" -> Choose "Web Folder (webdav)" and click Next -> Fill in the information as needed, and click Save and Connect (if you have set a password, it will prompt you to enter the password at this time) -> Done, you can see the newly added webdav folder in the "Network" folder (click to go in, you can see the files in your Alibaba Cloud Drive)

# Method two: Run with docker, more can refer to: https://github.com/messense/aliyundrive-webdav#docker-%E8%BF%90%E8%A1%8C
# --restart=unless-stopped: It means that the container will always restart when it exits, but it does not consider containers that have already stopped when the docker daemon is running
$ docker run -d --name=aliyundrive-webdav --restart=unless-stopped -p <port>:8080 \
-v /etc/aliyundrive-webdav/:/etc/aliyundrive-webdav/ \
-e REFRESH_TOKEN='<refresh token>' \
-e WEBDAV_AUTH_USER=<user> \
-e WEBDAV_AUTH_PASSWORD=<password> \
messense/aliyundrive-webdav

# After starting, you will see the refresh_token file in the /etc/aliyundrive-webdav directory of the host machine, if the refresh token is invalid, you can directly change the file here
$ ls /etc/aliyundrive-webdav
refresh_token

AList

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Installation (one-click script): After successful installation (default installation in /opt/alist), it will prompt the access address and admin account password -> Log in, click on the management at the bottom of the page to set up storage, such as adding Alibaba Cloud storage -> After setting up, you can see the files in your Alibaba Cloud
$ curl -fsSL "https://alist.nn.ci/v3.sh" | sudo bash -s install
# Update
$ curl -fsSL "https://alist.nn.ci/v3.sh" | sudo bash -s update
# Uninstall
$ curl -fsSL "https://alist.nn.ci/v3.sh" | sudo bash -s uninstall

# Check status:
$ sudo systemctl status alist
# Start service:
$ sudo systemctl start alist
# Restart service:
$ sudo systemctl restart alist
# Stop service:
$ sudo systemctl stop alist

Keyboard Mapping

1
2
# https://github.com/houmain/keymapper
$ yay -S keymapper

Others

Custom Notification Reminders

Send reminder notifications with notify-send, found online that dbus-monitor can monitor tray signals, I tried it, not sure how to implement specifically

1
2
# D-Bus visualization debugging tool
$ sudo pacman -S d-feet

pandoc

1
2
# A cross-platform, free and open-source command-line tool for converting between markup languages, known as the "Swiss Army Knife" in this field
$ sudo pacman -S pandoc

Common Issues

  1. Change single-click to double-click to open folders in file managers?

System Settings / Workspace Behavior / General Behavior: In “When clicking files or folders”, select “Select them (double-click to open files/folders)”.