Repository navigation
Set up a Linux desktop on Fedora, Arch and openSUSE too (851-4493) - #1497
Merged
pondorasti merged 1 commit intoNov 27, 2026
Merged
Conversation
pondorasti
force-pushed
the
alexandru/851-4493-linux-desktop-step-3-codevisor-desktop
branch
from
November 27, 2026 00:16
fe1f3cf to
5bb0312
Compare
codevisor desktop setup installs what is missing with dnf, pacman and zypper next to apt, waits on each package manager's lock, says once what to install where it knows no package manager, and the server closes its own folders above the desktop's socket to other accounts. Co-Authored-By: Claude Fable 5.2 <[email protected]>
pondorasti
force-pushed
the
alexandru/851-4493-linux-desktop-step-3-codevisor-desktop
branch
from
November 27, 2026 00:36
5bb0312 to
e59200b
Compare
pondorasti
deleted the
alexandru/851-4493-linux-desktop-step-3-codevisor-desktop
branch
November 27, 2026 00:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes 851-4493. Part of 851-4479 (Linux desktops), step 3 of the design.
codevisor desktop setupnow installs what is missing with dnf, pacman and zypper, next to apt. No app UI changes.What changes
apps/server/src/desktop/package-managers.ts), from the machine's own/etc/os-releaseand the programs it finds. Nothing in the server's answer chooses a command; the status'spackageManagernow names the real one and is only shown, never run./proc/mounts, not tested on such a machine).Packages per system
tigervnc-standalone-servertigervnc-commontigervnc-server-minimaltigervncxorg-x11-Xvncstartxfce4,xfconf-query)xfce4xfce4-terminalxfce4-sessionxfwm4xfce4-panelxfdesktopxfce4-settingsxfce4-terminalxfconfxfce4-panel-branding-upstreamdbus-run-sessiondbus-x11dbus-daemondbusdbus-1dbus-1-daemonxclipxclipxclipxclippython3python3pythonpython3fonts-dejavu-coreadwaita-icon-themedejavu-sans-fontsadwaita-icon-themettf-dejavuadwaita-icon-themedejavu-fontsadwaita-icon-theme--no-install-recommendsinstall_weak_deps=False--needed--no-recommendsDPkg::Lock::Timeout/var/log/dnf5.lognames the rpm lockdb.lckexists and a pacman runsZYPP_LOCK_TIMEOUTAll of them are in the default repositories of the five test systems; none needed an extra repository.
Choices I made
IDorID_LIKEnames fedora: Fedora Asahi Remix, Ultramarine and the like; unit tests from os-release samples, not run on one). Left out: anything that also names rhel or centos, plus Oracle Linux (ol) and Amazon Linux (amzn), which name only fedora but have no Xfce in their own repositories. SUSE Linux Enterprise is left out the same way for zypper. They get the "install these yourself" message.pacman -Sy <package>(a partial upgrade). Setup installs from the lists the machine has and downloads them only when there are none. Old lists make pacman fail with "not found", and setup adds the hint to runpacman -Syufirst. A lock file nobody holds stops setup at once with the hint to remove it, instead of a ten-minute wait.xfce4-panel-branding-upstream, unless the openSUSE one is already on the machine.dbus-run-sessionmoved fromdbus-1(Leap 15) todbus-1-daemon, so both are named and zypper skips the unknown one. zypper's "installed, but" exit codes 102, 103 and 107 count as installed. 106 (a repository was skipped) counts as installed only when all six programs are there afterwards; otherwise the step fails with zypper's output and a last line that names the reason. I chose this over dropping 106 because one unreachable extra repository would otherwise fail an install that worked. Checked in a container with a broken repository: all six programs present gives success, otherwise exit 106.xfce-polkit, which opens an error box in a desktop that is no login session. The runner hides that one autostart entry through a folder of its own at the front ofXDG_CONFIG_DIRS(next to the socket, made fresh at every start, removed when the desktop stops). The account's own config is not touched.Found by the container run: the desktop was refused on Ubuntu without systemd
The design left one question for this step: the private-socket check refuses a folder a group can write to. On Ubuntu 24.04 an account's umask is 002, so
~/.codevisoris mode 775. When the server has no runtime folder in its environment (a container, or a system unit withUser=), the socket is in~/.codevisor/run, and the desktop started but was refused as "reachable by other accounts".The check stays strict. Instead the server closes its own folders before it starts the desktop:
runbecomes mode 700 and~/.codevisorloses group and other write access. Folders that aren't Codevisor's are left alone and still refused, with the folder named. A socket under/run/user/<uid>was never affected, which is why step 2's systemd VM run passed.Proof
Unit tests (175 in the desktop suites) cover each package manager's commands on the server and in the command, the systems that are left out, the no-root-step path on every system, the unknown-system message with an older root desktop present, the carried-over status case, and the folder closing. The status test and the unknown-system test were run without their fix and fail.
Container run, one container at a time, on the build that is pushed here (run again after the review fixes), the server's account
codevisorwithout systemd. Every step passed on every system:sudo -n)packageManagerRFB 003.008RFB 003.008RFB 003.008RFB 003.008RFB 003.008Also on Arch: a lock file nobody holds stops setup in 4 s with pacman's message and the hint. The openSUSE list was also installed on Leap 15.6 (TigerVNC 1.13.1, all six programs found) and dry-run on Leap 16.0. A picture of each desktop was taken with test-only tools after setup; all five show the panel, icons and fonts, and no error box.
About the test machines: Arch's official image is amd64 only, so Arch ran on the arm64 image
menci/archlinuxarm(Arch Linux ARM,ID=archarm,ID_LIKE=arch), with pacman's own download sandbox switched off in the container'spacman.confbecause Docker refuses Landlock. That is a property of the container; setup's commands don't touch it.After your review at 5bb0312
timeout --kill-after=30 1200, as root, which signals the step's whole process group. The server's account can't signal root's processes itself, so the runner's way (stop the group from the parent) doesn't work under sudo. Checked in a container: with the limit nothing of the step is left; the old way left the package manager's stand-in running.Code review
Two passes of the code-review skill (medium): on the branch before pushing, and on this PR.
Fixed from the first: a left-behind pacman lock meant a ten-minute wait; zypper's "installed, but" exit codes were read as failure; the autostart folder was left behind after remove; the unknown-system message contradicted itself on Fedora without dnf.
Fixed from the second: my first fix for the carried-over case restarted this server's process desktop beside another server's unit, which could remove that server's live socket (now refused, as before, and status says the same); status took "starts at boot" and the log hint from the other server's unit; the autostart folder could be one another account had made, where a hand-made config puts the socket in a shared folder (now made fresh and skipped otherwise); image-based systems got a failing install instead of the message; a folder that can't be made private threw a raw error (now left to the socket check, which names the folder); a table field nothing read.
Left, with the reason:
XDG_CONFIG_DIRSis now always set for the session. With none inherited it is<own folder>:/etc/xdg, which is whatstartxfce4sets by itself, so the session sees the same folders as before plus ours. The five pictures show each system's defaults.Not in this PR
codevisor desktop remove --remove-packages: the design put it in this step, the step's scope didn't include it.removestill leaves the packages installed and says so.🤖 Generated with Claude Code