#30 - Add the Nextcloud desktop client with auto-start and a KWallet keyring #31
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
actions/sindri!31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "30-nextcloud-desktop-client"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The
coder-xfce-vncvariant now ships the Nextcloud desktop client (34.0.5, from Nextcloud's official PPA). It starts automatically with the desktop and stays logged in across workspace restarts. Its login is kept in KWallet, which is created with an empty password and unlocked silently at session start. Nothing GNOME is involved.Why
See #30. The client stores its app password in the system keyring and compiles out qtkeychain's plain-file fallback (
keychainchunk.h: "We don't support insecure fallback"). The image has no keyring, so without one the client would ask for a new login after every restart. JetBrains Toolbox doesn't have this problem because it falls back to its own.securestoragefile.Changes
Dockerfile(coder-xfce-vncstage):RUNstep that adds thenextcloud-devs/clientPPA, using the same keyring +sources.list.dpattern as the other repos:1FCD77DD…AD3DD469is asserted before the key is trusted;/etc/os-releaseinstead of a hard-codednoble.nextcloud-desktop;libkf5wallet-bin(kwalletd5);libqca-qt5-2-plugins: the QCA OpenSSL plugin KWallet's Secret Service needs. Without it, every write fails withcreateDLGroup failed: maybe libqca-ossl is missing.ENV QTWEBENGINE_DISABLE_SANDBOX=1andQTWEBENGINE_CHROMIUM_FLAGS=--disable-dev-shm-usage. The client embeds Qt WebEngine, which hits the same pod limits as the Electron apps but ignoresELECTRON_DISABLE_SANDBOX. These are ENV rather than a wrapper, because the client writes its own auto-start entry pointing at/usr/bin/nextcloud.COPYof the newkwallet-unlockscript.scripts/kwallet-unlock.sh(new):""over the 56-byte salt, 50000 rounds, 56 bytes.pamOpen, the same callpam_kwallet5makes on a KDE login. That creates the wallet on first run and opens it with no dialog.isOpen, sincepamOpenreturns nothing over D-Bus.scripts/start-xfce-vnc.sh: the generatedxstartuprunskwallet-unlock, guarded bycommand -v, insidedbus-run-sessionbeforestartxfce4. The unlock therefore happens before the client auto-starts.scripts/coder-init-desktop.sh: writes~/.config/autostart/Nextcloud.desktoponce per home, with a marker file./etc/xdg/autostartentry was ruled out: the toggle only looks in~/.config/autostart, so it could never turn that one off.README.md:coder-init-desktopbullet;Things to weigh in review
dfaround the realRUNstep. That's mostly Qt 6 + Qt WebEngine for the client; KWallet is about 81 MB of it. It's more than the "200–350 MB + 81" I estimated before measuring.QTKEYCHAIN_BACKENDoverride (that arrived in 0.15) and always picks libsecret on XFCE, so Nextcloud can only reach KWallet this way. As a result, apps that look for a keyring on XFCE may start keeping their secrets in KWallet. That includes Electron apps through Chromium'sos_crypt, such as Claude Desktop. Data they encrypted before (Chromium'sv10format) should stay readable. Not verified: I couldn't log in to Claude Desktop in a test pod. Freelens started normally and wrote nothing to the wallet..securestorage, as agreed. The README explains how to set a real one.Verification
All checks ran in throwaway pods from
coder-xfce-vnc-latest, using the actual scripts from this branch and a throwaway Nextcloud 35.0.1 server in the cluster (all deleted afterwards):RUNstep, extracted from the Dockerfile by script, run as root in a fresh podW:/E:lines, key fingerprint matched,nextcloud-desktop 34.0.5,libkf5wallet-bin 5.115.0,libqca-qt5-2-plugins 2.3.8coder-init-desktopon a fresh home~/.config/autostart/Nextcloud.desktop+ markerstart-xfce-vncsession 1kwallet-unlock: kdewallet is open.before XFCE starts;xfce4-session,kwalletd5andnextcloud --background(auto-started) running--serverurl/--userid/--apppassword~/Nextcloud; password written to KWallet (Secret Servicefolder holdsNextcloud,Nextcloud__0_)Error while writing password "The name org.freedesktop.secrets was not provided by any .service files"(Secret Service disabled), thencreateDLGroup failed: maybe libqca-ossl is missing(plugin missing). Both are fixed by this PRkwallet-unlockleaves it locked (isOpen→ false), exits 0 in 0.09 skwallet-unlocklogs and exits 0, so the session isn't blockedshellcheckon the three scriptsNot verified:
docker-dev.Closes #30
🤖 Generated with Claude Code