<html>
  <head>
    <style type="text/css">
      <!--
        body { margin-left: 4px; margin-right: 4px; margin-bottom: 1px; font-variant: normal; line-height: normal; margin-top: 4px }
      -->
    </style>
    
  </head>
  <body>
    <DIV>
      The following is a cool solution and not a question.
    </DIV>
    <DIV> </DIV>
    <DIV>
        At PPS we have many Linux labs spread across different buildings in the district. Therefore it behooves us to remotely administer and troubleshoot the LTSP servers. We use "ssh -X" to connect to the servers and run applications as the users. Our teachers have unique/ unknown passwords as do some of our students. We had a need to be able to ssh to a server, su into another user, and run applications as that user while displaying the video on our local workstation. This is how we were able to make it work.
    </DIV>
    <DIV>
        Credit where credit is due, I found this via google at http://wiki.bic.mni.mcgill.ca/index.php/X11AuthError .
    </DIV>
    <DIV> </DIV>
    <DIV>
      Information gathering phase:
    </DIV>
    <DIV> </DIV>
    <DIV>
      * First log into the remote server.
    </DIV>
    <DIV>
      [kmatson@mydesk]$ ssh -X root@someserver.somedomain
    </DIV>
    <DIV>
      [root@ltspserver]#
    </DIV>
    <DIV> </DIV>
    <DIV> </DIV>
    <DIV>
      * Determine what the hostname is.
    </DIV>
    <DIV>
      [root@ltspserver]# hostname
    </DIV>
    <DIV>
      hatteras
    </DIV>
    <DIV> </DIV>
    <DIV>
      * Determine what the DISPLAY environment variable is.
    </DIV>
    <DIV>
      [root@ltspserver]# echo $DISPLAY
    </DIV>
    <DIV>
      localhost:10.0
    </DIV>
    <DIV> </DIV>
    <DIV>
      *  Determine what xauthkey to use
    </DIV>
    <DIV>
      [root@ltspserver]# xauth list | grep hatteras/unix:10
    </DIV>
    <DIV>
      hatteras/unix:10  MIT-MAGIC-COOKIE-1  reallylonghexadecimalnumber
    </DIV>
    <DIV> </DIV>
    <DIV> </DIV>
    <DIV>
      Target user environment adjusting phase:
    </DIV>
    <DIV> </DIV>
    <DIV>
      * Su to target user.
    </DIV>
    <DIV>
      [root@ltspserver]# su - someuser
    </DIV>
    <DIV>
      [someuser@ltspserver]$
    </DIV>
    <DIV> </DIV>
    <DIV>
      * Add the xauthkey to their environment. If you have mouse support I strongly recommend you copy and paste the xauthkey into the following command.
    </DIV>
    <DIV>
      [someuser@ltspserver]$ xauth add hatteras/unix:10  MIT-MAGIC-COOKIE-1  reallylonghexadecimalnumber
    </DIV>
    <DIV>
      [someuser@ltspserver]$   <--- no visible result
    </DIV>
    <DIV> </DIV>
    <DIV>
      * You should now be able to run any X application as the target user and have it display on your local workstation.
    </DIV>
    <DIV> </DIV>
    <DIV> </DIV>
    <DIV>
      Cheers,
    </DIV>
    <DIV>
        Kevin M.
    </DIV>
  <br><br>-------------------------<br><br>Kevin Matson<br>IT - Lab Team<br>kmatson@pps.k12.or.us<br>503-916-2000 x4960<br>503-916-3375<br><br>Portland Public Schools<br><br></body>
</html>