richerarc richerarc - 4 months ago 18
Linux Question

Start application at startup linux Programmatically

I'm making a program in C that has the option (for the user) to launch automatically at Linux startup. I'm looking for a code snippet or something helpful. The way I want to do it, is programmatically

if the user selected auto-startup, then (code I am looking for)


I saw many thing about cron jobs and
/etc/rd.somethings
, but it doesn't seems to be what I'm looking for.

Answer

if the user selected auto-startup, then (code I am looking for)

One way is to add a cron job to that user's crontab with special time specification @reboot.

Comments