How do I run a bash script at login?

The standard session manager used by LXDE - http://wiki.lxde.org/en/LXSession
Locked
LambdaFox
Posts: 14
Joined: Mon Apr 28, 2014 1:08 pm

How do I run a bash script at login?

Post 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...
Linux noobie -Tech Oldie - Migrating from Years w XP + Classic Desktop to Lubuntu 14.04
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

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

Post by drooly »

is your script marked executable?
does it do what it should when you execute it manually?
LambdaFox
Posts: 14
Joined: Mon Apr 28, 2014 1:08 pm

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

Post by LambdaFox »

drooly wrote:is your script marked executable?
does it do what it should when you execute it manually?
Yes and yes
Linux noobie -Tech Oldie - Migrating from Years w XP + Classic Desktop to Lubuntu 14.04
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

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

Post 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.
Locked