[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1570.0. "DW UI running on a Sun workstation?" by ASD::ROSSI () Fri Oct 13 1989 10:56

I have a DecWindows application that uses Xlib routines, XT intinsic routines 
and Dwt routines it runs on VMS and Ultrix. Yesterday someone asked me 
if the user interface could be run from a SUN machine with the VMS machine
or Ultrix Machine as client. I didn't know the answer. Is it possible 
to do something like set display to a Sun workstation running whatever it is
that SUN ships their stations with? What would be needed to make this happen?

T.RTitleUserPersonal
Name
DateLines
1570.1caveats...but should work ...FUEL::grahamTime Marches On.....Fri Oct 13 1989 17:0835
>
>DecWindows application that uses Xlib routines
>and Dwt routines it runs on VMS and Ultrix.
>could be run from a SUN machine with the VMS machine
>or Ultrix Machine as client

This should be possible if you have TCP/IP or 'DECnet-that-understands-X'
between the Sun server and Digital machines.  I have heard of some third
party DECnet/X11 products that will work on non-Digital platforms and TCP/X
products that will work with VMS.

The Sun needs to run compatible versions (with Dwt) of the X11 server and
intrinsics, and also, have compatible fonts used by the application.  
I have run some tests between a Sun 3/60 (SunOS 4.0.1) running MIT's X11R3
and a PMAX (UWS 2.1), and most of the public domain clients such as xclock,
xeyes, xterm, twm, etc. seem to work fine.  I did get the dwt clock, calendar,
decterm, etc. to work also (with some minor font problems though).
You could get the XUI kit for Suns to ensure dwt compability.

>Is it possible to do something like set display
>to a Sun workstation running whatever it is
>that SUN ships their stations with

This is very tricky with Xview.  The biggest problem you will see here is
fonts incompatibility.

>What would be needed to make this happen?

You need IPC, server, intrinsics (Sunview is out of the question), and fonts
that are compatible for both environments.  The smartest thing to do, is, to
get our XUI product for the Sun. You should start looking at Motif...looks
like things are heading that way.

Kris..

1570.2Sun interactionMELTIN::dickGVRIEL::SCHOELLERFri Oct 13 1989 18:1211
I didn't see anything in .0 that indicated a desire to run on the Sun
machine only to display on it.  To solve the display on it problem, the
network transport and font issues mentioned in the first part of.1 are
the ones to solve.

If you really want to run the DECwindows application on the Sun, then you
will need to look at the XUI product and the other stuff in the last part
of .1.

Dick

1570.3thanksASD::ROSSIMon Oct 16 1989 09:4613
.2 >I didn't see anything in .0 that indicated a desire to run on the Sun
   >machine only to display on it.

right.

.1 >> (Sunview is out of the question)

Is this still true? Is Sunview X based? I'm guessing from
.1 that it isn't and that Xview is their X window software.
If the fonts and transport are correct assuming Xview, could I do something 
like set environ DISPLAY=sunode from an ultrix machine and expect similar
results to setting display to another ultrix machine.

1570.4More info..FUEL::grahamGimme what you can get backMon Oct 16 1989 14:38308
>If the fonts and transport are correct assuming Xview, could I do something
>like set environ DISPLAY=sunode from an ultrix machine and expect similar
>results to setting display to another ultrix machine.

Yes....but remember the caveats...the 'set environ DISPLAY=sunode' command
is only useful if you can get your applications to interoperate between Xview
and DECwindows.  The Xview fonts and server are intrinsically tied together
...so I don't know how you intend to break that 'marriage'.  Let us know
what you come up with.

>.1 >> (Sunview is out of the question)
>Is this still true? 

It depends.....I am personally against idea of mixing X with Sunview.
I tried it...it is very cumbersome.

>.2 >I didn't see anything in .0 that indicated a desire to run on the Sun
>   >machine only to display on it.

>right.

I find this interesting.....based on your inquiries on Sunview
and X ;-)

>Is Sunview X based?

No.

>that Xview is their X window software

Yes, but Xview does not use the X11 intrinsics....the core
for building widgets and gadgets.


The following info (posted to the USENET) should be helpful to anybody
wanting to run Sunview and X.

Kris...

