Session

Session management module for the daemon.

MACHINE_ID_PATH: Path = PosixPath('/etc/machine-id')

Path to the machine ID file

class UserSessionManager[source]

Manage user session information.

Initialize the session manager.

get_user_id(effective_user_id)[source]

Get the user ID based on the effective user ID.

Return type:

str

Parameters:

effective_user_id (int) – The effective user ID

Returns:

The user ID

Return type:

str

property machine_id: UUID

Property that holds the machine UUID.

Reference:

https://www.freedesktop.org/software/systemd/man/latest/machine-id.html

Raises:
Returns:

The UUID generated from machine-id

Return type:

uuid.UUID