PDA

View Full Version : Where are the "Session and Startup" tool config files located?



mohammad32543`
2023-03-19, 10:05
Hello. There is a Session and Startup software in Kali Linux and XFCE4 desktop. In this tool, there is a Application Autostart section where we can run our own applications during login or auto-start. My question is, in which path is the location of the configuration or the implementation of the settings of this section? For example, if I want to set autostart applications manually, like this tool, in which path and in which file should I write my script?

lakakahn
2023-04-09, 19:38
In Kali Linux with XFCE4 desktop, the configuration files for autostarting applications are stored in two different locations depending on whether the autostart application is a system-wide autostart or user-specific autostart.


User-specific autostart configuration:The user-specific autostart configuration files are located in the following directory:
~/.config/autostart/
You can create a .desktop file for your application in this directory to set up an autostart for the current user.
For example, if you want to create a autostart for a script named myscript.sh, you can create a file named myscript.desktop with the following contents:


[Desktop Entry]
Type=Application
Exec=/path/to/myscript.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=My Script
Comment=This script will run automatically at startup


System-wide autostart configuration:The system-wide autostart configuration files are located in the following directory:
/etc/xdg/autostart/
To create a system-wide autostart for your application, you can create a .desktop file in this directory.
For example, to create a system-wide autostart for myscript.sh, create a file named myscript.desktop in /etc/xdg/autostart/ with the following contents:


[Desktop Entry]
Type=Application
Exec=/path/to/myscript.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=My Script
Comment=This script will run automatically at startup


Note that you may need to use sudo to create the system-wide autostart file in /etc/xdg/autostart/.