Tuesday, January 3, 2023

Why and How to setup the xdisplay parameter after switch user in Linux ?

Why ?

Display on ssh session that is support X11-forwarding  (remote display forwarded through SSH) will appeared for the first login user only , if -X -Y used the display will be transferred as well however if just switch user only using ‘su’ this will lead to lose the display from server to client , use the below steps to move the display from first to the second switched user

How ?

1- After login with first user before switching take the details of display .

$ xuath list $DISPLAY

<output1>

$ echo $DISPLAY

<output2>

2- Switch to the user:

$ xauth add <output1>

$ export DISPLAY=<output2>

No comments:

Post a Comment

Why and How to install Grid 19c on RHEL 8?

  Why ? Simply we will be requested to install Oracle Grid RAC DB on Redhat RHEL 8, below is my note for this installation . How ? 1-  OS in...