Commit Graph

78 Commits

Author SHA1 Message Date
Daniel unbrot Pätzold d95136459c 0020_nextcloud_mozilla_pre: auto-provision Thunderbird IMAP account at logon
Adds SERVERFQDN_IMAP and TB_MAIL_FULLNAME to setup_system.conf.dist.
On each logon the script checks if an IMAP account for DAVTOKEN_USER@TLDOMAIN
already exists in prefs.js; if not it writes the server, identity, and account
entries and registers it with accountmanager. Idempotent — skipped when the
account is already present.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 10:59:53 +02:00
Daniel unbrot Pätzold 87ac49ce41 0110_nextcloud_talk_app: restore D-Bus and KWallet access via flatpak override
Ensures session bus socket and kwalletd5/6 talk permissions are set at
logon, so Flatseal or a missing manifest entry cannot silently break
Talk's credential storage and Plasma integration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 10:59:53 +02:00
Brot der Bot 0c50f7825d 0110_nextcloud_talk_app: fix Electron GPU crash on service exit
--scope ... & had two problems:
1. systemd-run stayed alive in the autostart service cgroup;
   KillMode=control-group sent it SIGTERM when logon_script.sh exited,
   tearing down the scope and killing Talk mid-initialization.
2. The scope lacked Delegate=yes, preventing Electron's zygote from
   creating sub-cgroups for the GPU/renderer processes.

The previous commit added Delegate=yes but kept --scope, so problem 1
remained: the scope was still torn down on service exit, causing the
GPU/network service crash visible in talk.log.

Switch to a transient service unit identical to the Nextcloud Desktop
Client fix: --no-block returns immediately so systemd-run is gone from
the cgroup before the service ends; --property=Delegate=yes is retained
for Electron's zygote. Tested: service active, zygote and network
service running, no GPU crash.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 17:23:49 +02:00
Brot der Bot c454110793 0050_nextcloud_desktopclient: fix Nextcloud client killed on service exit
systemd-run --scope ... & left the systemd-run binary running as a
background process inside the autostart service's cgroup. When
logon_script.sh exited, systemd's KillMode=control-group sent SIGTERM
to all remaining cgroup processes, including systemd-run. systemd-run,
on receiving SIGTERM while monitoring a scope, stopped the scope and
killed the Nextcloud client -- at exactly the same moment the autostart
service ended.

--no-block with --scope is not supported. Switch to a transient service
unit (drop --scope, add --no-block). systemd-run registers the unit and
returns immediately, leaving the cgroup before logon_script.sh ends.
The Nextcloud process then runs as an independent systemd user service,
unaffected by the autostart service lifecycle. Tested: Nextcloud keeps
running after systemd-run exits.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 17:13:41 +02:00
Brot der Bot 93418748d7 0110_nextcloud_talk_app: add Delegate=yes to fix Electron GPU crash
Nextcloud Talk is an Electron app. Electron uses a zygote process to
fork sandboxed child processes (GPU, renderer, network service) into
their own sub-cgroups. systemd-run --scope without Delegate=yes locks
down the cgroup — sub-cgroups cannot be created — so the zygote fails,
causing the GPU process to crash immediately on startup.

Adding --property=Delegate=yes hands cgroup management to the scope,
allowing flatpak/bubblewrap and Electron's zygote to create the
sub-cgroups they need. Tested: no GPU crash with this flag set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:57:03 +02:00
Brot der Bot e246c1f875 0110_nextcloud_talk_app: detach Talk from autostart service cgroup
setsid -f forks the process into a new session but leaves it in the
calling service's cgroup. systemd-run --user --scope moves it into its
own transient scope cgroup so the autostart service can finish normally.

Added & to background the launch, replacing the fork that setsid -f
was providing. Tested: scope is created and Talk starts correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:33:17 +02:00
Brot der Bot 3964f8b081 0010_kwallet: detach kwalletd6 from autostart service cgroup
Same root cause as the gocryptfs and Nextcloud fixes: kwalletd6 is a
long-running daemon that stays alive for the entire KDE session.
Launching it with setsid keeps it in the autostart service cgroup,
preventing app-logon_script.sh@autostart from reaching finished state.

Replace setsid with systemd-run --user --scope so kwalletd6 runs in
its own transient scope cgroup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 15:05:20 +02:00
Brot der Bot 1abf7879cd detach long-running background processes from autostart service cgroup
KDE Plasma runs each autostart .desktop entry as a systemd user unit.
systemd tracks service liveness by cgroup membership, not just the
main PID. Any process forked inside the service — even via setsid or &
— stays in the service's cgroup and keeps app-logon_script.sh@autostart
in active (running) state indefinitely after logon_script.sh exits.

mount_ecrypt_home.sh: wrap the gocryptfs mount call with
  systemd-run --user --scope --unit=gocryptfs-home
The FUSE daemon that gocryptfs forks now lives in its own transient
scope cgroup. Exit-code propagation is unchanged because systemd-run
--scope returns the main process's exit code.

0050_nextcloud_desktopclient/user_run.sh: replace
  /usr/bin/setsid ... &
with
  systemd-run --user --scope --unit=nextcloud-client ... &
