[comp.unix.xenix] Multiscreens - which one is active?

jessea@dynasys.UUCP ( Sysadmin.) (10/20/89)

I'm curious about how I could be able to tell which multi-screen is active
on the console.  This is just one example of how I could use this information:
I log onto a system and I want to be able to page the person on the console.
So, instead of going through a trial and error process, I want it to beep the
active multi-screen.

I stress that I do not want someone to solve the paging problem.  I want to
know how to determine which multi-screen is the active one.  I can use this
in other ways as well.  Thanx in advance.

-- 
        Jesse W. Asher
        Dynasys               (901) 382-1705  
        6196-1 Macon Rd., Suite 200, Memphis, TN  38134  
        uunet!dynasys!jessea

robert@gutarman.UUCP (robert) (10/20/89)

In article <11@dynasys.UUCP> jessea@dynasys.UUCP (Jesse W. Asher - Sysadmin.) writes:
>I'm curious about how I could be able to tell which multi-screen is active
>on the console.  This is just one example of how I could use this information:
>I log onto a system and I want to be able to page the person on the console.
>So, instead of going through a trial and error process, I want it to beep the
>active multi-screen.
>
>-- 
>        Jesse W. Asher
>        Dynasys               (901) 382-1705  
>        6196-1 Macon Rd., Suite 200, Memphis, TN  38134  
>        uunet!dynasys!jessea

Hi jesse...I think I might have an idea of what you are talking about! :->

Anyhow, When I log into doug's computer, I usually do a who -u.  The 4th
coloumn is the "idle" time.  This way, you can tell what the console user
is doing.  The who -u tells keyboard idleness, so if they are running a
program, and doing a lot of typing (like lyrix), then the idle time will
be null.  Hope this helps.  It does get confusing, though.

sl@van-bc.UUCP (Stuart Lynne) (10/23/89)

In article <55@gutarman.UUCP> robert@gutarman.UUCP () writes:
>In article <11@dynasys.UUCP> jessea@dynasys.UUCP (Jesse W. Asher - Sysadmin.) writes:
>Anyhow, When I log into doug's computer, I usually do a who -u.  The 4th
>coloumn is the "idle" time.  This way, you can tell what the console user
>is doing.  The who -u tells keyboard idleness, so if they are running a
>program, and doing a lot of typing (like lyrix), then the idle time will
>be null.  Hope this helps.  It does get confusing, though.


You can also try things like:

	echo "Hello - please call me" > /dev/mono

this will generally go to the active screen. Of course you will have to
figure out which of /dev/{[cepv]ga,mono} is actually available on your
system.

-- 
Stuart.Lynne@wimsey.bc.ca ubc-cs!van-bc!sl 604-937-7532(voice) 604-939-4768(fax)

davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) (10/23/89)

  I can't tell you how to determine the screen in use, but I can tell
you how to force it to be the one you wrote your message to... the
sequence ESC [ XX z (where XX is 00-11, terminal number) will change the
screen. You can do something like:
	echo "Hey you!\033[01z" >/dev/tty02

  Note that this can be a REAL pain for the person using the console, so
be careful. I use this to put certain message on a problem screen and
then change to it. I use it only when something needs to be noticed
RIGHT NOW.

-- 
bill davidsen	(davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon

barton@holston.UUCP (Barton A. Fisk) (10/24/89)

In article <55@gutarman.UUCP>, robert@gutarman.UUCP (robert) writes:
> In article <11@dynasys.UUCP> jessea@dynasys.UUCP (Jesse W. Asher - Sysadmin.) writes:
> >I'm curious about how I could be able to tell which multi-screen is active
> >on the console.  This is just one example of how I could use this information:
> >I log onto a system and I want to be able to page the person on the console.

While were wishing, how about adding a status window or line to the 
console so the console user knows what multiscreen he's on at
a glance?

Maybe  the newer versions already incorporate this I'm still 
on 2.2.
-- 
Barton A. Fisk          | UUCP: {attctc,texbell,vector}!warble!holston!barton
PO Box 1781             | (PSEUDO) DOMAIN: barton@holston.UUCP     
Lake Charles, La. 70602 | ----------------------------------------
318-439-5984            | "Let him who is without sin cast the first stone"-JC

peter@ficc.uu.net (Peter da Silva) (10/25/89)

> While were wishing, how about adding a status window or line to the 
> console so the console user knows what multiscreen he's on at
> a glance?

What, and give up a line?

And what if you're running X or DOS?
-- 
Peter da Silva, *NIX support guy @ Ferranti International Controls Corporation.
Biz: peter@ficc.uu.net, +1 713 274 5180. Fun: peter@sugar.hackercorp.com. `-_-'
"That particular mistake will not be repeated.  There are plenty of        'U`
 mistakes left that have not yet been used." -- Andy Tanenbaum (ast@cs.vu.nl)

root@medsys.uucp (sysop) (10/25/89)

barton@holston.UUCP (Barton A. Fisk) writes:

>While were wishing, how about adding a status window or line to the 
>console so the console user knows what multiscreen he's on at
>a glance?

How about just adding this line to your .profile:

     set `who am i`; PS1=$2"> "

-- 
             __   __|  __        __        LaVerne Olney -- Med-Systems
    |/^\/^\ /__) /  | (__  \  / (__     Medical Office Management Software
    |  |  | \__  \__| ___)  \/  ___)       Kingsport, TN  37660  U.S.A.
    Unix BBS: 615-288-3957  /               UUCP: uunet!medsys!laverne

davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) (10/26/89)

