Skip to content

Instantly share code, notes, and snippets.

@lvaylet
Last active February 26, 2024 01:14
Show Gist options
  • Save lvaylet/738166c75d30dcb43eb1a3b2e0634cc6 to your computer and use it in GitHub Desktop.
Save lvaylet/738166c75d30dcb43eb1a3b2e0634cc6 to your computer and use it in GitHub Desktop.
Install XOrg and a Window Manager on a Clean Install of Arch Linux - DistroTube

Install Xorg and a Window Manager (dwm, XMonad) on a Clean Install of Arch Linux

dwm + st + dmenu, custom build from DistroTube

Following up on Arch Linux Installation Guide , lauch VM with clean install and log in as a normal user.

Install video driver, X.Org, X.Org initialization program, wallpaper manager, compositor, text editor, terminal emulator and web browser with:

sudo pacman -S xf86-video-fbdev xorg xorg-xinit nitrogen picom vim xterm firefox

Install yay to enable AUR with:

pacman -S base-devel
git clone https://aur.archlinux.org/yay-git.git
cd yay-git
makepkg -si

Install custom suckless builds of window manager (dwm), terminal (st) and menu (dmenu), as well as the Mononoki Nerd Font with:

yay -S {dwm,st,dmenu}-distrotube-git nerd-fonts-mononoki

Note that installing these packages from AUR no longer works after they were deleted by the AUR team. Check dt-arch-repo for more details. In order to install the packages with pacman, just add the following lines to the end /etc/pacman.conf:

[dt-arch-repo]
SigLevel = Optional DatabaseOptional
Server = https://gitlab.com/dwt1/$repo/-/raw/master/$arch

Then sync the repositories and update your system with sudo pacman -Syyu. Finally, install the packages with:

sudo pacman -S {dwm,st,dmenu}-distrotube-git

Clone a sample xinit configuration with:

cp /etc/X11/xinit/xinitrc ~/.xinitrc
vim ~/.xinitrc

and replace:

twm &
xclock ...
xterm ...
xterm ...
exec xterm ...

at the bottom with:

nitrogen --restore &
picom &
exec dwm

Then reboot with sudo reboot, log in as a normal user and run:

startx

If DWM does not start after a couple of seconds, check that Display > Graphics Controller is set to VMSVGA and 3D Acceleration is disabled in Virtualbox settings. Reboot, log in again as normal user and run startx again.

  • Super + Enter for terminal (st)
  • Super + Shift + Enter for menu (dmenu)
  • Super + Shift + q to quit dwm

List available display resolutions and adjust with:

xrandr
xrandr -s NNNNxNNNN

Download wallpapers with:

git clone https://gitlab.com/dwt1/wallpapers.git

Start Nitrogen with dmenu, go to Settings, add ~/wallpapers, pick a wallpaper, select Scaled at the bottom left and click Apply.

Add xrandr -s ... to ~/.xinitrc to apply resolution on startup.

In order to skip the startx command and go straight to dwn as soon as a normal user logs in, edit .bash_profile and append:

[[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1

Reboot with sudo reboot, log in as a normal user and confirm X starts automatically.

If you only run one window manager, it makes sense not to install a login manager like lightdm.

Finally, git clone your dotfiles and you are done!

XMonad

Same instructions, except:

sudo pacman -S xf86-video-fbdev xorg xorg-xinit nitrogen picom vim xterm firefox xmonad xmonad-contrib dmenu

In XMonad:

  • Mod + Shift + Enter for terminal (xterm)
  • Mod + p for menu (dmenu)
  • Mod + Shift + c to close the active window
  • Mod + Shift + q to quit XMonad

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment