KDE will launch programs configured in the Autostart directories whenever you start your KDE session. You have the option to launch normal programs or to launch shell scripts, be it Bash or zsh. If you need your script or program to launch during other stages of Linux startup, you can look into crontab or systemd.

You can create these configuration files manually or you can use the provided Autostart tool from KDE's System Settings.

Steps to configure autostart program for KDE:

  1. Launch System Settings from the launcher.
  2. Go to Startup and Shutdown from the sidebar menu.
  3. Click on Autostart on the sidebar.
  4. Click on Add Program button at the bottom to start adding program to launch during KDE startup.
  5. Choose application from the list and click OK.
  6. Click on the Add Script button to add shell script to automaically start during KDE startup.
  7. Browse script using Open file dialog button or enter path to your script and press OK.

    By default it is set to create a symlink / softlink to your actual shell script.

    Make sure the user has execute permission on the script or application.
    Related: How to set file and folder permission on Linux

  8. Launch terminal.
  9. Check content of generated Autostart desktop file.
  10. Check generated softlink in Autostart script directory.
Discuss the article:

Comment anonymously. Login not required.

Share!