I am a beginner to linux programming. What I want to do is, run a C "Hello World" program at startup. Once the user logs in, run that C program. How can I achieve this?
I am running Ubuntu 8.04.
I am a beginner to linux programming. What I want to do is, run a C "Hello World" program at startup. Once the user logs in, run that C program. How can I achieve this?
I am running Ubuntu 8.04.
I solved it by writing a bash script
"Desktop Application Autostart Specification"
I've done that on my machine.
First, in your menu bar, click System, then Preferences, then click Sessions.
A list of startup programs will be shown. click + button and add your script.
This might differ on linux distro. But at least you got the idea.
you can create a script inside
/etc/init.d/myScriptName
which inside this script you start you programremember to give
chmod +x
to your script to give execution permissions