Important I have not maintained this page since we moved from i3 to sway. We recommend the following sway page. sway Desktop Environment in Arch Linux
This note is recorded when I configure Arch Linux with i3 Desktop Environment.
User #
“User” section operations are performed on the root account.
Create general user #
Add general user:
useradd -m -G wheel "user name"Set up a password:
passwd "user name"Enable Sudo #
Enable sudo on wheel group:
EDITOR=vim visudoTo allow members of group wheel sudo access:
%wheel ALL=(ALL:ALL) ALLSubsequent operations are performed by the created general user.
Network #
Resolve #
Enable resolve with systemed-resolved:
sudo systemctl start systemd-resolved.service
sudo systemctl enable systemd-resolved.service
sudo mv /etc/resolv.conf /etc/resolv.conf.org
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.confNetworkManager #
Install NetworkManager. Use NetworkManager instead of systemd-netwokrd for vpn connection:
# install
sudo pacman -S networkmanager
sudo systemctl enable NetworkManager.service
sudo systemctl start NetworkManager.serviceDate #
Enable systemd-timesyncd:
sudo systemctrl start systemd-timesyncd.service
sudo systemctrl enable systemd-timesyncd.servicePacman #
Comparing versions before updating #
To see old and new versions of available packages, uncomment the VerbosePkgLists line in /etc/pacman.conf.
Enabling parallel downloads #
To download packages in parallel, uncomment the VerbosePkgLists line in /etc/pacman.conf.
Coloring #
To colorise the output, uncomment the Color line in /etc/pacman.conf.
Pacman #
To Make Pacman appear in the output of pacman. Add ILoveCandy under [options] in /etc/pacman.conf.
Cleaning the package cache #
To clean the package cache, install paccache privided within the pacman-contrib:
sudo pacman -S pacman-contribEnable and start paccache.timer to discard unused packages weekly:
sudo systemctl enable paccache.timer
sudo systemctl start paccache.timerUseful packages #
Install useful packages:
sudo pacman -S git wget man-db man-pagesAUR Helper #
Install yay as AUR Helper:
mkdir -p ~/.local/src
cd ~/.local/src
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -siZsh #
Install Zsh:
sudo pacman -S zshChange login shell Zsh:
chsh -s /bin/zshConfigure Zsh. Zsh config file
Maintenance of file system #
SSD #
sudo systemctl enable fstrim.timerBtrfs #
# root(/)
sudo systemctl enable [email protected]
# /home (if mount)
sudo systemctl enable [email protected]GUI #
Display Server #
Install x as a display server:
sudo pacman -S xorg-serverDisplay Manager #
Install lightDM as a Display Manager:
sudo pacman -S lightdm lightdm-gtk-greeterEnable lightDM:
sudo systemctl enable lightdmWindow Manager #
Install i3(+i3blocks) as a Window Manager:
sudo pacman -S i3Configure i3. i3 config Configure i3-blocks. i3blocks config
Window #
Install picom
sudo pacman -S picomConfigure picom. picom config
add auto-start config to ~/.config/i3/config:
exec --no-startup-id picom --config ~/.config/picom/picom.confScreen Locker #
Install light-locker as a screen locker:
sudo pacman -S light-lockeradd auto-start config to ~/.config/i3/config:
# start
exec --no-startup-id "light-locker --lock-on-suspend"
# set lock command
bindsym $mod+Shift+x exec --no-startup-id light-locker-command -lClipboard #
Install Greenclip as a clipboard manager:
yay -S rofi-greenclipConfig Greenclip. Greenclip config
Start/enable the user unit greenclip.service:
# start
systemctrl --user start greenclip.service
# enable
systemctrl --user enable greenclip.serviceMulti Monitor #
autorandr automatically detect when a new display is connected, and then change the layout based on profiles.
Font #
Noto font #
Install Noto font:
sudo pacman -S noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extraCica font #
Install Cica font as a programming font.
Download latest Cica font. Unzip zip file:
unzip Cica_vx.x.x.zip -d Cicamove Cica Font.
mv Cica ~/.local/share/fonts/Update font cache:
fc-cache -vfFontconfig #
Set up fontconfig. make config directory:
mkdir $XDG_CONFIG_HOME/fontconfig/conf.dEdit $XDG_CONFIG_HOME/fontconfig/conf.d/system_fonts.conf as follows:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Noto Serif</family>
<family>Noto Serif CJK JP</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Sans</family>
<family>Noto Sans CJK JP</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Noto Sans Mono</family>
<family>Noto Sans Mono CJK JP</family>
</prefer>
</alias>
</fontconfig>Rebuild fontconfig:
fc-cache -vfSound #
Install sound server:
sudo pacman -S pipewire wireplumber pipewire-alsa pipewire-pulse pavucontrolBluetooth #
Install bluetooth libraries.
sudo pacman -S bluez bluez-utils bluemanEnable bluetooth.service
sudo systemctl start bluetooth.service
sudo systemctl enable bluetooth.serviceKeyboard Input #
key repeat #
Set up key repeat:
exec --no-startup-id xset r rate 200 25key remap #
Xremap is a key remapper for Linux
Install Xremap:
yay -S xremap-x11-binConfig Xremap. xremap config
Run xremap without sudo as follows. Running xremap without sudo
And, the following is also required:
sudo gpasswd -a "USER_NAME" inputadd auto-start config to ~/.config/i3/config:
exec --no-startup-id xremap ~/.config/xremap/config.ymlTouchpad #
Edit /etc/X11/xorg.conf.d/50-touchpad.conf as follows:
Section "InputClass"
Identifier "libinput touchpad"
Driver "libinput"
MatchIsTouchpad "on"
Option "Tapping" "on"
Option "naturalScrolling" "on"
Option "Accel Speed" "1"
EndSectionInput Method #
Install fcitx5-skk:
sudo pacman -S fcitx5-skk fcitx5-im fcitx5-configtoolEdit ~/.xprofile as follows:
#!/bin/sh
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitxadd auto-start config to ~/.config/i3/config:
exec --no-startup-id fcitx5wallpaper #
Install wallpaper and feh:
sudo pacman -S archlinux-wallpaper fehSet up wallpaper:
exec --no-startup-id "feh --no-fehbg --bg-fill '/usr/share/backgrounds/archlinux/small.png'"GUI Applications #
thunar #
Install thunar as a file manager:
sudo pacman -S thunar gvfs gvfs-smb sshfsrofi #
Install rofi as a clone of a simple switcher:
sudo pacman -S rofiConfigure rofi. rofi config
wezterm #
Install wezterm as a Terminal:
sudo pacman -S weztermConfigure wezterm in ~/.config/wezterm/wezterm.lua
local wezterm = require 'wezterm';
return {
font = wezterm.font("Cica"),
use_ime = true,
font_size = 20.0,
color_scheme = "Japanesque",
hide_tab_bar_if_only_one_tab = true,
adjust_window_size_when_changing_font_size = false,
}NextCloud #
Install client:
sudo pacman -S nextcloud-clientInstall libraries for Auto login:
sudo pacman -S qtkeychain-qt5 libsecret gnome-keyring seahorseLightDM already has the necessary PAM configuration. The password for the user account should be the same as the default keyring.
Google Chrome #
Install Google Chrome:
yay -S google-chromeEnpass #
Install Enpass:
yay -S enpass-bingufw #
Install gufw:
yay -S gufwOpenVPN #
Install OpenVPN support:
sudo pacman -S networkmanager-openvpnInstall nm-applet as GUI:
sudo pacman -S network-manager-appletAdd auto-start config to ~/.config/i3/config:
exec --no-startup-id nm-appletClick the plus sign to add a new connection and choose OpenVPN In desktop environment network setting.
Import The client configuration profile by selecting Import a saved VPN configuration... and selecting the appropriate file(xxx.ovpn file).
Set only certain network connections via vpn.
Click IPv4 Settings -> Routes... in vpn config.
Add certain network, and check Use this connection only for resources on it network.