Page 1 of 1

How do I run a bash script at login?

Posted: Mon Apr 28, 2014 11:23 pm
by LambdaFox
I am a linux. Newbie tech oldie. I am using Lubuntu 14.04.

When i select preferences - default programs for LXSession, and click on the autostart, I am able to add manually nm-applet and get it to start at boot.

I also would like to run a bash script at boot. I have tried adding just the script file with its full path. I have also tried /bin/bash with the full path and script. Neither of these works.

April 29. I tried moving the script to /usr/local/bin which is in the path for root and me. Then I put only the scriptname in the autostart entry. That did not work...

Re: How do I run a bash script at login?

Posted: Wed Apr 30, 2014 6:09 pm
by drooly
is your script marked executable?
does it do what it should when you execute it manually?

Re: How do I run a bash script at login?

Posted: Sun May 04, 2014 3:10 am
by LambdaFox
drooly wrote:is your script marked executable?
does it do what it should when you execute it manually?
Yes and yes

Re: How do I run a bash script at login?

Posted: Sun May 04, 2014 8:33 am
by drooly
there's a new gui i am not familiar with yet.

and trying to play with it, i find it sucks.

so, remove anything you managed to add there.
remove your script from /usr/local/bin.
try adding the script with its full path (somewhere in your $HOME, please) to $HOME/.config/lxsession/Lubuntu/autostart.