How do I programmatically set an executable on Linux to run when the user logs in?
Basically, the equivalent of the HKCU\Software\Microsoft\Windows\CurrentVersion\Run registry key in Windows.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For gnome on Linux, place a .desktop file referring to your application in ~/config/autostart/,
the format is fairly simple:
and you will have to set the exec bit for this file (chmod +x)
If you are shipping on Linux, you should create one of these anyway and place it in the menus.
For KDE on Linux you should create a symbolic link to your program’s executable in the folder ~/.kde/Autostart/