[newbie] Running programs at startup

2004-01-14 Thread Warren Post
I am trying to understand the different ways that programs can be run at
startup. What has sparked my interest is that I am experimenting with
different windows managers, yet I would like some basic things (xmms,
xscreensaver, gkrellm, etc.) to be launched upon entry into any window
manager. Yet aside from getting specific answers to specific questions,
I'm hoping to understand the big picture here. So here's what I
understand so far, gleaned from this list's archive. Please help me
correct my misconceptions and patch my ignorance:

/etc/profile
Runs a program upon login of any user, any WM, in or out of X. I have,
for example, xmms here so that xmms starts up regardless of user, which
is what I want. It tries and fails to launch xmms even if the user is
logging in to a console, so I should move this to a file that executes
programs only if logging in under X. Is there such a file? If not, is
there a way I can condition the launching of xmms (or any program that
requires X) upon X being running?

/etc/rc.local (- /etc/rc.d/rc.local)
Said to do the same as /etc/profile, but I can't get it to work, nor do
I understand when one would use this vs. /etc/profile.

~/.xinitrc
Runs a program upon a particular user starting X. Only works if you
login at a console and then start X manually.

~/.bashrc
Runs a program every time a particular user opens a terminal, assuming
he uses bash.

~/.bash_profile
Runs a program upon login of a particular user, any WM, in or out of X.
I haven't mastered this yet as sometimes it works and sometimes it
doesn't. As with /etc/profile, I'd like to find a way to condition the
launching of a program that requires X upon X being running.

And of course many WMs have their own ways of launching programs on
startup, such a placing things in ~/Desktop/Autostart. I'm not
considering them here because for the moment I am looking for
WM-independent ways to launch programs.

So... what else is there to know about running programs at startup?
-- 
Warren Post, Registered Linux user 241394
Santa Rosa de Copán, Honduras
http://srcopan.vze.com/


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] Running programs

2000-02-28 Thread steve . flynn




You path variable does not have the current directory in it by default.
That is, it will define you path to include
/usr/bin:/bin:/home/someguy/bin: etc but it does not include './' which is
the current directory.

There are two ways to get around this problem:

Start your program with

'./myprog'

or add ./ to then of the PATH environment variable in your .bash_profile. I
personally use the latter method as I get mightily tired of cd'ing over to
a directory and typing './' in front of everything! You may prefer the
first mehtod - personal taste.


Steve Flynn
IBM MVS Operations Analyst



Elvis Dieguez [EMAIL PROTECTED] on 26/02/2000 03:03:14

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Steve Flynn/UK/Contr/IBM)
Subject:  [newbie] Running programs




I have a problem I cannot figure out.  I have compiled a few home made
programs
but I cannot get them to run on Linux.  I open up a terminal window in the
directory where the executable is located and I type in the name I get an
error
warning ("Bash: command not found").  However, using KDE, if I click on the
file and tell it to open it in a terminal then the program runs alright.
I've
looked through the documentation but I have not been able to figure out
what I
am doing wrong.  I'd appreciate any help.

Thank you
Elvis Dieguez





Re: [newbie] Running programs

2000-02-26 Thread Lane Lester


On Fri, 25 Feb 2000, Elvis Dieguez wrote:
 I have a problem I cannot figure out.  I have compiled a few home
 made programs
 but I cannot get them to run on Linux.  I open up a terminal window
 in the
 directory where the executable is located and I type in the name I
 get an error
 warning ("Bash: command not found").

The most obvious answer (and it may not be the one for you) is that you
may need to put "./" in front of the filename to tell bash that the
program is in the current directory. DOS users (like me) have to learn
this lesson, because DOS automatically looks in the current directory
before consulting PATH.
-- 
Lane
 
Lane Lester / Madison County, Georgia USA
Getting where I want to go with Linux...



Re: [[newbie] Running programs]

2000-02-26 Thread Michael Scottaline

Elvis Dieguez [EMAIL PROTECTED] wrote:
 I have a problem I cannot figure out.  I have compiled a few home made
programs
 but I cannot get them to run on Linux.  I open up a terminal window in the
 directory where the executable is located and I type in the name I get an
error
 warning ("Bash: command not found").  However, using KDE, if I click on the
 file and tell it to open it in a terminal then the program runs alright. 
I've
 looked through the documentation but I have not been able to figure out what
I
 am doing wrong.  I'd appreciate any help.
 
 Thank you
 Elvis Dieguez
=
Remember, if you're already in the directory where the executable resides, you
must use ./executable  as the command.  Try that.
Mike

##
Michael Scottaline
Linux 2.2.13
##


Get your own FREE, personal Netscape WebMail account today at 
http://webmail.netscape.com.