Skip to content

systemd and D-Bus ​

The units glimpse installs, the units it creates for applets, the bus names it owns, and the applet host interface.

Session units ​

glimpse-session.target is WantedBy=graphical-session.target and wants every unit below except weather and the screenshot portal, which start on their first D-Bus call. systemctl --user reload glimpse-session.target sends SIGHUP to each except the lock and desktop units, and each rereads its config; they also reread it on their own when a file changes.

UnitService bus nameRestart
glimpse-panel.serviceme.aresa.GlimpsePanel.AppletHostOn failure
glimpse-wallpaper.serviceNoneOn failure
glimpse-lock.serviceNoneAlways, no start limit; skipped while the Wayland display socket is missing
glimpse-notifications.serviceme.aresa.Glimpse.Notifications, org.freedesktop.NotificationsOn failure
glimpse-idle.serviceme.aresa.Glimpse.Idle, me.aresa.Glimpse.Idle.Portal, org.freedesktop.ScreenSaverOn failure
glimpse-settings-daemon.serviceme.aresa.Glimpse.SettingsOn failure
glimpse-sunset.serviceme.aresa.Glimpse.NightLightOn failure, except exit 4 (no gamma control)
glimpse-weather.serviceme.aresa.Glimpse.WeatherOn failure
glimpse-shot-portal.serviceme.aresa.Glimpse.Shot.PortalNo
glimpse-desktop.serviceNoneOneshot at login

Units that restart on failure wait 2 seconds and give up after 5 failures in 60 seconds.

WARNING

Never add sandboxing options to glimpse-lock.service, and never stop it while the screen is locked. PAM password checks fail inside a sandbox, and a stopped lock screen leaves the session locked with nothing to unlock it.

Applet units ​

The panel starts each exec applet as a transient unit:

text
app-glimpse-<panel>-<applet>-<slot>-<pid>-<n>.service
PropertyValue
Typeexec
Sliceapp.slice
MemoryMax256 MiB
Restartalways; no for a copy started by glimpsectl applet run
RestartPreventExitStatus69: an applet that cannot reach its panel socket exits 69 and is not restarted
Restart delay1 second, rising in 6 steps to 60 seconds, with no start limit
WorkingDirectoryThe entry's Path; for a copy from glimpsectl applet run, the directory of its desktop file
EnvironmentThe panel's environment without systemd's own variables (INVOCATION_ID, NOTIFY_SOCKET, LISTEN_* and the like), plus env from the applet's config table and GLIMPSE_APPLET_SOCKET
CollectModeinactive-or-failed
sh
systemctl --user list-units 'app-glimpse-*'
journalctl --user -u 'app-glimpse-*' -f
glimpsectl applet restart me.aresa.GlimpseTodo

Applet host interface ​

glimpse-panel exports me.aresa.Glimpse.AppletHost1 at /me/aresa/Glimpse/AppletHost on the bus name me.aresa.GlimpsePanel.AppletHost. glimpsectl applet run uses it; any program can.

MethodArgumentsReturns
Attachdesktop_path s, panel u, output s, zone s, options_json s, env a{ss}, stderr hA handle, s
Restarthandle sNothing
SetOptionshandle s, options_json sNothing
Treehandle sThe widget tree as JSON, s
Detachhandle sNothing
  • desktop_path is an absolute path to a .desktop file. panel is the index of a [[panels]] entry. An empty output or zone lets the panel choose.
  • options_json is a JSON object of at most 64 KiB.
  • The applet's stderr goes to the stderr file descriptor.
  • Only the caller that attached can use the handle. When it leaves the bus, its applets detach.
  • The host accepts 8 attached applets per caller and 16 in total.
  • Attach returns as soon as the panel accepts the request. The unit starts afterwards; a start failure shows on the bar, not as an error from Attach.

Released under the BSD 3-Clause license.