Page 1 of 1

autostart under /etc/xdg/lxsession/Lubuntu/ does not works

Posted: Wed Dec 04, 2013 2:56 pm
by martro
Hi,
i don't know if is a bug on lubuntu 13.10
I'm trying to start a script after login.
My script is that:

Code: Select all

#!/bin/bash

echo "Hello World" > /tmp/hello.txt
if i running it from shell

Code: Select all

./hello.sh
user@localhost:~/Desktop$ ls -alh /tmp/hello.txt
-rw-rw-r-- 1 user user 12 dic  2 11:12 /tmp/hello.txt
Well. I'm changing /etc/xdg/lxsession/Lubuntu/autostart like this

Code: Select all

@/home/user/Desktop/hello.sh
but after login nothing happens

Code: Select all

ls -alh /tmp/hello.txt
ls: cannot access /tmp/hello.txt: No such file or directory
but if change local autostart

Code: Select all

cat /etc/xdg/lxsession/Lubuntu/autostart > /home/user/.config/lxsession/Lubuntu/autostart
after login it works

Code: Select all

ls -alh /tmp/hello.txt
-rw-r--r-- 1 user user 12 dic  2 11:44 /tmp/hello.txt
What's wrong? How can set my lubuntu in order to run the same script for all users?

Re: autostart under /etc/xdg/lxsession/Lubuntu/ does not wor

Posted: Wed Dec 04, 2013 4:04 pm
by Rex Bouwense
Hi. Welcome to the lxde forum. Look at this site:
http://lxlinux.com/#4
Specifically, the last paragraph of #4.
There is also an old bug filed on SourceForge.
http://sourceforge.net/tracker/index.ph ... tid=894869
So, it appears that if you are using both locations to auto start only the home location will work. Is that what is happening in your case?

Re: autostart under /etc/xdg/lxsession/Lubuntu/ does not wor

Posted: Tue Dec 10, 2013 10:41 am
by martro
Rex Bouwense wrote:Hi. Welcome to the lxde forum.
Thank you ;)
Rex Bouwense wrote: Look at this site:
http://lxlinux.com/#4
Specifically, the last paragraph of #4.
There is also an old bug filed on SourceForge.
http://sourceforge.net/tracker/index.ph ... tid=894869
So, it appears that if you are using both locations to auto start only the home location will work. Is that what is happening in your case?
That's it.
Now i've modified /etc/xdg/lxsession/Lubuntu/autostart and deleted home autostart.
And everytime l'm logging in /etc/xdg/lxsession/Lubuntu/autostart will copied in home autostart

Re: autostart under /etc/xdg/lxsession/Lubuntu/ does not wor

Posted: Tue Dec 10, 2013 4:45 pm
by Rex Bouwense
Great. Stick around if you can to provide help to others. We are a small forum and are constantly looking for more volunteers to help when they can (in any way.)