SUMMARY xdm installation

From: Jody L. Schivley (jschiv@galaxy.cc.nps.navy.mil)
Date: Sat Apr 24 1993 - 05:28:48 CDT


ORIGINAL QUESTION -

>
> Hello,
>
> I am looking for the best way to install xdm under OpenWindows 3, SunOS 4.1.3.
> The documentation is limited in this area.
>
> Thanks, Jody Schivley (jschiv@nps.navy.mil)
>

ANSWERS RECEIVED -
===========================================================================

your might try the oreilly's book on x admin.

you will have no end of delights with xdm and openwin tools like cmdtools
and shelltools . I have also had problems with reseting the xnews server.
I've been given some fixes for this by fax. Do you have a fax number I
can send these to unofficially?

===========================================================================

Don't. There is a bug with OW3's xdm that crashes. I was not able to
get it up. I use X11R5's xdm, and am not experiencing any problems.
There are several steps to using it. It all depnds on what you are
using for an Xterminal. I am using a NCD17, which came with
documentation on how to set it up. I have not used it on any flavor
of Sun, so I don't thing I will be that much help!

===========================================================================

I use the X11R5 xdm, the reason I do this is more because we run real X terms
and I can get patches off the net and have the source code. What I really
wanted to get across was that I used to run w/ the xdm config files in
the default location. I found that this can be a problem with users who
get adventureous and run commands. The xdm command is a display manager
which users sometimes misteak to mean a window manager. I therefore
keep the configuration in /var/xdm and use the xdm -config /var/xdm/xdm-config
to start it.

The X11R5 configuration also has a nice feature (which you can add to
the Openwindows version) which creates a .xsession-errors file in the
users home directory. They can then do a tail -f on the file and see
the errors instead of using the system wide one.

===========================================================================

I couldn't get the Sun one to work: I used the one off the X11R5 part
of the SUG 1992.1 CD. Its instructions are minimal but adequate. Be
aware the HCL Exceed xdm modes don't work w/ PCNFS 4 in HCL versions
3.1.x. They do work in HCL ExceedPlus version 3.2

===========================================================================

I understand completely. I tried this several months ago and finally
was able to run XDM from my /etc/rc.local. Enclosed are the XDM
configuration and startup scripts that I used - I hope they are
helpful. I installed the XDM files into $OPENWINHOME/xdm, so several of
the files use that path instead of the standard /usr/openwin/lib/xdm

Brian

-------- SNIP, SNIP, SNIP -------------------------------------------------
begin 444 xdm.tar.Z
M'YV0+EY,H1-&#ITG5P H7,B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N:LT?@<U7-!+,Z)?.&$)<)(U9<@/42,[G/-_TW1.Y
 
end

===========================================================================

        I run xdm to suport some Xterminals and I have 4.1.3. I start it under rc.local.
# xdm startup
    if [ -f /usr/openwin/bin/xdm -a -f /usr/openwin/lib/xdm/xdm-config ]; then
            /usr/openwin/bin/xdm -config /usr/openwin/lib/xdm/xdm-config
            echo 'Starting xdm.'

===========================================================================

        I don't remember if I sent you the whole thing or not. This is the complete xdm param's that I use to start it and it works fine. From rc.local:
# xdm startup
OPENWINHOME=/usr/openwin;export OPENWINHOME
    if [ -f /usr/openwin/bin/xdm -a -f /usr/openwin/lib/xdm/xdm-config ]; then
            /usr/openwin/bin/xdm -config /usr/openwin/lib/xdm/xdm-config
            echo 'Starting xdm.'
    fi

===========================================================================

        I'm only running xdm for some Xterminals to allow them to get their Xsession, for the console I'm using xinitrc. I've attached my Xsession file. Hope this helps you out. If you need more, write back.

===========================================================================

#!/bin/sh
#
# Xsession
#
# This is the program that is run as the client
# for the display manager. This example is
# quite friendly as it attempts to run a per-user
# .xsession file instead of forcing a particular
# session layout
#
#
# If a user does not have a $HOME/.xsession file, then it starts
# OpenWindows as the default environment.
#
# It works equally well with OpenWindows V2 or V3.
#
##########################################################################
# first, find out some basic info for this session

LOGTIME=`date`
export LOGTIME

