libdesktop.startup

A module for interacting with the system startup.

libdesktop.startup.add_item(name, command, system_wide=False)[source]

Adds a program to startup.

Adds a program to user startup.

Parameters:
  • name (str) – The name of the startup entry.
  • command (str) – The command to run.
  • system_wide (bool) – Add to system-wide startup.

Note

system_wide requires superuser/admin privileges.

libdesktop.startup.list_items(system_wide=False)[source]

List startup programs.

List the programs set to run at startup.

Parameters:system_wide (bool) – Gets the programs that run at system-wide startup.
Returns:A list of dictionaries in this format:
{
  'name': 'The name of the entry.',
  'command': 'The command used to run it.'
}
Return type:list
libdesktop.startup.remove_item(name, system_wide=False)[source]

Removes a program from startup.

Removes a program from startup.

Parameters:
  • name (str) – The name of the program (as known to the system) to remove. See :func:list_items.
  • system_wide (bool) – Remove it from system-wide startup.

Note

system_wide requires superuser/admin privileges.