SoNiC <[EMAIL PROTECTED]> writes:

>       I was wondering if anyone knew how to auto launch programs when logging
> in?  Thanks in advance.

It's pretty easy.  If you want to autoload programs at the console, 
you would add them to ~/.profile or ~/.login or ~/.bash<something> 
depending on what shell and what distro you are using.  For instance, 
I use Slackware and bash shell so I would edit ~/.profile.

If you want to autoload programs in X you have some choices.  It depends on  
the windowmanager you are using.

For any WM - add them to ~/.xinitrc (remember to background them with
                "&" and load the WM last in that file)

For KDE - not totally sure, but I think there is a "auto-start group"

For Gnome/Enlightenment - defaults to starting whatever was running
                when you shut it down.

For FVWM - ~/.fvwmrc
For FVWM2 - ~/.fvwm2rc

A point to note.  If you are trying to work out a way to auto-start
programs at the console and not in X, you may want to ask yourself "do 
I really want to?".  Here's why...

At the moment I have logged into my machine 6 times.  I'm currently
writing this in Xemacs (of which I have 1 copy running and that is the 
only copy I want running).  For the sake of the argument, let's say
that I decide to have Xemacs start up automatically when I log in.
Now, on the surface, that's not a bad idea, because I use Xemacs for
mail, news, editing files, viewing man pages and info pages etc etc.
It's a great program that I don't think I could live without.  But,
lets look a little closer.  I've currently logged in 6 times, that
would be 6 copies of Xemacs running.  Not exactly efficient.

Ok, having thought about this for a moment or two, I think I've
thought of a way around the above problematic scenario.

In keeping with the Xemacs example.  Just load Xemacs via a shell
script from ~/.profile.  That shell script would do a couple of
things.  It would first check for the existence of a certain file, if
it wasn't there it would load Xemacs, if that file did exist Xemacs
would not load.  If it loads Xemacs it creates that certain file.
Then in /etc/rc.d/rc.local I would delete that special file.

Now some of what I've said here may have gone over your head, that
doesn't matter.  The point is that there is nearly _always_ a way to
accomplish something with Linux.

-- 
Regards, Steve Youngs <[EMAIL PROTECTED]> ICQ: 34307457
------------------------------------------------------------
|                                 __                       |
| Isn't it good to know that     / /   __ ___  __ ____  __ |
| There _IS_ an alternative!    / /__ / // _ \/ // /\ \/ / |
|                              /____//_//_//_/\_,_/ /_/\_\ |
------------------------------------------------------------

Reply via email to