I'm running from the command line but that does not sound like it should be
an obstacle
However, if possible, I would prefer [if I may be permitted to be finicky]
to have this command executed only once on a given day, rather than each
time I log in during the day
David
----- Original Message -----
From: "Richard Adams" <[EMAIL PROTECTED]>
To: "David Turetsky" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, June 23, 2001 1:59 AM
Subject: Re: Where to put 'calendar -a'
> On Sat, 23 Jun 2001, David Turetsky wrote:
> > I would like 'calendar -a' to be evoked the first time I log in
> > each day to my Debian Linux system
> >
> > That doesn't sound like a task for cron
> >
> > Where can I put that?
>
> If i want programs to be started when you login (i am presuming under X)
> then a good place is your .bash_profile which should be in your home dir.
> I dont know how its called in debian it could be one of .bashrc .profile
or the
> one mentioned above.
> Anyway that file gets read upon you logging in, so if you require a
program to
> be started upon login simply add (at the bottom of the file) a statement
like;
>
> # Ask if we should start <program>
> echo "Start program ? enter y/n"
> read x
> if [ "$x" = "n" -o "$x" = " " ]; then
> echo "Aborting..."
> else
> # Check and see if the program is already running.
> PS=`ps ax | grep -v grep | grep program | awk '{print $1}' | wc -c`
> if [ "$PS" -gt "0" ]; then
> echo "program is already running"
> else
> /sbin/program &
> fi
> fi
>
> Simply substitute "program" with your desired program name.
>
> As another example i have attached my .bash_profile, it has several
interesting
> things in it.
>
> >
> > --
> > David Turetsky
> > ---------------
> > richSOB.com
>
> --
> Regards Richard
> [EMAIL PROTECTED]
> http://people.zeelandnet.nl/pa3gcu/
>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs