Kubuntu with the KDE desktop environment can automatically run programs or scripts by placing them in dedicated Autostart directories that execute at session startup. This capability also extends to running scripts upon logout, ensuring flexible session lifecycle management for varied use cases.
If specialized scheduling or system-level management is required, Linux tools such as systemd or crontab provide more advanced control over when and how processes begin. These tools supplement the default KDE mechanisms by allowing tasks to run before, after, or independently of the graphical session.
Various configuration methods exist to tailor startup behavior, including direct editing of Autostart configuration files or leveraging the graphical Autostart tool found in KDE's System Settings. This interface simplifies the process of adding, removing, and adjusting startup items without the need for manual file creation.
Steps to configure autostart program for Kubuntu (KDE):
- Launch System Settings from the launcher.
- Go to Startup and Shutdown from the sidebar menu.
- Click on Autostart on the sidebar.
- Click on Add button at the bottom of the screen.
- Click on Add Application to add program to launch during KDE startup.
- Filter and choose application from the list and click OK.
- Click on the Add button again to now start adding shell script.
- Click on the Add Login Script button to add shell script to automaically start during KDE startup.
- Browse script using the file picker and click Open.
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 change file and folder permissions in Linux - Launch terminal.
- Check content of generated Autostart desktop file.
- Check generated softlink in Autostart script directory.
Tested on Kubuntu:
Version | Code Name |
---|---|
24.04 LTS | Noble Numbat |

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.