Autostart
Automatically launch your application at system startup.
Supported Platforms
- Windows
- Mac (via AppleScript or Launch Agent)
- Linux
Setup
Install the autostart plugin to get started.
Use your project’s package manager to add the dependency:
-
Run
cargo add tauri-plugin-autostart
to add the plugin to the project’s dependencies inCargo.toml
. -
Modify
lib.rs
to initialize the plugin: -
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
Usage
The autostart plugin is available in both JavaScript and Rust.
Permissions
By default all plugin commands are blocked and cannot be accessed.
You must define a list of permissions in your capabilities
configuration.
See Permissions Overview for more information.
Permission | Description |
---|---|
autostart:allow-disable | Enables the disable command without any pre-configured scope. |
autostart:deny-disable | Denies the disable command without any pre-configured scope. |
autostart:allow-enable | Enables the enable command without any pre-configured scope. |
autostart:deny-enable | Denies the enable command without any pre-configured scope. |
autostart:allow-is-enabled | Enables the is_enabled command without any pre-configured scope. |
autostart:deny-is-enabled | Denies the is_enabled command without any pre-configured scope. |
© 2024 Tauri Contributors. CC-BY / MIT