On Tue, May 12, 1998 at 04:23:25PM -0400, Will Lowe wrote: > Rather than running xdm all the time (nobody but me ever logs in, and I > can't remote Xdm into the machine because it's behind a firewall), I'd > like to simply write a script in my .bash_profile that determines if I'm > logged on from the console and runs startx if I am. > > Anybody got any way for a script to tell if > 1) I'm logged onto the console
Well, if `tty` matches /tty\d/ is probably best. > 2) there's no other X process running ps <something> | grep -c ... ? Hamish -- Hamish Moffatt, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Latest Debian packages at ftp://ftp.rising.com.au/pub/hamish. PGP#EFA6B9D5 CCs of replies from mailing lists are welcome. http://hamish.home.ml.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]