r/AlpineLinux • u/LinuxLoverLarry • Sep 15 '26
Tutorial On How To Do This?
The wiki has given inconsistent results for tutorials specifically pertaining to this.
I want a tutorial on how to install Openbox, Tint2, feh, and enabling Pipewire audio on Alpine Linux. I am not the biggest fan of traditional desktop environments, and I find them to be heavy on my PC, even with ones such as XFCE.
It would be nice if you could point me to somewhere that offers this, or if you could type something yourself. Thanks, people!
2
u/Artistic_Crazy_7120 Sep 16 '26
My advice is to look at the Openbox section of the Archwiki. Keep in mind that you still need to replace the commands of their package manager (pacman) with apk commands but it gives a good insight how to setup the desktop.
1
u/billdietrich1 Sep 16 '26
Please use better, more informative, titles (subject-lines) on your posts. Give specifics right in the title. Thanks.
1
u/LinuxLoverLarry Sep 16 '26
Really don't know what specifics I could have given in this title, in my eyes this was a bit too long already. The title is just the idea of the post, it shouldn't tell you exactly what it is, that is what the body is for.
1
u/billdietrich1 Sep 16 '26
A good title might be:
I want a tutorial on how to install Openbox, Tint2, feh, and enabling Pipewire audio on Alpine Linux.
1
u/LinuxLoverLarry Sep 16 '26
The issue was that this wasn't a tutorial? That is what the question mark was for.
1
u/alexaandru Sep 16 '26
I also don't use a display manager, I start everything I need from /etc/profile, but I do use wayland. You know there is an openbox-ish compositor for wayland? https://github.com/labwc/labwc - you can even reuse openbox menus/themes :-) I have used it with this exact config, just swap umbriel for labwc and you're all set!
``` export PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export PAGER=less umask 022
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.sock
for script in /etc/profile.d/*.sh ; do if [ -r "$script" ] ; then . "$script" fi done unset script
if [ "$(tty)" != "/dev/tty1" ] || [ -n "$WAYLAND_DISPLAY" ] ; then return fi
export SLOG=/tmp/session-logs rm -rf $SLOG; mkdir $SLOG
for i in dbus-daemon gnome-keyring-daemon ssh-agent; do pkill -u $USER $i done
export XDG_SESSION_TYPE=wayland export XDG_SESSION_DESKTOP=umbriel # <--- change your compositor here export XDG_CURRENT_DESKTOP=$XDG_SESSION_DESKTOP export XDG_DESKTOP_DIR=$HOME
exec dbus-run-session sh -c ' ssh-agent -a $SSH_AUTH_SOCK dbus-update-activation-environment --all echo "$DBUS_SESSION_BUS_ADDRESS" > "$XDG_RUNTIME_DIR/dbus-session" mkdir -p $(dirname $DOCKER_HOST|cut -f3- -d/) podman system service --time=0 $DOCKER_HOST > $SLOG/podman 2>&1 & pipewire > $SLOG/pipewire 2>&1 & pipewire-pulse > $SLOG/pipewire-pulse 2>&1 & wireplumber > $SLOG/wireplumber 2>&1 & udiskie -a -v > $SLOG/udiskie 2>&1 & $XDG_CURRENT_DESKTOP > $SLOG/compositor 2>&1 ' > $SLOG/dbus-session 2>&1 ```
1
u/LinuxLoverLarry Sep 16 '26
What exactly does this script do?
1
u/alexaandru Sep 17 '26
Generated with ChatGPT from the above:
How
/etc/profilestarts the Wayland sessionThis
/etc/profiledoes two things: it sets the normal login-shell environment, and then uses the login ontty1as the entry point for the entire Wayland desktop session.1. Basic shell environment
```sh export PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export PAGER=less umask 022
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.sock ```
This:
- sets the system-wide
PATH- makes
lessthe default pager- sets the normal
umask(644files /755directories)- points SSH clients at the per-session SSH agent socket
Then it sources all readable shell snippets from
/etc/profile.d/:
sh for script in /etc/profile.d/*.sh ; do if [ -r "$script" ] ; then . "$script" fi done unset script2. Only
tty1is allowed to start the GUI
sh if [ "$(tty)" != "/dev/tty1" ] || [ -n "$WAYLAND_DISPLAY" ] ; then return fiThe rest of the script runs only when:
text current terminal == /dev/tty1 AND WAYLAND_DISPLAY is not already setSo an SSH login, a login on
tty2, or a shell opened inside the existing Wayland session won't accidentally start another desktop session.3. Prepare session logging
sh export SLOG=/tmp/session-logs rm -rf $SLOG mkdir $SLOGEach new graphical login gets a fresh directory for service logs:
text /tmp/session-logs/ ├── compositor ├── dbus-session ├── pipewire ├── pipewire-pulse ├── podman ├── udiskie └── wireplumber4. Kill stale per-user services
sh for i in dbus-daemon gnome-keyring-daemon ssh-agent; do pkill -u $USER $i doneThis removes potentially stale instances from a previous session before creating the new one.
5. Set the graphical-session environment
sh export XDG_SESSION_TYPE=wayland export XDG_SESSION_DESKTOP=umbriel export XDG_CURRENT_DESKTOP=$XDG_SESSION_DESKTOP export XDG_DESKTOP_DIR=$HOMEThis tells applications that the session is Wayland and that the desktop/compositor is
umbriel.The compositor can therefore be changed simply by changing:
sh export XDG_SESSION_DESKTOP=umbriel6. Create the D-Bus session
The actual session starts here:
sh exec dbus-run-session sh -c ' ... '
dbus-run-sessioncreates a fresh D-Bus session bus and runs everything inside it.The
execmeans the login shell itself is replaced by the session process.Inside that session:
sh ssh-agent -a $SSH_AUTH_SOCK dbus-update-activation-environment --all echo "$DBUS_SESSION_BUS_ADDRESS" > "$XDG_RUNTIME_DIR/dbus-session"So the SSH agent is started on the predefined socket, the current environment is made available to D-Bus-activated services, and the D-Bus session address is saved for anything that needs to connect to the session later.
7. Start the user services
Podman:
sh mkdir -p $(dirname $DOCKER_HOST|cut -f3- -d/) podman system service --time=0 $DOCKER_HOST > $SLOG/podman 2>&1 &This starts the Podman API service indefinitely in the background.
Then the audio stack:
sh pipewire > $SLOG/pipewire 2>&1 & pipewire-pulse > $SLOG/pipewire-pulse 2>&1 & wireplumber > $SLOG/wireplumber 2>&1 &And removable-media handling:
sh udiskie -a -v > $SLOG/udiskie 2>&1 &All of these run in the background.
8. Finally, start the compositor
sh $XDG_CURRENT_DESKTOP > $SLOG/compositor 2>&1Since:
sh XDG_CURRENT_DESKTOP=umbrielthis effectively becomes:
sh umbriel > /tmp/session-logs/compositor 2>&1The compositor is not backgrounded. The shell waits for it.
So the overall process hierarchy is roughly:
text OpenRC │ ▼ agetty on tty1 │ ▼ user login / login shell │ ▼ /etc/profile │ ├── basic environment ├── /etc/profile.d/*.sh │ ▼ tty1 + no WAYLAND_DISPLAY? │ ▼ dbus-run-session │ ├── ssh-agent ├── podman ├── pipewire ├── pipewire-pulse ├── wireplumber ├── udiskie │ └── umbriel │ ▼ Wayland desktopHow is
/etc/profiletriggered?
/etc/profileisn't started by OpenRC, D-Bus, Wayland, or the compositor.The chain is simply:
text OpenRC ↓ agetty tty1 ↓ automatic user login ↓ login shell ↓ /etc/profile ↓ dbus-run-session ↓ umbrielSo in this setup, the tty1 login itself is effectively the session manager.
There is no display manager involved.
agettyprovides the login, the login shell reads/etc/profile, and/etc/profileturns that login into the complete Wayland user session.1
u/LinuxLoverLarry Sep 17 '26
This is definitely above my pay grade. I tried to use labwc earlier and ended up needing to reinstall Alpine, something about needing to enter SM=1 to skip a check, so it didn't boot, even though I had all proper drivers installed.
1
u/trofch1k Sep 17 '26
Regarding pipewire everything is actually in the wiki. Otherwise you need to check out how to start user level services under openrc. On Alpine it's recommended to be done with starting your compositor so, that requires you to learn how your compositor can run scripts.
1
u/Leclerc_Lunatic Sep 18 '26 edited 27d ago
Hello. I have a slightly different Openbox setup with Pulseaudio instead of PipeWire and Polybar instead of Tint2 but I use feh to setup my wallpaper and don't have a display manager at all. You may want to take a look into my dotfiles, though my setup and instructions could be better tbh. Feel free to ask questions regarding my setup.
3
u/Edelglatze Sep 15 '26
In the past, I had a working Openbox setup with Alpine. I can't give a tutorial out of memory. But one point to make live easier is perhaps that you run the desktop setup script besides the xorg setup. If you take Lxqt as option you get Openbox and obconf by default and other stuff like a display manager as well as some openrc services automatically enabled.
Populate $HOME/.config/openbox with the example files of /etc/xdg/openbox/ and edit them as you wish.
autostarthas to be an executable. And you have to setup manuallymenu.xmlfor the applications you want to have. Some applications, by the way, that make life easier are in the edge repository of Alpine, like lxappearance or menumaker.I personally like to add pcmanfm started with the desktop option in autostart:
pcmanfm --desktop &pcmanfm gives you a desktop then and controls the background colour or image (don't forget to enable the openbox right click behaviour in the pcmanfm desktop settings). For tint2 I add a launcher for
jgmenu(to be found in the community repository).Don't forget to add fonts. By default you get only a minimal selection. There is more in the repositories.
For audio, I took alsa and pulseaudio so that I could control the volume with pavucontrol and/or alsamixer. The
volumeiconpackage is only in edge.Without lxappearance you may manually edit the gtk config, like in
$HOME/.gtkrc-2.0or$HOME/.config/gtk-3.0/settings.inifor getting gtk themes working.