Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-29-2010, 03:49 PM   #1
LQ Newbie
Registered: May 2010
Posts: 2

Rep: Reputation: 0
Question 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?
Old 05-29-2010, 05:00 PM   #2
Registered: Jul 2009
Distribution: Arch / Mint 17
Posts: 297
Blog Entries: 3

Rep: Reputation: 50
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.
Old 05-29-2010, 06:37 PM   #3
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,169

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
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.
Old 05-30-2010, 11:28 AM   #4
LQ Newbie
Registered: May 2010
Posts: 2

Original Poster
Rep: Reputation: 0
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.

Last edited by bubaliba; 05-30-2010 at 11:29 AM.


autostart, bash, cron, crontab, desktop, shell

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
tomboy autostart in xfce, though not on autostart list zlya Linux - Desktop 2 11-10-2009 10:49 AM
Gnome/KDE Desktop Folder & Gnome Autostart ihatethedekoys Linux - General 1 08-07-2006 11:16 AM
Universal Linux Distro? bonsai or die Linux From Scratch 1 05-14-2005 10:54 AM
Autostart Folder squirellplaying Linux - General 0 11-27-2004 11:07 PM
Kde 2 Autostart folder rfc1700 Linux - General 1 03-12-2001 08:04 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration