Skip to main content

Module autostart

Module autostart 

Source
Expand description

Handles autostart integration for both native installations and sandboxed Flatpak builds.

Under Flatpak, uses the XDG Background portal to request autostart permission. On bare-metal installs, writes or removes a .desktop file in ~/.config/autostart/. The portal request is asynchronous and may be denied by the user.

Constantsยง

APP_ID ๐Ÿ”’
AUTOSTART_DESKTOP_ID ๐Ÿ”’
AUTOSTART_REASON ๐Ÿ”’

Functionsยง

apply
Configure or request autostart registration depending on container and integration style.
autostart_entry_paths ๐Ÿ”’
Retrieve possible system autostart shortcut path list (sandboxed and unsandboxed).
default_autostart_entry_path ๐Ÿ”’
Retrieve default system autostart configuration shortcut folder path.
escape_desktop_exec_arg ๐Ÿ”’
Escape an executable path for the Exec= field of a desktop entry.
flatpak_host_config_dir_from ๐Ÿ”’
Map a sandboxed ~/.var/app/<app-id>/config path back to the host ~/.config path.
install_desktop_entry ๐Ÿ”’
Install autostart desktop shortcut entry in standard non-flatpak configurations.
is_flatpak_sandbox ๐Ÿ”’
Check if running inside Flatpak sandbox environment.
remove_desktop_entry ๐Ÿ”’
Remove autostart desktop shortcut entry if one exists.
request_background_portal ๐Ÿ”’
Request autostart state change through the XDG Background portal.