Without -fg, gocryptfs forks to background and the parent exits,
causing systemd to consider the service done and immediately call
ExecStop (fusermount -u). With -fg, gocryptfs stays as the tracked
service process so ExecStop only fires on explicit service stop at
logout.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
systemd-run service mode returns as soon as the start request is
accepted, before gocryptfs has read the passfile. Poll /proc/mounts
for up to 10 seconds so the passfile is only removed after the mount
is confirmed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wrap kwriteconfig5 calls in a KDE check so they are skipped on
Cinnamon and other desktops. Also add empty-session setting so
previous apps are not restored on login.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Switch from --scope to a transient service so systemd can run
fusermount -u via ExecStop before terminating the process.
With KillMode=none, gocryptfs exits on its own once the FUSE
filesystem is detached.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>