[comp.windows.x] X11/NeWS questions

andrew@isgtec.UUCP (Andrew) (10/26/89)

Hello Andrew Hunt,
    I have had trouble trying to respond to you by mail, so I'm posting 
the answers to the net. (PS If you need to contact me, use the net as well
since our mail seems to be completely broken!!!)


Question 1 from before:
~~~~~~~~~~~~~~~~~~~~~~~

>> 
>> Is this true? Is there no way to use X windows to display a memory pixrect
>> into?
>> 

>Could you please foward me any info you get on this one.  I will be 
>attempting something similar in a couple of months.

I just received the FCS version of software about a week ago, and poof,
90 percent of my problems vanished. That includes the problem of using
pixrects. I can now have an X window, and with some fidgetting, figure
out where to place the pixrect in that window. The speed is 10 times
faster doing it this way, than by using XPutImage. The problem of course
is that you cannot run this program over the network, but that is the 
choice we made.


Question 2 from before:
~~~~~~~~~~~~~~~~~~~~~~~

>> 
>> The OpenWindows documentation says to type the following commands while
>> running the server:
>> 	psh
>> 	stopwm
>> At this point, I am supposed to be able to run another window manager.
>> WRONG!!! Only new clients are looked after by the new window manager.
>> Any clients that were started up with the server are inactive.
>> 
>
>I have the same problem and have not figured out what to do yet.
>
>If you get any info on this one could you please foward it to me.
>

Here are the resposes that I received:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.
It appears as if you are running a pre-release version of OpenWindows.  Most of
your problems do not occur in the FCS software and the documentation goes into
greater detail on how to switch window managers.  I would recommend switching to
FCS OpenWindows as soon as possible.

2.
Your first step should be to get an up-to-date version of the software,
i.e. 1.0, not 1.0 beta2 or anything like that.  Talk to your local Sun
contact to find out how to get a copy.  The 1.0 documentation has changed,
so make sure to get a copy of it along with the software.

Basically, the answer is to run "ps ax | grep pswm" to find the process id
of the window manager, and then send it a TERM signal.

3.
You might try setting the NOPSWM environment variable before starting
X/NeWS. You also ought to be using pre-FCS or FCS versions of the server.
I'm not sure if NOPSWM was supported under beta-2.

4.
I am running pre-FCS xnews, and someone long ago gave me some pointers for
effectively turning off the postscript in xnews.  This also has the effect
NEVER STARTING pswm (yay! -- doesn't even start the postscript interpreter if
i remember correctly).  I'm assuming this works in (post-FCS) 1.0 xnews, but
I have no evidence since we are still using pre-FCS.  

To run xnews, go to your home directory and say something like:
	xinit xterm -- xnews

In your home directory, create the following file (.startup.ps) with the
following contents:

	/RunX11? true def
	/XOnly? true def
	
		UserProfile begin
		    /ViewStop		/FunctionL9		def
		    /ViewAgain		/FunctionL9		def
		    /ViewProps		/FunctionL9		def
		    /ViewUndo		/FunctionL9		def
		    /ViewFront		/FunctionL9		def
		    /ViewPut		/FunctionL9		def
		    /ViewOpen		/FunctionL9		def
		    /ViewGet		/FunctionL9		def
		    /ViewFind		/FunctionL9		def
		    /ViewDelete 	/FunctionL9		def
	
		    /FocusStyle 	/CursorFocus		def
		end	%  UserProfile

You may also have to create empty files called .openwin-init and/or .user.ps,
but i have no real evidence that these files do anything, some NeWS guru just
told me to put them there.  Mine is not to reason why...

Anyway, all this has the effect of turning xnews into your standard X server,
which makes me willing to use a very non-standard X server.  Oh yeah, and if
you're sick of the static visual being the default visual, do

	'setenv USE_MIT_VISUALS t'

before running the xnews server, and the psuedocolor visual will become the
default visual.  This makes (for example) rubber-banding window managers, and
hardheaded image-display programs happy.


Question 3 that you just asked:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


>3.	We have been running a beta2.0 copys of Open Windows on both a
>Sun4/110 and Sun386i for a couple of months. We are due to receive the FCS
>version for the Sun4/110 any day now, but will have to persist for a while
>with beta2.0 on the Sun386i.  Is there any way in the beta2.0 version of
>killing the window manager or starting up the server with no window
>manager running?  The programs "stopwm" and "startwm" mentioned on p26 of
>the X11/NeWS Server Guide, seem to be absent from the distribution.
>Setting the environment variable NOPSWM, as described in some net postings
>recently does not seem to have any affect on starting up the server.
>


These questions have basically been answered above, but here is some 
additions. Setting the environment variable does NOT have any effect in the
Beta versions. It does work with FCS version 1.0 and later.

The programs stopwm and startwm exist in the file $OPENWINHOME/etc/NeWS/wm.ps

You do not want to touch these programs. I managed to kill the PS window
manager by editing the init.ps file. Unfortunatley, I don't have the Beta
version any more, so I can't send it to you. What you need to do is to 
locate the routine that I believe is called Main. (Do a search for wm and it
will be located in two places, main and somewhere else.) Then just use %
to comment out the lines that reference the window manager. It isn't perfect,
but it works to a small degree. (OR you can try the method listed above.)


Anyways, good luck. Any problems, just post another message.


-- 
Andrew MacLean                     ...uunet!mnetor!lsuc!isgtec!andrew
Success is a journey, not an adventure!   ...utzoo!lsuc!isgtec!andrew
ISG Technologies Inc. 3030 Orlando Dr. Mississauga. Ont. Can. L4V 1S8