NCDNAME=`echo $DISPLAY | cut -d: -f1`
export NCDNAME

UNAME=`uname -a `
HOSTOS=`echo $UNAME | awk '{print $1;}'`

#ok, let's put a record in the xdm log/error file for this session

echo 'Login: '$USER' on node '$NCDNAME' on '$LOGTIME

#############################################

# at this point, error messages are user specific
# so, redirect error messages to a file in $HOME

if [ -f $HOME/.xdm-errors ];then
   mv $HOME/.xdm-errors $HOME/.xdm-errors.bak
fi
exec > $HOME/.xdm-errors 2>&1 # Redirect error messages

############################################

# Openwindows global environment variables

OPENWINHOME=/usr/openwin
PATH=$OPENWINHOME/bin:$OPENWINHOME/bin/xview:$OPENWINHOME/demo:$PATH
LD_LIBRARY_PATH=/usr/lib:$OPENWINHOME/lib
MANPATH=$OPENWINHOME/share/man:$MANPATH
HELPPATH=$OPENWINHOME/lib/help:$HELPPATH
LOGNAME=$USER
OW=$OPENWINHOME

export OPENWINHOME LD_LIBRARY_PATH MANPATH HELPPATH PATH LOGNAME OW

#############################################

# query server for basic X info...

XDPY=`$OPENWINHOME/bin/xdpyinfo`
export XDPY
VENDOR=`printenv | grep 'vendor string:' | cut -f2 -d:`
export VENDOR

# see if this is a PC running X

if [ `echo ${VENDOR} | grep -c Xview` -gt 0 ]; then
   echo "This appears to be PC Xview"
   PC=1
else
   PC=0
fi
export PC

############################################

# Application environment variables

XDM=$OPENWINHOME/lib/xdm;export XDM
NCDUSER=$usr/ncd/ncd3.0/ncdUser;export NCDUSER
CON=/usr/lib/X11/ncd/configs;export CON
USERPREFS=$HOME/.ncd.prefs;export USERPREFS
NCDLOADPREFS=usr/local/bin/ncdloadprefs;export NCDLOADPREFS

#############################################
# find out what the user's login shell is
# this is used to set up a global environment

shell=`/bin/basename $SHELL` # Find the user's shell type
profile="/etc/profile"

if [ "$shell" = "csh" -a -f $HOME/.login ]; then
 profile=/etc/cshrc
elif [ "$shell" = "tcsh" -a -f $HOME/.login ]; then
 profile=/etc/cshrc
elif [ "$shell" = "sh" -a -f $HOME/.profile ]; then
 profile=$HOME/.profile
elif [ "$shell" = "ksh" -a -f $HOME/.profile ]; then
 profile=$HOME/.profile
elif [ "$shell" = "bash" -a -f $HOME/.bash_profile ]; then
 profile=$HOME/.bash_profile
fi
export profile

#############################################
# at this point, one could execute $profile. However, be sure
# that there is nothing in $profile to define DISPLAY. Also,
# ensure that there isn't any type of direct tty commands.

#if [ "$shell" = "sh" -o "$shell" = "ksh" ];then
# . $profile
#fi

#
# if needed, set up a default font path
# only if an Xterminal; PC's should already have a font path defined
#
if [ ${PC:=0} -eq 0 ];then
   if [ `xset -q | egrep -c 'OpenWindows'` -ge 1 ]; then
        echo $DISPLAY': Font path OK'
   else
        echo $DISPLAY': Setting font path'
        # minimum font path on a Sun
        # xset +fp /usr/lib/X11/ncd/OtherFonts/OpenWindows.3.0/
   fi
fi

#############################################
# Use version 3.0 launcher if server is 3.0
# make sure the path is correct :-)
# This is Xterminal specific

if [ `echo ${NCDVERSION} | grep -c NCD` -lt 1 ];then
   NCDVERSION="NCD.2.4.7"
   XNCDVERSION="Xncd.2.4.7"
   export NCDVERSION XNCDVERSION
fi
RELEASE='vendor release number:'

# make sure these paths are correct...

#if [ `echo $XDPY | egrep -c NCD-SETUP` -lt 1 ];then
if [ `printenv | grep "${RELEASE}" | cut -f2 -d: | grep -c 30` -lt 1 ];then
     NCD30=0
     LAUNCHER=/home/SE_Tape/$NCDVERSION/binSun4/ncdlauncher
