Re: How to tell if I'm logged on from console?

1998-05-26 Thread Greg Norris
Here's a little snippit I've used... -- case $(tty) in /dev/tty[1-9]) setleds +num;; esac -- Probably overkill using a case statement for no more than that, but it works. On Tue, May 26, 1998 at 02:45:51AM -0400, Norbert Veber wrote: > On Wed, May 13, 1998 at 06:58:45AM -040

Re: How to tell if I'm logged on from console?

1998-05-26 Thread Norbert Veber
On Wed, May 13, 1998 at 06:58:45AM -0400, Kenneth Sims wrote: > Will, > > I think Mr. Moffatt is on the right track. Won't `tty` actually be ttyp# if > you are connected via ethernet? Similarly, I think it will be different when > you are connected via serial port. > > I've used: x = `tty | grep

Re: How to tell if I'm logged on from console?

1998-05-13 Thread Kenneth Sims
Will, I think Mr. Moffatt is on the right track. Won't `tty` actually be ttyp# if you are connected via ethernet? Similarly, I think it will be different when you are connected via serial port. I've used: x = `tty | grep 'tty[012345]'` to do exactly what you are asking about. Ken At 01:17 AM

Re: How to tell if I'm logged on from console?

1998-05-13 Thread Hamish Moffatt
On Wed, May 13, 1998 at 01:17:25AM -0400, Will Lowe wrote: > On Wed, 13 May 1998, Hamish Moffatt wrote: > > > 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. > > Well, yes, except that I might be on from

Re: How to tell if I'm logged on from console?

1998-05-13 Thread Will Lowe
On Wed, 13 May 1998, Hamish Moffatt wrote: > > 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. Well, yes, except that I might be on from the console on /dev/tty3 ... all I really care about is that I'm sitting

Re: How to tell if I'm logged on from console?

1998-05-12 Thread Hamish Moffatt
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

How to tell if I'm logged on from console?

1998-05-12 Thread Will Lowe
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