--------------------------------------------------------------------------
Article 14107 of comp.windows.x
Path: riscy.dec.com!shlump.nac.dec.com!decuac!elijah!tarsa
From: [email protected] (Greg Tarsa)
Newsgroups: comp.windows.x
Subject: X11 under Sunview: How to do it
Message-ID: <[email protected]>
Date: 8 Oct 89 00:55:06 GMT
Organization: Tarsa Software Consultants, Bedford,  NH
Lines: 255

A few weeks ago I requested information on trying to run X11
under Sunview.  I got a number of replies, requests and
encouragements from my message requesting information on how to
use X11 with Sunview.

What follows here is a consolidation of what I learned.  Thanks to
Jan Peterson ({ ...!utah-cs!caeco | quad1 }!olyis!jlp), Tom Olin
(...!uunet!adiron!tro), Susan Bickford ([email protected])
and, indirectly, Dana Chee ([email protected]) for this information.

    1)	An official announcement of an X11/NeWS, with binary
	SunView compatibility is imminent.

    2)	For those unwilling to wait, or too poor to pay, I have
	included the information necessary to get X to run under
	Sunview.  This should work for monochrome systems on Sun-3's
	at a minimum, since that is what our shop has and it runs
	well here.

	   a) Compile the server with -DSUN_WINDOWS to include support
	      for Sunview/X co-existence.  See site.def and
	      Sun.macros to see how to do this.

	      This will allow

		       overview -w xinit

	      to work properly with X11.  When X11 terminates,
	      control will return to Sunview.

    2)	If you want to be able to *suspend* X11, then you
	must patch xinit and the server with the patch file that
	I have included in this message.  With the patch, META-L2
	will suspend the server and iconify it on the Sunview
	screen.  Opening the icon will restart the X11 server. 

	On my 12meg Sun-3 it all happens very quickly.  Smaller
	memory systems may have some pauses while everything
	swaps around.

	By the way, for the 386i, the Meta key mentioned below is
	really the left-diamond key (next to the spacebar).

Tarsa Software Consulting
--------------------------------
		33 Seabee Street
		Bedford, NH 03102	[email protected]
		(603)668-9226		{decuac,decvax}!elijah!tarsa

--------------CUT HERE for metakey.suntools-------------------
Below are the changes:

	Dana Chee
	Bellcore
	MRE 2Q-250
	(201) 829-4488
	[email protected]

------------  report.metakey ----------------
VERSION:
	X11 release 3

CLIENT MACHINE:
	Sun 3/75 [and 3/160 -greg]

CLIENT OPERATING SYSTEM:
	SunOS 3.2

DISPLAY:
	Sun [Monochrome]

SYNOPSIS:
	Add Meta-L2 support for running X under Sunview.

DESCRIPTION:
	These diff add the Meta-L2 support present in X10R4 which
        allowed an X server running under Sunview to return to
	Sunview by typing Meta-L2.  When the overview icon was
	clicked, the X server was restarted.

	Affected files:
		clients/xinit/xinit.c
		server/ddx/sun/sunInit.c
		server/ddx/sun/sunKbd.c

FIX:
*** clients/xinit/xinit.c.orig	Thu Feb 25 23:53:54 1988
--- clients/xinit/xinit.c	Thu Apr 21 14:29:11 1988
***************
*** 148,156 ****
  #endif /* SYSV */
  	if ((serverpid = startServer(server)) > 0
  	 && (clientpid = startClient(client)) > 0) {
! 		pid = -1;
! 		while (pid != clientpid && pid != serverpid)
! 			pid = wait(NULL);
  	}
  	signal(SIGQUIT, SIG_IGN);
  	signal(SIGINT, SIG_IGN);
--- 148,173 ----
  #endif /* SYSV */
  	if ((serverpid = startServer(server)) > 0
  	 && (clientpid = startClient(client)) > 0) {
! 		while( 1 )
! 		{
! 			union wait	status;
! 
! 			do
! 			{
! 				pid = wait3(&status, WUNTRACED, NULL);
! 			} while (pid != clientpid && pid != serverpid);
! 
! 			if (pid == serverpid &&
! 			    (WIFSTOPPED(status)))
! 			{
! 				kill (getpid(), SIGSTOP);
! 				kill (serverpid, SIGCONT);
! 			}
! 			else
! 			{
! 				break;
! 			}
! 		}
  	}
  	signal(SIGQUIT, SIG_IGN);
  	signal(SIGINT, SIG_IGN);
