LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-16-2003, 09:17 AM   #1
jenna_h
Member
 
Registered: Nov 2002
Distribution: Mandrake 9.0
Posts: 58

Rep: Reputation: 15
Starting programs on login?


Hi, I was wondering if anyone knows how I can start a command after my window manager starts. I use enlightenment 0.16, which usually allows you to click an option in the window menu to start a program on login. However, I would like to be able to do this with background processes (for example, index the database as soon as I login, so I can see its progress on my gkrellm). I use Mandrake 9.1, is there a configuration file somewhere in my home directory that I can use?
 
Old 08-16-2003, 11:42 AM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
You could add the command(s) to index your db in ~/.profile (/home/username/.profile) but this would cause the indexing process to run each time you login (including new xconsole sessions). If you want it to happen when you boot the machine you could add the command(s) to your /etc/rc.d/rc.local
 
Old 08-16-2003, 11:52 AM   #3
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
Hi!!!

hmmmmm, it depends how you login. Is it graphical or text mode?. I use blackbox and text login. Anyway, you most likely have to change the file Xclients or xinitrc( depending which interface you login) located at /etc/X11/xinit. Here is mine Xclients for you to have an idea:

if [ -n "$PREFERRED" ] && which $PREFERRED >/dev/null 2>&1; then
PREFERRED=`which $PREFERRED`
xgamma -gamma 1.7
exec $PREFERRED &
exec gkrellm &
exec bbkeys -iconic


Basically, you have to type exec <program you want to start> right after you find the line which initialize your desktop (in my case, PREFERRED as you can see).

Remember to also add an "&" (AND character) at the end of every line which has another program to autostart. More examples:

if [ -n "$PREFERRED" ] && which $PREFERRED >/dev/null 2>&1; then
PREFERRED=`which $PREFERRED`
xgamma -gamma 1.7
exec $PREFERRED &
exec gkrellm &
exec bbkeys -iconic &
exec aterm &
exec gaim

Note that, in the last program that I initialize, I don't use an AND character. If you do so, there will be nothing more to start and will make your X fail. Sorry if it sounds confuse, I am not good at explaining things

Good luck though
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting programs charnel Linux - General 1 08-02-2005 03:52 PM
Programs Starting automatically on login? keysorsoze Fedora 2 01-31-2005 08:53 AM
Programs not starting Floydian Linux - Newbie 8 12-28-2004 01:04 PM
Auto-starting programs after login BeNe.WS Linux - Software 4 07-30-2003 08:46 PM
Programs Not Starting BrandonJG Linux - General 2 09-02-2002 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:03 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration