org.gnome.SessionManager — The Manager
Setenv (IN s variable, IN s value); GetLocale (IN i category, OUT s value); InitializationError (IN s message, IN b fatal); Initialized (); RegisterClient (IN s app_id, IN s client_startup_id, OUT o client_id); UnregisterClient (IN o client_id); Inhibit (IN s app_id, IN u toplevel_xid, IN s reason, IN u flags, OUT u inhibit_cookie); Uninhibit (IN u inhibit_cookie); IsInhibited (IN u flags, OUT b is_inhibited); GetClients (OUT ao clients); GetInhibitors (OUT ao inhibitors); IsAutostartConditionHandled (IN s condition, OUT b handled); Shutdown (); Reboot (); CanShutdown (OUT b is_available); SetRebootToFirmwareSetup (IN b enable); CanRebootToFirmwareSetup (OUT b is_available); Logout (IN u mode); IsSessionRunning (OUT b running);
ClientAdded (o id); ClientRemoved (o id); InhibitorAdded (o id); InhibitorRemoved (o id); SessionRunning (); SessionOver ();
SessionName readable s Renderer readable s SessionIsActive readable b InhibitedActions readable u
Setenv (IN s variable, IN s value);
Adds the variable name to the application launch environment with the specified value. May only be used during the Session Manager initialization phase.
IN s variable
:The variable name
IN s value
:The variable value
GetLocale (IN i category, OUT s value);
Reads the current state of the specific locale category.
IN i category
:The locale category
OUT s value
:The value
InitializationError (IN s message, IN b fatal);
May be used by applications launched during the Session Manager initialization phase to indicate there was a problem.
IN s message
:The error message
IN b fatal
:Whether the error should be treated as fatal
Initialized ();
Run from systemd to signal that gnome-session-initialized.target has been reached.
RegisterClient (IN s app_id, IN s client_startup_id, OUT o client_id);
Register the caller as a Session Management client.
IN s app_id
:The application identifier
IN s client_startup_id
:Client startup identifier
OUT o client_id
:The object path of the newly registered client
UnregisterClient (IN o client_id);
Unregister the specified client from Session Management.
IN o client_id
:The object path of the client
Inhibit (IN s app_id, IN u toplevel_xid, IN s reason, IN u flags, OUT u inhibit_cookie);
Applications should invoke this method when they begin an operation that should not be interrupted, such as creating a CD or DVD. The types of actions that may be blocked are specified by the flags parameter. When the application completes the operation it should call #Uninhibit() or disconnect from the session bus.
Applications should not expect that they will always be able to block the
action. In most cases, users will be given the option to force the action
to take place. If app_id
is not specified, the user might not be informed
of this inhibitor when prompted to force the action.
On Wayland, or other display servers, pass 0 for toplevel_xid
.
The flags
parameter must include at least one of the following flags,
bitwise or'ed together:
1: Inhibit logging out
2: Inhibit user switching
4: Inhibit suspending the session or computer
8: Inhibit the session being marked as idle
16: Inhibit auto-mounting removable media for the session
The returned cookie is used to uniquely identify this request. It should be used as an argument to #Uninhibit() in order to remove the request.
IN s app_id
:The application identifier, optional
IN u toplevel_xid
:The toplevel X window identifier
IN s reason
:The reason for the inhibit
IN u flags
:Flags that specify what should be inhibited
OUT u inhibit_cookie
:The cookie
Uninhibit (IN u inhibit_cookie);
Cancel a previous call to #Inhibit(), identified by the cookie.
IN u inhibit_cookie
:The cookie
IsInhibited (IN u flags, OUT b is_inhibited);
Determine if operation(s) specified by the flags are currently inhibited. Flags are same as those accepted by the #Inhibit() method.
IN u flags
:Flags that specify what should be inhibited
OUT b is_inhibited
:
TRUE if any of the operations in flags
are inhibited
GetClients (OUT ao clients);
This gets a list of all the clients that are currently known to the session manager. Each client ID is a D-Bus object path to the object that implements the Client interface
OUT ao clients
:an array of client IDs
GetInhibitors (OUT ao inhibitors);
This gets a list of all the inhibitors that are currently known to the session manager. Each inhibitor ID is a D-Bus object path to the object that implements the Inhibitor interface
OUT ao inhibitors
:an array of inhibitor IDs
IsAutostartConditionHandled (IN s condition, OUT b handled);
Allows the caller to determine whether the session manager is handling changes to the specified autostart condition.
IN s condition
:The autostart condition string
OUT b handled
:True if condition is handled, false otherwise
SetRebootToFirmwareSetup (IN b enable);
Allows the caller to indicate to the system's firmware to boot into setup mode
IN b enable
:Whether we should reboot into setup
CanRebootToFirmwareSetup (OUT b is_available);
Allows the caller to determine whether or not it's okay to show a reboot to firmware option in the UI
OUT b is_available
:True if boot into setup mode is available to the user, false otherwise
Logout (IN u mode);
Request a log out dialog.
You may pass the following flags into mode
, and they can be bitwise
or'ed together:
0: Normal
1: No confirmation interface should be shown.
2: Forcefully logout. No confirmation will be shown and any inhibitors will be ignored.
IN u mode
:The type of logout that is being requested
ClientAdded (o id);
Emitted when a client has been added to the session manager.
o id
:The object path for the added client
ClientRemoved (o id);
Emitted when a client has been removed from the session manager.
o id
:The object path for the removed client
InhibitorAdded (o id);
Emitted when an inhibitor has been added to the session manager.
o id
:The object path for the added inhibitor
Renderer readable s
Starting in GNOME 49, this property always returns an empty string.
You should instead use the GPUs
property on the
net.hadess.SwitcherooControl service instead.
The "Renderer" property is deprecated.
SessionIsActive readable b
If true, the session is currently in the foreground and available for user input.
InhibitedActions readable u
A bitmask of flags to indicate which actions are inhibited. See #Inhibit() for a list of possible values.