In article <637@holston.UUCP>, barton@holston.UUCP (Barton A. Fisk) writes:

|  While were wishing, how about adding a status window or line to the 
|  console so the console user knows what multiscreen he's on at
|  a glance?

  I hate to suggest anything so simple, but I have been making the
screen# part of my prompt. I don't want to give up a line for status.
-- 
bill davidsen	(davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon

sl@van-bc.UUCP (Stuart Lynne) (10/26/89)

In article <1472@crdos1.crd.ge.COM> davidsen@crdos1.UUCP (bill davidsen) writes:
>In article <637@holston.UUCP>, barton@holston.UUCP (Barton A. Fisk) writes:
>
>|  While were wishing, how about adding a status window or line to the 
>|  console so the console user knows what multiscreen he's on at
>|  a glance?
>
>  I hate to suggest anything so simple, but I have been making the
>screen# part of my prompt. I don't want to give up a line for status.

I've been doing that for years, here's some decripit cshrc script you can
use, it gives you your tty number, history line number and either a '%' or a
'*' depending on whether you are root or not.

E.g.
	01-45 %
	02-10 * 

Additions for .cshrc script

	set tty=`tty`
	set basetty=`basename $tty`
	set basetty=`expr $basetty : '...\(..\)'`
	set idgid=`id`
	if ( $idgid[1] == "uid=0(root)" ) then
	set prompt="$basetty-\! * "
	else
	set prompt="$basetty-\! % "
	endif


-- 
Stuart.Lynne@wimsey.bc.ca ubc-cs!van-bc!sl 604-937-7532(voice) 604-939-4768(fax)

arch@hub.cs.jmu.edu (Arch Harris) (10/26/89)

> In article <41@van-bc.UUCP>, sl@van-bc.UUCP (Stuart Lynne) responds
> to article <55@gutarman.UUCP> robert@gutarman.UUCP () and
> article <11@dynasys.UUCP> jessea@dynasys.UUCP (Jesse W. Asher - Sysadmin.) writes:
> 
> You can also try things like:
> 	echo "Hello - please call me" > /dev/mono
> this will generally go to the active screen. Of course you will have to
> figure out which of /dev/{[cepv]ga,mono} is actually available on your
> system.
 
This only works if one of the multiscreens is the controlling terminal 
(a fact that is NOT documented in SCO 2.2.2).  If you're executing
the `echo' command line above using `at' or `cron', there will 
be no controlling terminal and the attempt to open /dev/mono will fail.
You need to write a program which calls `setpgrp', then opens a
multiscreen which is not already been opened by any other process.  
Then your program can open and write to /dev/mono (or /dev/?ega).

    Arch Harris                 INTERNET: arch@hub.cs.JMU.EDU
    Dept of Computer Science    UUCP:     uunet!virginia!jmucshub!arch
    James Madison U.            BITNET:   fac_harris@JMUVAX1
    Harrisonburg, VA 22807      Phone:    (703) 568-6847
-- 

	Arch Harris			BITNET: FAC_HARRIS@JMUVAX1
	Dept of Computer Science	PHONE: (703) 568 6847
	James Madison University
	Harrisonburg, VA 22807