else
     NCD30=1
     LAUNCHER=/usr/local/bin/X11/ncdlauncher
fi

export LAUNCHER NCD30

#############################################
# this determines if this is an NCD xterminal
# only do this if it is an NCD xterminal

NCDVENDOR="Network Computing Devices"
export NCDVENDOR

if [ `echo $XDPY | grep -c "${NCDVENDOR}"` -ge 1 ]; then

  NCDXTERM=1;export NCDXTERM # set an environment variable so we can easily
                        # tell that this is an NCD

  if [ -f $USERPREFS ]; then
     if [ -f $NCDLOADPREFS ];then
        $NCDLOADPREFS $USERPREFS
     fi
  fi

  # determine type of keyboard attached to NCD Xterminal

  KEY=`xmodmap -pk | egrep \
  'Select|End|118.*KP_F1|Print|Multi_key' | awk '{ print $3 }'`
  KEY=`echo $KEY | awk '{ print $1 }'`

  case "$KEY" in
    "(Select)")
                KEYBD=N108 ;;
    "(Print)")
                KEYBD=NPS2 ;;
    "(End)")
                KEYBD=N101 ;;
    "(KP_F1)")
                KEYBD=N97 ;;
    "(Multi_key)")
                KEYBD=N107 ;;
    "")
                KEYBD=unknown ;;
  esac

  export KEYBD
  echo "Keyboard: ${KEYBD}"

  # now that we know what kind of keyboard is attached, let's remap it
  # for use with SunOS
  # you may wish to change these...

  case "${KEYBD}" in
     "N108")
       echo "Remapping $KEYBD"

      # xmodmap -e "keycode 9 = quoteleft asciitilde"\
      # -e "keycode 14 = Escape asciitilde"\
      # -e "keycode 100 = F20"\
      # -e "keycode 102 = BackSpace"\
      # -e "keysym Select = F16"\
# -e "keysym Insert = F18"\
# -e "keysym Menu = Menu F14"\
# -e "keysym Find = F19"
            # -e "keycode 100 = Delete" \
            # -e "keysym Delete = F20"\
       ;;
     "N97")
       echo "Remapping $KEYBD"
       xmodmap -e "keysym KP_F2 = Help" \
                -e "keysym F5 = F16"\
                -e "keysym F6 = F18"\
                -e "keysym F7 = F20"\
                -e "keysym F8 = Help"\
                       -e "keysym KP_Subtract = Prior" \
               -e "keysym KP_Separator = Next"
       ;;
     "N101")
       echo "Remapping $KEYBD"
       xmodmap -e "keysym F1 = Help" \
                -e "keysym F5 = F16"\
                -e "keysym F6 = F18"\
                -e "keysym F7 = F20"\
                -e "keysym F8 = Help"

       ;;
     "N107")
       echo "Remapping $KEYBD"
       ;;

     "PS2")
       echo "Remapping $KEYBD"
       xmodmap -e "keysym F1 = Help" \
                -e "keysym F5 = F16"\
                -e "keysym F6 = F18"\
                -e "keysym F7 = F20"\
                -e "keysym F8 = Help"\
             -e "keysym Delete = F20 F16"\
             -e "keysym Insert = F18"
       ;;

     "")
       echo "Unknown keyboard: $KEYBD"
       ;;

  esac
else
  # set an environment variable so we can easily
  # tell that this is an NCD
  NCDXTERM=0;export NCDXTERM
fi

#############################################
# set up for failsafe ...
# use F1 instead of Return in passwd field to activate

case $# in
1)
        case $1 in
        failsafe)
           echo 'Using FailSafe...'
           if [ ${NCDXTERM:=0} -eq 1 ]; then
            if [ -f $HOME/.Xdefaults ]; then
              # Load Users X11 resource database
              xrdb -load $HOME/.Xdefaults
            fi
            rsh $NCDNAME wm
            exec xterm -T FailSafe -fg black -bg white -geometry 80x24-0-0 -ls
           else
            exec xterm -T FailSafe -fg black -bg white -geometry 80x24-0-0 -ls
           fi
           ;;
        esac
        ;;
esac

#############################################

# first, let's look for a .xinitrc file

