So how do you automatically start or launch program when you login into your KDE desktop system? For example if you would like to start program called xawtv (to watch tv) and mozilla-thunderbird mail client program.
This tip explains how to run programs to launch when you login into KDE or Gnome desktop systems.
KDE
If you are using KDE under any Linux distribution drop/copy program file to ~/.kde/Autostart directory. If your user name is tom create a soft link or copy binary in /home/tom/.kde/Autostart directory. Please note that the symbol ~ indicate the users home directory.
First change directory to ~/.kde/Autostart
$ cd ~/.kde/Autostart
Now create a symbolic link for xawtv program:
Type the following command to make a link (soft) to xawtv program:
$ ln -s $(which xawtv) .
Now create a link (soft) for mozilla-thunderbird mail client:
$ ln -s $(which mozilla-thunderbird) .
General syntax to create softlink to autostart program under KDE is as follows:
ln -s $(which linux-command-name) .
GNOME
Under GNOME Desktop system:
Open control center > Sessions > Startup Programs.
Now add your programs. Another option is to add programs in ~/.gnome2/session-manual file.
Finally you can also add program names to ~/.xinitrc file. This is useful for lightweight Window Manger such as Fluxbox or X session started by startx.
Open .xinitrc file:
$ vi ~/.xinitrc
Append program name:
/usr/bin/xawtv &
Save and close file.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 3 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
How can auto start linux sever??
Nevermind, found it: http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html
Is there no cross-DE way to have this done?