I am trying to run a script at every system startup. Here is the Script :
#!/bin/sh
echo $(sensible-browser http://localhost/example/user=$USER)
I put copied the script to /etc/init.d/ changed the file permission to 755 and then ran the command sudo update-rc.d scriptname.sh defaults.
tried to run the script via /etc/rc.local too but no luck. Nothing Happens when the system boots up.
What else can I do ?
You usually don’t want to start a browser at system startup–you want to start it after you log in. For that your shell provides startup files (e.g.
$HOME/.profilefor Bourne heritage shells, or$HOME/.loginfor csh type shells). As an alternative, X11 programs can be started from$HOME/.xinitrcor$HOME/.xsession.Maybe we can help if we knew what you were actually trying to achieve.