Notes »

Void Install notes, Sway

Notes from a long time Archer doing a Void/Sway install

Prepare for Sway installation, and more!

Stop the beep (and notes)

sudo vim /etc/modprobe.d/blacklist.conf

and add the line blacklist pcspkr

Edit the $PATH in /etc/profile using appendpath

Replace sudo with doas install opendoas and then create a file with ignorepkg=sudo in /etc/xbps.d/10-ignore.conf, then you can remove the sudo package without an error

Use/install package xmirror to set where you download packages from

Basic software opinions (and sway dependencies)

xbps-install:

chrony (ntp, time daemon replacement)
neovim (a less bloaty vim)
htop
plocate (supplies locate and updatedb commands)
bind-utils (I wanted dig)
rsync
curl (xbps-fetch works like a wget replacement, but curl is needed for some install scripts)
socklog-void
seatd
dbus
sway
mako (notification daemon)
qt5-wayland
qt6-wayland (OBS needed this)
mesa-dri (needed for sway on AMD, the next two are only for video acceleration)
mesa-vaapi
mesa-vdpau
dmenu
xdg-utils (so you can set browser, open links, etc)
xdg-desktop-portal
xdg-desktop-portal-wlr (I think there's a bug fix upstream in this that will fix OBS...)
foot (Wayland compatible terminal)
xterm (This works fine too, I think I'll uninstall foot and config xterm)
xorg-fonts (have to install fonts, so many choices)
dejavu-fonts-ttf
noto-fonts-ttf (fills in unicode blocks that the other fonts don't fill)
noto-fonts-cjk (Fonts for asian glyphs)
polkit (policy kit...)
gvfs (not sure if I need this)
base-devel (for building)
gdb (for debugging)
xtools (I have these installed, but I don't know)

†Void doesn't come with a syslogger installed by default, and they suggest socklog (created by the runit author), I like to add my main non-root user to the socklog group to make digging through logs easier. Sway requires a "seat management" daemon, the Void handbook suggests either elogind or seatd. I used elogind with my NVIDIA attempt, but even that seemed a bit bloaty (it's from the systemd project, what a surprise) so I gave seatd a shot instead. nak is my user account, replace it with your own, and I don't know if you can even do multiple groups at a time with usermod, I'm just listing them here:

sudo usermod -a -G socklog _seatd nak

... and enable the services (I still haven't memorized the runit service directory format for enabling, might want to make an alias/bash function for enable/disabling services soon). Replace <SERVICE> with the service that needs enabled:

sudo ln -s /etc/sv/<SERVICE>/ /var/service

socklog-unix
nanoklogd
dbus
seatd

quick cheat sheet for sv:

  1. sv up <services>
  2. sv down <services>
  3. sv restart <services>
  4. sv status <services>

Configuration and starting sway

You'll have to create the ~/.config/sway/ directory and copy /etc/sway/config into it. I edited a bunch of the defaults to match what I'm used to from awesomewm. I like sway better and would probably check out i3 if I had to leave wayland (I don't see why I would have to do that... yet). I just login with tty1 and run a shell script to start sway:

#! /bin/bash
export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
#export QT_QPA_PLATFORM=wayland
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway
exec dbus-run-session sway

I had to comment out the QT_QPA_PLATFORM line because it broke signet, although those variables were suggested by flameshot, I haven't been able to get that software to work yet.

Set caps lock to escape key

add this block of code to sway conf under "Input configuration" (imho)

input "type:keyboard" {

    #Caps lock to Esc
    xkb_options caps:escape

}

More software opinions

xbps-install

lm_sensors
ncdu (I wanted a lite 'filelight' and this is PERFECT!)
neofetch (of course, I use linux btw)
firefox (to be replaced by LibreWolf flatpak)
evolution (experimenting with an alternative to Thunderbird, works okay so far)
element-desktop (Matrix desktop client)
pcmanfm (gui file manager)
grim (screenshot program, set this GRIM_DEFAULT_DIR=/home/$USER/screenshots)
flatpak (actually liking this for installing Discord, Zoom, etc)
encfs (a simple way to encrypt folders)
zbar (for decoding QR, barcodes)

Office/Desktop

libreoffice (of course)
evince (PDF viewer)
speedcrunch (unique calculator)

Multimedia

feh (image viewer)
mpv (video player)
yt-dlp (the working version of youtube-dl)

Creativity

gimp
audacity
blender
kdenlive (through flatpak, I didn't want all those dependencies.)

Software that isn't working yet:

obs (the pipewire screen isn't working, probably the same bug as flameshot)
flameshot (there's a patch working it's way to me in a dependency, fingers crossed, also had to manually install slurp)
cheese (I can't seem to get the picamera to get images across, I see the device name, but no image)
cups (It looks like getting printing working is going to be a bit of a project)

Audio

I tried pulseaudio and it worked out of the box, but installed pipewire with some difficulty:

xbps-install

pipewire

Turned out we have to set some ?RLIMITS?niceness? manually, I found this solution on this pipewire tuning page

create /etc/security/limits.d/95-pipewire.conf with these contents:

@pipewire - rtprio 95
@pipewire - nice -19
@pipewire - memlock 4194304

create pipewire group: sudo groupadd pipewire and and your user to it: sudo usermod -a -G pipewire nak

Some places say you shouldn't be in the audio group, for me on Void, I needed to be or else the audio cards won't show up.

Don't follow the Void Linux Handbook page on PipeWire, symlinking the .desktop file to autostart pipewire if you're using Sway... sway doesn't respect /xdg/autostart

at the bottom of the ~/.config/sway/config file, I changed the include directive to:

include config.d/*

and created the config.d directory alongside the config file in .config/sway, then created a file called "startup" in config.d:

$ cat .config/sway/config.d/startup
exec pipewire
exec pipewire-pulse

I also have these packages installed:

alsa-utils
pavucontrol

~/.bashrc

Add these lines to .bashrc and you'll search your bash history instead of just going off the last command when you press the up/down arrows:

# History search
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'

~/.inputrc

Ignore case for tab completion

$include /etc/inputrc
set completion-ignore-case on

~/.config/nvim/init.vim

This is similar to the vimrc file, here's what I have so far:

set shiftwidth=4
set expandtab
set smarttab

Just makes tabs 4 spaces etc.

Installing IPFS

  1. xbps-install go-ipfs
  2. ln -s /etc/sv/ipfs /var/service
  3. Local Web UI should be enabled after the symlink and the daemon starts
  4. Installed the IPFS Companion extension for Firefox
  5. $ ipfs init

Switching to i3

xbps-install

i3
dunst (notification daemon)

setup XDG_RUNTIME_DIR:

mkdir /run/user/$(id -u)
chown $USER:$USER /run/user/$(id -u)
chmod 700 /run/user/$(id -u)

~/.xinitrc:

export XDG_RUNTIME_DIR=/run/user/$(id -u)
pipewire &
pipeware-pulse &
exec i3

Copied the sway config over and have to comment out a few things

Brother Printer and Scanner (HL2280DW)

I haven't been able to get the printer or scanner to work.

For the scanner I've installed:

void-repo-nonfree (needed for the brother driver)
brother-brscan4
simple-scan (scanning front end)

Auto mounting USB drives with unprivileged user in wheel group

solution

// See the polkit(8) man page for more information // about configuring polkit.

// Allow udisks2 to mount devices without authentication // for users in the "wheel" group. polkit.addRule(function(action, subject) {

    if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
         action.id == "org.freedesktop.udisks2.filesystem-mount") &&
        subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }

});

Maintenance

Clean cache, remove orphans:

xbps-remove -Oo

Remove old kernels:

vkpurge rm all

XBPS Tricks

Find a package based on file it contains: xlocate from the xtools package

edit SideBar

Page last modified on June 26, 2023, at 01:13 am

^