***************
*** 222,227 ****
--- 239,245 ----
  			break;
  	}
  	laststring = string;
+ 	fprintf(stderr, "\n");
  	return( pid != pidfound );
  }

*** server/ddx/sun/sunInit.c.orig	Sat Jan 16 12:40:55 1988
--- server/ddx/sun/sunInit.c	Thu Apr 21 14:20:51 1988
***************
*** 63,68 ****
--- 63,69 ----
  extern void SetInputCheck();
  extern char *strncpy();
  extern GCPtr CreateScratchGC();
+ extern WindowRec WindowTable[];

  #define	XDEVICE	"XDEVICE"
  #define	PARENT	"WINDOW_GFX"
***************
*** 704,706 ****
--- 705,773 ----

      return (fd);
  }
+ 
+ /*
+  * stopme - stop window for suntools
+  */
+ #ifdef	SUN_WINDOWS
+ stopme()
+ {
+ 	DevicePtr	pKbd;
+ 	int		i;
+ 
+ 	if( !sunUseSunWindows())
+ 		return;
+ 
+ 	/*
+ 	 * on our way out -- shut down keyboard and mouse
+ 	 * and remove the window
+ 	 */
+ 	pKbd = LookupKeyboardDevice();
+ 	sunKbdProc(pKbd,  DEVICE_OFF);
+ 	sunMouseProc(pKbd, DEVICE_OFF);
+ 	win_remove(windowFd);
+ 	kill(0, SIGSTOP);
+ 
+ 	/*
+ 	 * we're back, restore the window, and turn on the
+ 	 * keyboard and mouse
+ 	 */
+ 	win_insert(windowFd);
+ 	sunMouseProc(pKbd, DEVICE_ON);
+ 	sunKbdProc(pKbd, DEVICE_ON);
+ 
+ 	/*
+ 	 * refresh all screens
+ 	 */
+ 	for( i = 0; i < screenInfo.numScreens; i++ )
+ 	{
+ 		ExposeEveryone(&WindowTable[i], &screenInfo.screen[i]);
+ 		HandleExposures(&WindowTable[i]);
+ 	}
+ }
+ 
+ static
+ ExposeEveryone(pWin, pScreen)
+ WindowPtr     pWin;
+ ScreenPtr     pScreen;
+ {
+ 	WindowPtr	pChild;
+ 
+ 	pChild = pWin;
+ 	while( pChild )
+ 	{
+ 		if( pChild->mapped )
+ 		{
+ 			(* pScreen->RegionCopy)(pChild->exposed, pChild->clipList);
+ 			(* pScreen->RegionCopy)(pChild->borderExposed, pChild->borderClip);
+ 			ExposeEveryone(pChild->firstChild, pScreen);
+ 		}
+ 		pChild = pChild->nextSib;
+ 	}
+ }
+ #endif	SUN_WINDOWS
+ 
+ 
+ 	
+ 
+ 
*** server/ddx/sun/sunKbd.c.orig	Tue Feb  9 17:19:51 1988
--- server/ddx/sun/sunKbd.c	Thu Apr 21 14:23:58 1988
***************
*** 734,744 ****
--- 734,763 ----
      register struct inputevent *se;
  {   
      Firm_event	fe;
+     int		loc;
+     static	Meta_On, Meta_hold;

      fe.time = event_time(se);
      fe.id = event_id(se);
      fe.value = (event_is_up(se) ? VKEY_UP : VKEY_DOWN);

+     loc = (fe.id - 1) * sunKeySyms[sysKbPriv.type].mapWidth;
+ 
+     if( sunKeySyms[sysKbPriv.type].map[loc] == XK_Meta_L ||
+        sunKeySyms[sysKbPriv.type].map[loc] == XK_Meta_R ) /* Meta */
+     {
+ 	    Meta_hold = fe.id;
+ 	    Meta_On = (fe.value == VKEY_DOWN);
+     }
+     if( sunKeySyms[sysKbPriv.type].map[loc] == XK_L2 ) /* L2 */
+     {
+ 	    if( fe.value == VKEY_DOWN && Meta_On )
+ 	    {
+ 		    stopme();
+ 		    fe.id = Meta_hold;
+ 		    fe.value = VKEY_UP;
+ 	    }
+     }
      sunKbdProcessEvent (pKeyboard, &fe);
  }
  #endif SUN_WINDOWS