You are not logged in.
Good Morning
I am a recent convert to SliTaz and am keen on everything I have seen so far.
However I am having a major issue trying to get a shell script to run after the desktop has come up.
I am trying to build a distro for use on a pxe server, however I am having identical issues with 2 hard drive installs. I am using 5.0RC2 generally from the core flavour. I am happy to try any other if anyone can suggest ways to not waste more time.
Basically I want to run a script after the desktop is up. I have tried and failed:-
Adding to /etc/xdg/autostart
Adding to /etc/init.d/local.sh
adding to /etc/rcS.conf
adding to /etc/init.d/rcS
adding to /user/tux/.config/autostart
I have tried running the script directly and with /scriptname & then in that script a sleep 20 then fg and then the script I want.
All have spectacularly failed.
I have spent hours scouring the documentation, forums and the net generally and am now feeling quite stupid.
I am at a loss what to do next.
Can anyone help?
Thanks
Kevin
Offline
/etc/xdg/autostart is a directory for *.desktop files not for sh-script. Copy&Rename it, then edit [c]Exec=[/c].
~/.config/openbox/autostart works only for pure openbox, NOT in lxde.
/user/tux/.config/autostart - i hope you mean ~/.config/autostart/ - interestingly: if to modify something in lxsession-edit e.g. just remove yad-package-notify - then autocreating of [c]~/.config/openbox/autostart[/c] fails, but why? this is not [c]~/.config/autostart/[/c]
I have tried running the script directly
All have spectacularly failed.
WHAT? so problem is in your script, not with autorun?
Have you tried [c]chmod 777[/c] and [c]chmod +x scriptname[/c]?
Offline
Thanks for the reply.
Apologies. I have failed to be clear.
My script runs fine. I am failing to get it to run automatically on startup.
I have copied one of the existing files in /etc/xdg/autostart and edited it to run my script and it seems to be working.
Many thanks
Offline
In Summary for anyone with similar problems:
I created a file called startup.desktop in /etc/xdg/autostart
it contains:
[Desktop Entry]
Type=Application
Name=Starter
Name[fr]=Starter
Name[pt]=Starter
Name[pt_BR]=Starter
Name[ru]=Starter
Exec=/routeto/starter.sh
NotShowIn=XFCE;Razor;
I'm not sure the last line or the other language names are required, but it is working fine for me.
Thanks again to az_ua
Offline
[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]