-
Notifications
You must be signed in to change notification settings - Fork 4
Start singularity-session.target so graphical-session.target actually activates #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [Unit] | ||
| Description=Singularity Desktop session | ||
| BindsTo=graphical-session.target | ||
| Wants=graphical-session-pre.target | ||
| After=graphical-session-pre.target |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,6 +61,28 @@ nohup "$BIN/singularity-polkit-agent" >> "$_STATE/polkit.log" 2>&1 & | |
| if [ -x "$BIN/ush-broker" ]; then | ||
| nohup "$BIN/ush-broker" >> "$_STATE/ush-broker.log" 2>&1 & | ||
| fi | ||
| # Pull in graphical-session.target so every systemd --user unit declaring | ||
| # WantedBy=graphical-session.target actually launches: our own | ||
| # xdg-desktop-portal-singularity.service among them, plus foot-server. | ||
| # Without this the target sits permanently inactive and those units never | ||
| # start at all, regardless of anything the portal ROUTER does below -- | ||
| # confirmed live on O6N 2026-08-27: xdg-desktop-portal correctly resolved | ||
| # and routed Screenshot requests to the singularity backend (portals.conf | ||
| # staging from 2026-08-25 was working fine), but the backend process | ||
| # itself never started because nothing had ever started | ||
| # graphical-session.target on this system. | ||
| # | ||
| # graphical-session.target itself refuses direct manual start | ||
| # (systemd-hardened, RefuseManualStart) -- it must be reached via a unit | ||
| # that BindsTo= it. labwc ships labwc-session.target for exactly this | ||
| # (its own docs/autostart recommends starting it), but that unit is not | ||
| # actually installed by this build, so singularity-session.target | ||
| # (config/systemd-user/, installed by this repo's own meson.build) plays | ||
| # the same role: BindsTo=graphical-session.target, | ||
| # Wants=graphical-session-pre.target, so starting it gets the pre-target | ||
| # sequencing for free too. | ||
| systemctl --user --no-block start singularity-session.target 2>/dev/null || true | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the user manager survives logout—such as with lingering enabled or another concurrent login—this start has no matching stop, so Useful? React with 👍 / 👎. |
||
|
|
||
| # Restart the portal so it picks up the live session environment, but do NOT | ||
| # block on it: xdg-desktop-portal can hang ~25s on its settings-proxy timeout | ||
| # waiting for our portal backend, which would delay the shell launch below. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the advertised
/opt/localinstallation, this places the target in/opt/local/lib/systemd/user, so the newsystemctlcall cannot find it and silently continues without activating the graphical services. Checked withsystemd-analyze --user unit-paths: the standard paths include/usr/local/lib/systemd/userand/usr/lib/systemd/user, but not arbitrary${prefix}/lib/systemd/user; use the configured systemd user-unit directory or otherwise install the file into a searched location.Useful? React with 👍 / 👎.