
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
A cross-platform utility designed to manage the automatic launching of applications on system startup.
fib-launch
is a versatile and robust cross-platform utility designed to manage the automatic launching of applications on system startup. It supports a wide range of operating systems, including Windows, macOS, and Linux, providing a unified interface for registering and unregistering applications to start at login. This tool is particularly useful for developers and system administrators who need to ensure that certain applications are always running when the system starts, regardless of the operating system. By leveraging fib-launch
, users can streamline their workflow, improve productivity, and ensure that critical applications are always available when needed.
fib-launch
works seamlessly on Windows, macOS, and Linux, making it a versatile tool for managing startup applications across different environments. This ensures that users can rely on a consistent experience regardless of the operating system they are using.fib-launch
provides a straightforward API for registering and unregistering applications to start at login. This makes it easy for developers to integrate startup functionality into their applications.fib-launch
is designed to be lightweight and efficient, minimizing its impact on system resources while providing reliable startup management.To install fib-launch
, you need to have fibjs
installed on your system. You can then install the package using npm:
fibjs --install fib-launch
To use fib-launch
, you need to require it in your application and configure it according to your needs. Below is an example of how to set up fib-launch
:
const launch = require('fib-launch');
const options = {
label: 'com.example.myapp',
script: 'path/to/your_script.js'
};
launch.register(options);
While fib-launch
does not require a specific configuration file, it is recommended to store your configuration in a JSON file for ease of management. An example configuration might look like this:
{
"startAtLogin": true
}
You can load this configuration in your application as follows:
const fs = require('fs');
const path = require('path');
const configPath = path.join(require('os').homedir(), '.fib-launch', 'config.json');
let config = {};
if (fs.existsSync(configPath)) {
config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
}
const options = {
label: 'com.example.myapp',
script: 'path/to/your_script.js',
...config
};
launch.register(options);
If you need to unregister an application from starting at login, you can use the unregister
method provided by fib-launch
. Below is an example of how to unregister an application:
const launch = require('fib-launch');
const options = {
label: 'com.example.myapp'
};
launch.unregister(options);
By following these instructions, you can effectively manage the automatic launching of applications on system startup using fib-launch
.
Although fib-launch
itself does not provide system tray functionality, you can enhance your application's user experience by integrating it with a system tray using a GUI module. Below is an example of how to set up a system tray using the gui
module:
const gui = require('gui');
const path = require('path');
const tray = gui.createTray({
icon: path.resolve(__dirname, 'icon.png'),
menu: [
{
label: 'Open GitHub',
onclick: function () {
gui.open('https://github.com/fibjs');
}
},
{
label: 'Start at login',
checked: config.startAtLogin,
onclick: function () {
config.startAtLogin = this.checked;
save_config();
if (config.startAtLogin)
launch.register(launch_config);
else
launch.unregister(launch_config);
}
},
{
label: 'Exit',
onclick: function () {
process.exit();
}
}
]
});
By following these instructions, you can effectively manage the automatic launching of applications on system startup using fib-launch
and enhance the user experience with system tray integration.
fib-launch
provides a unified interface for managing startup applications across different operating systems. However, the underlying implementation varies depending on the platform. Below are the platform-specific details for Windows, macOS, and Linux.
On Windows, fib-launch
uses the Windows Registry to manage startup applications. Specifically, it interacts with the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
registry key. When an application is registered to start at login, an entry is added to this registry key with the application's name and the path to the executable or script. This ensures that the application is launched automatically when the user logs in.
Key Characteristics:
HKEY_CURRENT_USER
, making them specific to the logged-in user.On macOS, fib-launch
leverages Launch Services to manage startup applications. This involves creating a property list (plist) file in the ~/Library/LaunchAgents
directory. The plist file contains key information such as the label, program arguments, and run conditions. When the user logs in, Launch Services reads the plist file and starts the specified application.
Key Characteristics:
~/Library/LaunchAgents
directory.On Linux, fib-launch
uses the ~/.config/autostart
directory to manage startup applications. It creates a desktop entry file (with a .desktop
extension) in this directory. The desktop entry file follows the XDG Autostart specification and includes fields such as Name
, Exec
, and Type
. When the user logs in, the desktop environment reads the desktop entry file and starts the specified application.
Key Characteristics:
.desktop
files for configuration.~/.config/autostart
directory.~/Library/LaunchAgents
, and Linux in ~/.config/autostart
.By understanding these platform-specific details, you can effectively manage the automatic launching of applications on system startup using fib-launch
across different operating systems.
We welcome contributions to fib-launch
. If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request on our GitHub repository.
fib-launch
is licensed under the ISC License. See the LICENSE file for more details.
We would like to thank the open-source community for their contributions and support.
FAQs
A cross-platform utility designed to manage the automatic launching of applications on system startup.
The npm package fib-launch receives a total of 0 weekly downloads. As such, fib-launch popularity was classified as not popular.
We found that fib-launch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.