LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-22-2003, 12:25 PM   #1
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
best place to launch a utility upon login


Hi,

I wish to run seti@home everything I log in automatically. At the moment I manually run it and manually stop it again before I log out. I have a script for this.

I wondering where is the best place to put this? Would it make sense to start in it rc.local or call it from .bash_profile (although this called each time I open a terminal??)

Or even a cron? But maybe that isn't necessary since I don't launch it according to a given time.
 
Old 05-22-2003, 12:30 PM   #2
slightcrazed
Member
 
Registered: May 2003
Location: Lisbon Falls, Maine
Distribution: RH 8.0, 9.0, FC2 - 4, Slack 9.0 - 10.2, Knoppix 3.4 - 4.0, LFS,
Posts: 789

Rep: Reputation: 30
Anything you want to run at start up you should be able to enter into your ~/.Xsession file. Some distro's don't come with this file, but you should be able to create one easy enough, and X will run it everytime it starts.

slight
 
Old 05-22-2003, 12:31 PM   #3
cmfarley19
Member
 
Registered: Nov 2002
Location: Central VA
Distribution: Ubuntu/Debian
Posts: 228

Rep: Reputation: 32
I run seti from cron with:
Code:
0,15,30,45 * * * * cd /home/cfarley/seti; ./setiathome > /dev/null 2> /dev/null
Tries to run every 15 minutes. Does nothing if already running.

Give that a shot.

Last edited by cmfarley19; 05-22-2003 at 12:32 PM.
 
Old 05-22-2003, 12:57 PM   #4
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Apologies slightcrazed,

I meant to mention my distro. It's RedHat 9. I never knew about the .xsession file. The .bash_profile isn't on though?

cmfarley19,

I actually use a seti cache manager: Sebseti. It was written in perl and handle x units. I think if I put it in a cron I *think* it will start a new session every 15 minutes.. but I'll give it a go!

Thanks for the ideas guys! Again the .bash_profile runs only once when I log in first doesn't it? Not when I open each "window".
 
Old 05-22-2003, 01:10 PM   #5
tcaptain
LQ Addict
 
Registered: Jul 2002
Location: Montreal
Distribution: Gentoo 2004 from stage 1 baby!
Posts: 1,403

Rep: Reputation: 45
so which should it be? .bash_profile? I'm actually curious because I wanted to slap in fortune after I login in

(I'm figuring .Xsessions is only for when you fire up the wm right?)
 
Old 05-22-2003, 01:13 PM   #6
slightcrazed
Member
 
Registered: May 2003
Location: Lisbon Falls, Maine
Distribution: RH 8.0, 9.0, FC2 - 4, Slack 9.0 - 10.2, Knoppix 3.4 - 4.0, LFS,
Posts: 789

Rep: Reputation: 30
The only harm with putting it in the .bash_profile is that if you log into a shell terminal it will try to run the .bash_profile again, and might start seti again as a job under whatever user you logged in as.... i.e.

You log into RH 9 using graphical interface as user, .bash_profile in your users home directory is run, and starts Seti. You then CTRL+ALT+F1 and log in as the same user again at a terminal, your .bash_profile is run again and try's to start seti again, and you either get an error (if it can't run without X), or you end up with 2 instances of it.

Other than that, I don't really think there is any harm.

slight
 
Old 05-22-2003, 02:33 PM   #7
cmfarley19
Member
 
Registered: Nov 2002
Location: Central VA
Distribution: Ubuntu/Debian
Posts: 228

Rep: Reputation: 32
As long as the -nolock option is not used, only ome instance of seti will be allowed to run.
 
Old 05-22-2003, 03:07 PM   #8
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
excellent advice guys.

Thanks!
 
  


Reply



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
auto launch programs at login desmondtm Linux - Newbie 1 12-01-2005 04:51 PM
NIS/LDAP alternative: manual-copy-of-login credentials utility? mattengland Linux - Software 0 09-11-2005 10:19 PM
how to launch applications on x login? zero79 Debian 7 07-11-2005 06:07 PM
Automaticly Launch program on login, gnome diamonds Linux - General 2 04-10-2005 07:02 AM
Unable to launch X apps with non login root shell kc00l Slackware 2 11-24-2003 03:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:51 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration