-   Linux - General (
-   -   Universal Linux autostart folder (

bubaliba 05-29-2010 04:49 PM

Universal Linux autostart folder
I'm a complete Linux beginner who wrote his first little script.
I'm writing an 'installer' for it (so I can share it with friends) and I'm wandering if there is a universal method to add it to autostart in all Linux distributions.
I was thinking about cron/crontab but it's not the best choice, as writing an uninstaller which removes a specific line from crontab is out of my league. I'd rather copy a *.desktop file to autostart folders and then be able to remove them.

BTW do you have to put *.desktop files in ~/.config/autostart in Ubuntu, but ~/.kde/Autostart in Kubuntu even if they are shell scripts?

Bratmon 05-29-2010 06:00 PM

If the script is a gui thing, I'm not sure, but perhaps this would help.

If the script isn't interactive, this is the general way to do it.

John VV 05-29-2010 07:37 PM

or dropping the script into /etc/profile.d folder

this it where i set program auto settings

if this is ubuntu why not just turn it into a .deb

also depending on what this script dose -- it might not be a good idea for it to run on boot or login , there might be conflicts.

bubaliba 05-30-2010 12:28 PM

Thanks! I'll read up on rc.d scripts.

It's not GUI, its a shell script which uses wget. I want to run it at startup - it downloads a single file - e.g. a to do list.
It's fine when I run the script by hand but it fails if I run it automatically at startup. It seems that wget starts before the network connection is established. How can I put some kind of sleep function on it? It would be great if it could check if there is a Internet connection available and the run the script.

All times are GMT -5. The time now is 05:44 PM.