SUMMARY: openwindows on an X Terminal

From: larry (larry@ca.cch.com)
Date: Wed Dec 11 1996 - 07:15:35 CST


First apologies for the extreme tardiness of this summary - up to my
you-know-what in alligators.

This is a rather long summary so here is the "executive" view:

1) Preamble
2) Replies that were particularly relevant to the problem ( 2 of them )
3) Credits
4) The Original posting

                        Preamble
                        ========

What I wanted to accomplish was to allow users to log on to an
Xterminal and get thier OpenWindows environment as they were accustomed
to it. This was complicated by the fact that the machine that they were
going to be accessing is a secure machine complete with strong
authentication logon facilities.

Essentially the solution was to start a single console window on the
Xterminal, authenticate to the server and then run a script that would
bring up the users openwindows environment - essentially just taking
the .openwin-init file and making the relevant parts a script.

There were a couple of replies that contained some very good
information so I am including them.

                        Relevant Replies:
                        =================

FROM: Roberts, Mike <cmrobert@tva.gov
=====================================
First of all, forget everything you knew about starting openwindows from
your Sun workstation when you work with X terminals. It can actually be
easier. IF your HDS X terminal supports xdmcp protocol (if it is less
than 4 years old, it should) and IF your Sparc 20 is running OpenWindows
3.0 (which it should be) and not version 2.0 (which doesn't support
xdmcp), welcome to the world of xdm and real X.

To set up your server, do the following as root or superuser:

cd /usr/openwin/lib/xdm
edit the Xervers file, commenting out the line containing local. That
way xdm won't try to take control of your Sparc 20's console if it is
using a Sun monitor (GUI) instead of an ascii terminal (not GUI).

cd /etc
put the following lines in your rc.local file (at the end works fine):

#
# xdm is used to handle X terminal and dedicated X workstation sessions
#
if [ -f /usr/openwin/lib/xdm/xdm-config -a -f /etc/rc.xdm ] ; then
        /bin/sh /etc/rc.xdm; (echo 'Using xdm')
>/dev/console
fi

create a new file (still under /etc) called rc.xdm and insert the
following lines in it:

#!/bin/sh
OPENWINHOME=/usr/openwin
LD_LIBRARY_PATH=/usr/openwin/lib:/usr/lib
export OPENWINHOME
export LD_LIBRARY_PATH
/usr/openwin/bin/xdm -config /usr/openwin/lib/xdm/xdm-config

Using the xdm.rc file allows you to make sure any necessary variables
are set. To start xdm without rebooting, just execute the following:

/bin/sh /etc/rc.xdm

You will want to do the following copy for each user that will using the
X terminal if they don't already have a .xinitrc file in their home
directory:

cp /usr/openwin/lib/Xinitrc $HOME/.xinitrc

The .xinitrc file is what will start olwm for you as well as
.openwin-init which is built by the Save Workspace menu option. You may
also want to set up any environmental variables that you have in your
.cshrc, .login, or .profile in your .xinitrc. That way, any commands
you set in your .openwin-menu file will have the variables they need
available.

I'm not familiar with the setup parameters of an HDS X terminal but the
following instructions work will with Tektronix, Visual Technology, NCD,
and PC X servers like Hummingbird eXceed so I feel fairly confident that
they will be close if not exact for the HDS.

There should be some kind of setup for your xdmcp options either on your
X terminal or in the remote configuration file which it loads. If your
X terminal will be accessing the same server every time, you want to use
xdmcp-direct (sometimes called xdmcp-query) as your xdmcp access method
and specify the name or IP address of the server as your xdm connect
host. If you have more than one server on your subnet that you may want
to log into at different times and your X terminal has a chooser
function, you may want to specify xdmcp-broadcast. This will broadcast
a request for xdm service to all machines on your subnet and build a
list for you to select from of all that answer that they are running xdm
(like we set up above) and are willing to allow you to connect.

When you start your Xterminal (if you use xdmcp-direct) or after
selecting a server (if you are using xdmcp-broadcast), you should get a
logon screen saying something like "Welcome to OpenWindows" and
prompting you for your user ID and password to logon to the Sparc
server. Caution, after entering your user ID, move to the next line
using either your mouse or the Enter (Return) key. Do not use the Tab
key. It will be treated as another character of your ID which you don't
see and your login will fail. You do not need to worry about setting
the DISPLAY, xdm has already figured that out or he wouldn't be able to
send the login prompt.

FROM: Rich Kulawiec <rsk@itw.com>
=================================
Let's dissect what happens when you fire up "openwin" sitting
at the console of your Sun. "openwin" is actually a shell
script that starts (1) the X/NeWS server running (2) the Open Look
window manager, olwm (3) vkbd, the virtual keyboard manager
and (4) a couple of other odd and ends, like sv_xv_sel_svc.

The job of the X/NeWS server is to field requests from applications
that want to draw things on your display and accept input from your
mouse and keyboard. It differs from the X server that is running
in your HDS X terminal in that it will not only accept X requests,
it will also accept NeWS requests. (NeWS being the non-X-Windows
windowing system that Sun developed. If you've ever run SunView,
you've seen it. Some current applications, like pageview, use X
and NeWS to talk to the server, which is why they don't work with
X-only servers. But I digress.)

Anyway, the job of the Open Look window manager, olwm, is to manage
the interactions between windows and keep track of their state -- it's
also what you're talking to when you put the X pointer on the screen
background and pop up the top-level OpenWindows menu. It's not really
any different from twm or olvwm or any of the other window managers --
all of them have roughly the same job.

                        Thanks to:
                        ==========
Anton Bernal <abernal@esoc.esa.de>
Terry Gorby <tgorby@emc.com>
Kevin Davidson <tkld@cogsci.ed.ac.uk>
cj@mssl.ucl.ac.uk (Colin Johnson)
D. Ellen March <demarch@ptes.com>
Alex Finkel <afinkel@pfn.com>
catey@wren.geg.mot.com (Don Catey)
john benjamins <johnb@Soliton.COM>
ssa@pvdsw.amat.com (Ken Ferguson)
Rich Kulawiec <rsk@itw.com>
Dan Pritts <danno@fv.com>
Roberts, Mike <cmrobert@tva.gov>

                        Original Query:
                        ===============

Question:
=========
Has anyone gotten Openwindows to run on an X terminal and if so what
did you have to do to get it to go ?
 
 
Situation:
==========
- Sparc 20 with software for and HDS X terminal loaded on it.
- Sparc 20 running SunOS 4.1.3_U1
- X terminal configured and working ( name of X terminal is surfer )

I can get the X terminal running, log into the Sun and start things
like command tools ( cmdtool ) mailtool etc., the usual openwindows
things, ie: I have set the display to be the X terminal with:
 
         setenv DISPLAY surfer:0
 
To this point everything works.
 
 
Problem:
========
>From the same window ( on the X terminal ) that I succesfully got
various openwindow tools started I then try to start openwindows by
typing one of the following:
 
         /usr/openwin/bin/openwin
         /usr/openwin/bin/openwin -display surfer:0.0
 
Neither of these works and in fact results in an error of the form:
 
         xnews: Error: unknown argument 'xterminal:0.0'
         
 I have even tried using:
 
         setenv DISPLAY <IP ADDRESS OF surfer>:0
 
Still no joy.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:18 CDT