startup=$HOME/.xsession

if [ -f $startup ]; then
        if [ -x $startup ]; then
                exec $startup
        else
                exec /bin/sh $startup
        fi
fi

# ok, so is there a .xsession file...

startup=$HOME/.xinitrc

if [ -f $startup ]; then
        if [ -x $startup ]; then
                exec $startup
        else
                exec /bin/sh $startup
        fi
else
# No personalized startup files, so let's start up an OpenWindows
# environment. We will also try to reposition icons if the display
# size is different from 1152x900

        echo Initialize Default Environment

        if [ -f $HOME/.Xdefaults ]; then
           # Load Users X11 resource database
               xrdb -load $HOME/.Xdefaults
        else
           # Load Default X11 resource database
               xrdb -load $OPENWINHOME/lib/xdm/Xdefaults
        fi

        # find a window manager

        if [ ${NCDXTERM:=0} -eq 1 ];then
           rsh $NCDNAME wm
        else
           if [ -f $OPENWINHOME/bin/olwm ];then
            # Start the OLWM window mgr
            $OPENWINHOME/bin/olwm -3d&
           fi
        fi

        if [ ${NCDXTERM:=0} -eq 1 ];then
           rsh $NCDNAME lat -name allegra -T ALLEGRA
           rsh $NCDNAME lat -name allegra -T ALLEGRA
           rsh $NCDNAME telnet -name help -T HELP
           /usr/local/bin/ncdlauncher
        else
           $OPENWINHOME/bin/cmdtool&
           wait
        fi
fi

========================================================================

Here is the .login file. I will send you the Xsession file
separately. Everything else I left the same. You may want to
use a file called .xsession in the home directory and source
that instead of .login to avoid confusion. I would highly
recommend that. This way, if you have some users not on X type
terminals you don't have to change the .login for them.....

#!/bin/sh
OPENWINHOME=/usr/openwin
PATH=$OPENWINHOME/bin:$PATH
LD_LIBRARY_PATH=$OPENWINHOME/lib
MANPATH=$OPENWINHOME/man:$MANPATH
export LD_LIBRARY_PATH PATH MANPATH

#
# Force server to change userid to $USER
#
$OPENWINHOME/bin/xhost +$USER@ > /dev/null 2>&1

case $# in
1)
        case $1 in
        failsafe)
                exec xterm -geometry 80x24-0-0 -ls
                ;;
        esac
esac

 
startup=$HOME/.xinitrc
resources=$HOME/.Xresources

if [ -f $startup ]; then
        exec /bin/sh $startup
else
        if [ -f $resources ]; then
                xrdb -load $resources
        fi
        olwm &
fi

========================================================================

Here is the Xsession file. You have to run it as
. $HOME/.login because this is a bourne shell script
and the file you are executing is bourne shell as
well.

#!/bin/sh
# @(#)Xsession 1.3 91/10/21
#
# Xsession
#
# This is the program that is run as the client
# for the display manager. This example is
# quite friendly as it attempts to run a per-user
# .xsession file instead of forcing a particular
# session layout
#
#OPENWINHOME=${OPENWINHOME:-/usr/openwin}
#LD_LIBRARY_PATH=$OPENWINHOME/lib
#PATH=$OPENWINHOME/bin:$PATH
#MANPATH=$OPENWINHOME/man:$MANPATH
#export LD_LIBRARY_PATH PATH MANPATH

# try source .login/.profile
#
#case $SHELL in
#"/bin/csh")
# source $HOME/.login
# source $HOME/.cshrc
# ;;
#"/bin/ksh")
# . $HOME/.profile
# ;;
#esac

. $HOME/.login

#
# Force server to change userid to $USER
#
#$OPENWINHOME/bin/xhost +$USER@ > /dev/null 2>&1
 
 
#case $# in
#1)
# case $1 in
# failsafe)
# exec xterm -geometry 80x24-0-0 -ls
# ;;
# esac
#esac
 
#startup=$HOME/.xinitrc
#resources=$HOME/.Xresources
#
#if [ -f $startup ]; then
# exec /bin/sh $startup
#else
# if [ -f $resources ]; then
# xrdb -load $resources
# fi
# olwm &
# exec xterm -geometry 80x24+10+10 -ls
##fi



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:46 CDT