[comp.sys.sun] Ending a SunView Application

grubin@toadwar.ucar.edu (rick grubin) (05/24/89)

We have an application that, when it runs, uses the entire monitor screen
as its display.  We have need for a way to stop the SunView processes(es),
clear the screen, and log out an account when this application is to be
stopped.  What I am after is something analogous to how SunView works when
you exit it; that is, you select "Exit SunView" from the menu, and then
all your windows processes are killed, the screen is cleared, and you are
logged out (if you fire up SunView from your .login, and choose to exit
upon its completion).

Is there some sort of call or sequence of calls to accomplish this task?
We've been able to successfully stop SunView and its processes, but not
clear the screen before logout.  Does anyone have any clues/pointers?  

E-mail would be a preferred reply in this case, as an answer as soon as
possible would be the best, but a post is good, too.  Thanks in advance
for any help provided.

Rick Grubin, Nat'l Center for Atmospheric Research
grubin@toadwar.UCAR.EDU  ...!ncar!toadwar!grubin

zcnj01@uunet.uu.net (Cecil N. Jones) (06/20/89)

 (rick grubin) writes:
>
>We have an application that, when it runs, uses the entire monitor screen
>as its display.  We have need for a way to stop the SunView processes(es),
>clear the screen, and log out an account when this application is to be
>stopped.  What I am after is something analogous to how SunView works when
>you exit it; that is, you select "Exit SunView" from the menu, and then
>all your windows processes are killed, the screen is cleared, and you are
>logged out (if you fire up SunView from your .login, and choose to exit
>upon its completion).

You might look at the source code for suntools and see how they do it.


>Is there some sort of call or sequence of calls to accomplish this task?
>We've been able to successfully stop SunView and its processes, but not
>clear the screen before logout.  Does anyone have any clues/pointers?  

the command clear_colormap might do it for you


  Cecil N. Jones    Amoco Production Co.  Tulsa, OK
  @apctrc.uucp
  The opinions expressed are solely my own.

sridhar@hplabs.hp.com (Sridhar Acharya) (06/28/89)

 (rick grubin) writes:
>
>We have an application that, when it runs, uses the entire monitor screen
>as its display.  We have need for a way to stop the SunView processes(es),
>clear the screen, and log out an account when this application is to be
>stopped.  What I am after is something analogous to how SunView works when
>you exit it; that is, you select "Exit SunView" from the menu, and then
>all your windows processes are killed, the screen is cleared, and you are
>logged out (if you fire up SunView from your .login, and choose to exit
>
>Is there some sort of call or sequence of calls to accomplish this task?
>We've been able to successfully stop SunView and its processes, but not
>clear the screen before logout.  Does anyone have any clues/pointers?


Try this:
/*******************************
Pixrect *screen;

screen = pr_open("/dev/fb");
pr_rop(screen,0,0,screen->pr_size.x,screen->pr_size.y,
                                                   PIX_CLR, NULL,0,0);    
pr_close(screen);

************************************/

Hope it helps

Sridhar Acharya
Hughes Lan Systems.
sun!sytek!sridhar