Autostart programs/scripts in Debian 8 Jessie
Solution 1
You could also add your script to cron and schedule it to be launched on each reboot. To do this, open the file in an editor:
nano /etc/crontab
Then add the following line to the end.
@reboot root /path/to/script.sh
Afterwards just reboot and it should work.
Solution 2
If it is reliant on the x-server, then you could add it to $HOME/.xinitrc
. (I think this is the correct answer)
If it can run without a graphical user interface then put it in the login script ($HOME/.zlogin
for zsh).
By "it" I mean:
bash /path/to/script #This should be the same as using the following:
#sh /path/to/script #if it uses #!/usr/bin/sh
#python /path/to/script.py #if it uses #!/usr/bin/python
#perl /path/to/script.pl #if it uses #!/usr/bin/perl
#etc
Related videos on Youtube
Dimitrios Charalampidis
Financial professional with passion for the markets, involved in statistical analysis and in-depth financial research. Meanwhile, in love with the IT industry!
Updated on September 18, 2022Comments
-
Dimitrios Charalampidis over 1 year
I have a scipt (.sh) for screen rotation of my thinkpad on linux. I have now installed Debian 8 Jessie and the "Startup Applications" is no longer there, how can I make it to startup on boot? or user login?
I have already tried: 1. Create a .desktop for the script and copy it to ~/.config/autostart 2. Copy the script in ~/.config/autostart 3. Create a symlink to the script in ~/.config/autostart