Continuous X Display problems on AIX

Steven Bishop Steven.Bishop at telus.com
Thu Dec 5 06:54:46 EST 2002


Hello 

Currently i'm using AIX 4.3.3. I've installed OpenSSH version 2.9p1 which by
the way works with the 
way ive hacked it together to get X Displays working correctly. 

I can ssh into the system as myself export my display back no problem.

I can ssh to a system as myself and ( su - userid )  and export my display
back but i had 
to hack this together in order to get it to work.

I had to copy "echo $display" setting and alias it to the su command when
su'ing to 
another user in order for this to work.

Since the verion of openssh 3.4 and above came i cant seem to ( so far )
hack this 
together to get this working. 

Not sure if the preveldge separation had anything to do with this or not.

I have noticed that on Redhat this isnt an issue, displays are able to be
settup 
correctly no matter how many times you su to different userid's the display
can 
be issued back to your desktop.


Have you noticed this on AIX ? 

Do you know of a way to correct this on AIX ? 

Is there anything more i can do ? 

I've even got IBM working on this since they now 
are providing support for OpenSSH but they are having 
problems figuring this out as well ! 



What ive done to make this work on AIX 

This is only working with version openssh 2.9p1
and below.


1) all users .profile ive added in these 2 lines.


##############################
# This will setup our displays
##############################
. /usr/local/bin/setdisp.ksh
. /usr/local/bin/generic_alias



2) Contents of setdisp.ksh


#############################################################
#
#   script:  setdisp.ksh
#
#  purpose:  to set the display variable on login
#
#############################################################
#
#  Check if su, see if /tmp/ldisp for same date,time
#
DFILE=/tmp/ldisp

if [ ${DISPLAY:-0} = "0" ] ; then
    cdate=`date +"%h%d%H:%M"`
    fdate=`ls -l $DFILE|awk '{print $6$7$8}'`
    if [ $cdate = $fdate ] ; then
      xauth add `cat $DFILE`
      export DISPLAY=`cat $DFILE | awk '{print $1}'`
      echo "" > $DFILE
    fi
fi



3) Contents of  generic_alias

alias su="xauth list | sed -n '1,1 p' > /tmp/ldisp;chmod 666 /tmp/ldisp
2>/dev/null; /usr/bin/su"





Once you log in as your userid, you can now ( su - user ) and still be able
to bring back X Displays just 
fine. 

But i dont think this is normal ! 






Thanks for your time 

Steven

Steven Bishop
Telus Enterprise Solutions
Systems Analyst
(604) 432-2986
Steven.Bishop at telus.com




More information about the openssh-unix-dev mailing list