setsid creates a new session but does not move the process out of the
cgroup; systemd-run --scope does.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 15:02:39 +02:00
unbrot 58b23b00e7 mozilla_pre: fixed server adress 2026-04-30 16:45:45 +02:00
unbrot 576363cdca Fix Nextcloud app password not stored in KWallet after autoprovisioning
The Flatpak autoprovisioning command does not reliably write credentials
to KWallet from inside the sandbox. After provisioning, directly write
both KWallet entries (user:url/:0 and user_app-password:url/:0) via
qdbus, creating the Nextcloud folder first if needed. kwallet-query was
tried but silently returns 0 without creating missing folders.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 17:30:49 +02:00
unbrot 7514b7cbe3 Talk: setsid won't work with Quotes 2026-04-25 14:48:09 +02:00
unbrot 7b6f7c8ea8 Talk: Set exitcode 2026-04-25 14:38:27 +02:00
unbrot 52aafd34dd Added exit code 0 to scripts 2026-04-25 14:34:31 +02:00
unbrot 72faa4d0f2 Talk: Add Background back again 2026-04-25 14:31:42 +02:00
unbrot 7ef83c5846 Talk: Fork in Background with bash 2026-04-25 14:27:46 +02:00
unbrot 4947599bb3 Talk: Stop before upgrade 2026-04-25 14:09:49 +02:00
unbrot c5e4cc1d12 talk: always fork new process 2026-04-25 13:52:46 +02:00
unbrot 398354028a Talk: call fixed in Background 2026-04-25 13:47:07 +02:00
unbrot a9fc6fda72 Wallet: New install wrote new rc at the second logon 2026-04-25 13:28:19 +02:00
unbrot 06f28d1064 moved gitignore from client software 2026-04-25 11:04:59 +02:00
Daniel Pätzold fd3ab78f92 Changed Order of Nextcloud and Mozilla_pre 2026-04-23 13:43:50 +02:00
Daniel Pätzold 5cd143d8f0 Kwallet: Fix setting up default walletrc 2026-04-23 12:32:55 +02:00
Daniel Pätzold e1dd5cc62a Kwallet: fixed copy kwalletrc 2026-04-23 12:09:15 +02:00
Daniel Pätzold cefb820ac2 Nc desktop client: no output for stopping service 2026-04-22 21:46:51 +02:00
Daniel Pätzold 929c51f594 Mozilla pre: Fixed User in Serverpath 2026-04-22 20:46:32 +02:00
unbrot dabe479d32 Mozilla pre: Firefox profile delete Coockie and temp. Files 2026-04-21 19:11:17 +02:00
unbrot 8d8594d2cd Mozilla pre: Added Thunderbird 2026-04-21 19:06:57 +02:00
unbrot 21fcd6aa49 Mozilla pre script: initial version 2026-04-21 18:50:21 +02:00
unbrot 888c4b17ad Logon script: Visibility for KDE 2026-04-21 11:55:57 +02:00
Daniel Pätzold 98ac6b3c3b NC client: Fixed remove lockfiles when stopping 2026-04-14 23:42:18 +02:00
Daniel Pätzold 557ad48556 Wallet: Replace nohup with setsid 2026-04-14 23:10:25 +02:00
Daniel Pätzold 514b1b1e19 Background start: Replace NOHUP with SETSID, which is working more relyable 2026-04-14 23:06:25 +02:00
Daniel Pätzold 5bce1e34f3 NC Desktop: Add Errorlogging to File 2026-04-13 22:47:05 +02:00
Daniel Pätzold 6bf39ef5f4 Talk: Wait before shell get closed 2026-04-13 22:19:14 +02:00
Daniel Pätzold df498ca45a Wallet: Repeat Check for Wallet with delay 2026-04-12 19:18:34 +02:00
Daniel Pätzold df29674158 Wallet: Disable if not KDE Window-Manager 2026-04-12 11:21:41 +02:00
Daniel Pätzold 657d5e38f3 Logon script: fixed desktop entry 2026-04-09 15:21:24 +02:00
Daniel Pätzold 83b2148832 NC desktop client: Add logfile 2026-04-09 15:20:55 +02:00
Daniel Pätzold d1ec315832 Logon script: extended Desktop 2026-04-09 14:52:37 +02:00
Daniel Pätzold 3e24821637 Autostart script: Corrected Folder and Message 2026-04-09 14:23:31 +02:00
Daniel Pätzold f0e8257eeb NC Talk: Added logfile for debugging 2026-04-09 14:18:42 +02:00
Daniel Pätzold 7476c27256 Logon script setup: Moved to client software 2026-04-09 14:17:53 +02:00
Daniel Pätzold e7b1f3754a Talk: Fixed startup 2026-04-08 18:30:57 +02:00
Daniel Pätzold 84873e1047 NC Client: Start in Background and Startinfo 2026-04-08 18:30:15 +02:00
Daniel Pätzold b35a5148a3 Talk: temp. disable start of talk due to coredumps 2026-04-08 14:53:08 +02:00
Daniel Pätzold 772f20e1ce Nextcloud client: Support multi sync folders and move to userspace 2026-04-08 14:52:11 +02:00
Daniel Pätzold 7930263a3b Wallet: Check made optional 2026-04-07 16:59:07 +02:00
Daniel Pätzold eebe813eed Renamed 0030_desktop to 0030_desktop_symbols 2026-04-07 15:43:42 +02:00
Daniel Pätzold 1cee4f82f4 Kwallet: Split User_Run from install 2026-04-07 15:06:57 +02:00
Daniel Pätzold d482c47b85 Talk: Remove old userspace and new user_run script 2026-04-01 17:15:12 +02:00