class KAutostart |
|
|
KAutostart provides a programmatic means to control the state of autostart services on a per-user basis. This is useful for applications that wish to offer a configurable means to allow the application to be autostarted. By using this class you future-proof your applications against potential future or platform-specific changes to the autostart mechanism(s). Typical usage might look like:
KAutostart autostart; // without an entryName arg, gets name from KAboutData autostart.setAutostarts(true); // will now start up when the user logs in |
|
Creates a new KAutostart object that represents the autostart service "entryName". If the service already exists in the system then the values associated with that service, such as the executable command, will be loaded as well. Note that unless this service is explicitly set to autostart, simply creating a KAutostart object will not result in the service being autostarted on next log in. If no such service is already registered and the command to be executed on startup is not the same as entryName, then you will want to set the associated command with setExec(const QString&) See also setExec entryName - the name used to identify the service. If none is provided then it uses the name registered with KAboutData. parent - QObject |
|
Adds an environment to the list of environments this service may start in. See also setAllowedEnvironments(), removeFromAllowedEnvironments() |
|
Adds an environment to the list of environments this service may not be autostarted in See also removeFromExcludedEnvironments() |
|
Returns the list of environments (e.g. "KDE") this service is allowed to start in. This does not take other autostart conditions into account. If any environment is added to the allowed environments list, then only those environments will be allowed to autoload the service. If an environment is marked as both allowed and excluded, it will be excluded. See also setAllowedEnvironments() |
|
Returns whether or not the service represented by entryName in the autostart system is set to autostart at login or not environment - if provided the check will be performed as if being loaded in that environment check - autostart conditions to check for (see commandToCheck()) See also setAutostarts() |
|
Returns the associated command for this autostart service See also setCommand() |
|
Returns the executable to check for when attempting to autostart this service. If the executable is not found in the user's environment, it will not autostart. See also setCommandToCheck() |
|
Returns the list of environments this service is explicitly not allowed to start in. This does not take other autostart conditions such as into account. If the same environment is also marked as allowed, it will still be excluded. See also setExcludedEnvironments() |
|
Checks whether or not a service by the given name entryName is registered with the autostart system. Does not check whether or not it is set to actually autostart or not. entryName - the name of the service to check for |
|
Removes an environment to the list of environments this service may start in. See also addToAllowedEnvironments() |
|
Removes an environment to the list of environments this service may not be autostarted in See also addToExcludedEnvironments() |
|
Sets the environments this service is allowed to start in See also allowedEnvironments(), addToAllowedEnvironments() |
|
Sets the given exec to start automatically at login autostart - will register with the autostart facility when true and deregister when false See also autostarts() |
|
Set the associated command for this autostart service See also command() |
|
Sets the executable to check for the existence of when autostarting this service See also commandToCheck() |
|
Sets the environments this service is not allowed to start in See also excludedEnvironments(), addToExcludedEnvironments() |
|
Sets the service (by name) this service should be started after. Note that this is KDE specific and may not work in other environments. See also StartPhase, startPhase() |
|
Sets the user-visible name for this autostart service. See also visibleName() |
|
Returns the autostart phase this service is started in. Note that this is KDE specific and may not work in other environments. See also StartPhase, setStartPhase() |
|
Returns the user-visible name this autostart service is registered as See also setVisibleName(), setEntryName() |
NoConditions | - | an executable that is checked for existence by name | |
CheckCommand | - |
BaseDesktop | - | the essential desktop services such as panels and window managers | |
DesktopServices | - | services that should be available before most interactive applications start but that aren't part of the base desktop. This would include things such as clipboard managers and mouse gesture tools. | |
Applications | - | everything else that doesn't belong in the above two categories, including most system tray applications, system monitors and interactive applications |