SLAC CPE Software Engineering Group
Stanford Linear Accelerator Center
System Admin

Xterm for root (SUDO)

SLAC Detailed
SLAC Computing
Software Home
Software Detailed
 

 

 

 


 

 

 

 

 

 

Connect the remote host using the -X option with ssh.  --

 

# ssh -X remote-host
   2. Now list the cookie set for the current user.

 

# xauth list $DISPLAY

node01.thegeekdiary.com/unix:10 MIT-MAGIC-COOKIE-1 dacbc5765ec54a1d7115a172147866aa


# echo $DSIPLAY

localhost:10.0

3. Switch to another user account using sudo. Add the cookie from the command output above to the sudo user.

# sudo su - [user]  || sudo bash

 

#Add cookie to new user

xauth add node01.thegeekdiary.com/unix:10 MIT-MAGIC-COOKIE-1 dacbc5765ec54a1d7115a172147866aa

4. Export the display from step 2 again for the sudo user. Try the command xclock to verify if the x client applications
are working as expected.

# export DISPLAY=localhost:10.0
# xclock


 
 

 

 
 



 

Programmers' Guides, Users' Guides, Requirements, Design, Papers, Administration, How-To, Hardware, IOC, Database

 

[SLAC CPE Software Engineering Group][ SLAC Home Page]

 


Created by: Ken Brobeck 6/29/2023

Modified:  17-Jan-2024