Friday, December 13, 2013

Unable to export display using xmanager

www.unixbabuforum.inI am trying to use xmanager3.0 from my windows xp pc to a solaris server. I am unable to get the display 
I am able to display the clock 'xclock' using my id which is using CSH but when i su- to root am unable to display the clock. The root account is using the bash shell. I set the DISPLAY variable in this manner 
DISPLAY=<MY IP ADDRESS>:0.0;export DISPLAY 
The protocol that we use is SSH. 
in the csh, my DISPLAY variable is set as follows 
DISPLAY=localhost:14.0 ('14' would change depending on the number of session being opened) 

www.unixbabuforum.in if you are using SSH tunneling for X then after you su you need to: 

1) set the DISPLAY variable to the same value it was before the su. 
2) set the XAUTHORITY value to point to the original users home directory 
and the .Xauthority file. e.g. 
XAUTHORITY=/export/home/someuser/.Xauthority 

The authority file contains the security "cookie" which allows you to 
communicate with the X server. 


www.unixbabuforum.inWhen you login as yourself, the DISPLAY is set to localhost:10.0 (if 
another user was already logged in, it might be 11.0, etc). When you are 
logged in as yourself, in your home directory there should be .Xauthority 
file created that allows your account to communicate with the X display. 
After you su to root, you have to set the root environment up to use that 
same DISPLAY and same .Xauthority file. e.g. if your login account is 
"jaguar", and your home directory is /export/home/jaguar, and your DISPLAY 
is set to localhost:10.0 when you login, then after you su to root (assuming 
bash shell), run the following: 

$ export DISPLAY=localhost:10.0 
$ export XAUTHORITY=/export/home/jaguar/.Xauthority 

Then try running xclock. It should work. 



0 comments:

Post a Comment

 
Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM