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.

  1. 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/.