How do I run a bash script at login?

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

How do I run a bash script at login?

Postby LambdaFox » Mon Apr 28, 2014 11:23 pm

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: 473
Joined: Mon Apr 08, 2013 6:45 am

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

Postby drooly » Wed Apr 30, 2014 6:09 pm

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?

Postby LambdaFox » Sun May 04, 2014 3:10 am

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: 473
Joined: Mon Apr 08, 2013 6:45 am

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

Postby drooly » Sun May 04, 2014 8:33 am

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.


Return to “LXSession (Lite)”

Who is online

Users browsing this forum: No registered users and 1 guest