-1

I am using Arch Linux, I want to add a start-up program in Arch Linux. How to add start-up program which will execute after login after every boot ?

Note: I am not system administrator, I am just a user and I don’t have any special privileges.

1

If you have Vixie cron installed, you can add a @reboot entry in your crontab file:

Instead of the first five fields, one  of  eight  special  strings  may
appear:

       string         meaning
       ------         -------
       @reboot        Run once, at startup.

There you can take some action (i.e. writing some unique file) that you can check for during logging in (and remove that unique file) and execute your functionality once, after each reboot. On the second login (without a reboot) that unique file will not be available.

  • This is unnecessarily convoluted (probably because the question is so vague); you would have been better off waiting for a clarification (or a close)... – jasonwryan Dec 6 '14 at 19:11
  • "after login"... AFAICT, cron doesn't wait for login. – muru Dec 6 '14 at 19:33
  • @jasonwryan I am not aware of anything simpler to do something once on login after reboot, but I agree the question is vague. Voted to close. – Anthon Dec 6 '14 at 19:34
  • 2
    @muru The cron part is to have a one time event that the user controls on each reboot. Something the login can check upon (so it knows it is not the second or later login after reboot). – Anthon Dec 6 '14 at 19:36
  • 2
    @Ankith rather that begging for a solution, how about answering the comments on your question and providing some helpful information about your setup? Don't be a help vampire... – jasonwryan Dec 7 '14 at 7:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.