LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-29-2010, 03:49 PM   #1
bubaliba
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
Bratmon
Member
 
Registered: Jul 2009
Location: 75.126.162.205:80
Distribution: ubuntu 10.04 / Arch
Posts: 296
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
Guru
 
Registered: Aug 2005
Posts: 12,669

Rep: Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683
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
bubaliba
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.
 
  


Reply

Tags
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


All times are GMT -5. The time now is 04:08 AM.

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