问题
How do I start an application automatically after login? I have tried the following:
- Editing
/etc/inittab
but I don't have an/etc/inittab
file, it looks like my system uses systemd. - Starting my application by adding it to the script
/etc/rc.local
. - Adding a script in
/etc/init.d
and a symlink to the script in/etc/rc5.d/S51script_name
. - Calling my script from
~/.bashrc
and~/.bash_profile
. - Adding a service to systemd but I couldn't get it to work and it seems more complicated than it should be for my purposes.
I am running Angstrom v2012.01-core - Kernel 3.0.17+ on BeagleBoard xM.
回答1:
Found the answer: The script /etc/profile is ran when the user logs in. You can add a line to start your application at the end it.
来源:https://stackoverflow.com/questions/14149477/auto-start-program-at-login-in-angstrom-on-beagleboard