The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Auto run the programs When the system turns on Debian Ask Question. Asked 4 years, 3 months ago. Active 4 years, 3 months ago.
Viewed 14k times. Improve this question. Mohy Fahim Mohy Fahim 13 1 1 gold badge 1 1 silver badge 5 5 bronze badges. You have to you use systemd unit for that. Add a comment. Thus, in order to automatically run a particular program or script at startup, you can create a corresponding init. The following is an init.
A typical init. A crontab will be created for the user running the command and will be executed using the privileges of the user.
If you need your program to run as the root user, run crontab -e as the root user itself. It is the last script to be executed before proceeding to a login screen for the desktop environment or a login prompt at the terminal.
It's usually a Bash shell script, and you can run anything from the script. GNOME can be configured to run programs when a user logs in and can be configured by following the below article:. It can easily be configured to run programs when a user logs in as detailed in the following article:. Related: How to automatically run program on KDE startup. A new shell program will be spawned when you start your terminal session.
Bash is the default shell for most Linux distributions, and when started, it will look for the following files in the particular order and executes them. These files contains commands and logics to set up proper environment variables and run required programs in Bash language.
You can edit any of these files to run your program when a Bash session is started. Comment anonymously. Community Bot 1 1 1 silver badge. Jackson Haile Jackson Haile 77 1 1 gold badge 1 1 silver badge 7 7 bronze badges.
I've used that command, and it still doesn't work. I even tried creating one via ls — Jackson Haile. Link to the guide I followed: stackoverflow. I linked it to rc2. Show 4 more comments. Active Oldest Votes. Improve this answer. GabrielSandoval Yes it's possible. This runs the program when you log in to your desktop, not when the computer boots.
Add a comment.
0コメント