Running GUI over ssh with X forwarding and su

If you need to run jnbSA as root from an su session, it won't work without some prior steps. This is due to the MIT magic cookie not being forwarded from your user session to the root su session.

This can be fixed by “forwarding” manually.

  1. as your ldap user, run echo $DISPLAY and observe the X session id.
  2. run xauth list to see the cookie's in use.
  3. run sudo su -l and check the $DISPLAY variable is the same.
  4. run xauth add <cookie>' where <cookie> is the cookie above corresponding to your xsession, so if your session is localhost:10.0, you would use <cookie>:10 - Test with xterm or xclock before trying something more ambitious. - If this works, cd to /usr/openv/netbackup/bin and run ./jnbSA &. You will see the session logfile being created, you can view this with a tail -f''.
  5. Log in to the GUI as required user, not your LDAP account.

rb/xforwarding.txt · Last modified: 18/07/2019 15:59 by andrew