RHL 4.5: how to configure RHL servers so remote users can display xclock, browsers, etc..

epifanio67
epifanio67 used Ask the Experts™
on
Hello Experts,

How to configure RHL servers so remote users can display xclock and browsers?

Must of our users use putty via a Window XP machine to connect to our server farm.
All servers are RHL 4.5
Some users have root access; some don't

Thank you

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Hi, you have to enable X11 forwarding and the clients must have an X11 windows server such as XMing.

http://www.straightrunning.com/XmingNotes/

I will post a link to a tutorial how to do this momentarily.
Commented:
Ensure that X11 forwarding is enabled in /etc/ssh/sshd_config (I am unsure of the RH configuration - it could be in /etc/sshd_config).

# X11 tunneling options
X11Forwarding yes

Then follow this:

http://aruljohn.com/info/x11forwarding/

Author

Commented:
thank you experts,

checked /etc/ssh/sshd_config on remote server, X11Forwarding is set to yes

I downloaded Xming server, launched it.

launched putty, and under X11, I made sure X11Forwarding was checked and Display was set to 0:0

connected to the remote server and ran xterm and xclock...

see results below..

Last login: Tue Oct 19 11:17:23 2010 from 192.168.0.100
/usr/bin/xauth:  creating new authority file /home/licMgr/.Xauthority
[licMgr@myremoteserver ~]$ xterm
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: XDM-AUTHORIZATION-1 time stamp was too far out
xterm Xt error: Can't open display: localhost:10.0
[licMgr@myremoteserver ~]$ xclock
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: XDM-AUTHORIZATION-1 time stamp was too far out
Error: Can't open display: localhost:10.0

Open in new window

Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

Here is a simple way.

ssh -Y User@Server

Now you can use command line to say "firefox" or xclock etc.

For PuTTY you need to set ssh tunnel

Author

Commented:
Thank you....

Not sure I understand...

so, login to server using any SSH client

run the following:

ssh -Y user@server

?

how do I set up ssh tunnel?

thank you so much for all of your help....

Commented:
I notice 2 things... Did you say the display is set to 0:0? How come it is trying to connect to 10.0? Also, how far is the clocks on your 2 systems from each other? The XDM-AUTHORIZATION-1 time stamp was too far out seems like a clock synchronization issue, but I never saw that error before.

Author

Commented:
thank you...

good question...

I make sure when I start a new putty session display is set to 0:0...
yet when I run
xterm
or
xclock
I get that error... no sure why....

the XDM-AUTHORIZATION-1 time stamp.... not sure what this is either....

well, the clocks should be different... these servers are EST time and we are MT time...

thx,

Commented:
is the timezone set correctly on the server and clients?

Author

Commented:
thank you....

remote linux server:
[licMgr@myremoteserver ~]$ date
Tue Oct 19 17:49:14 MST 2010

local windows server 2003 machine using putty
US Mountain Standard Time Wed Oct 20 5:13 AM

may I ask why do they need to be the same to display xclock or xterm from a remote server?

thank you for all of your help...

Regards,

When you do ssh -Y from command line you don't have to setup the tunnel and you don't even have to setup DISPLAY variable which gets setup by itself.

Author

Commented:
thank you...

sorry for being so slow....

so, I login to the server using putty. Having X11Forwarding checked and Display set to 0:0

login as: licMgr
licMgr@192.168.0.104's password:
Last login: Tue Oct 19 17:57:19 2010 from 192.168.0.100

then, run the following command:

ssh -Y licMgr@192.168.0.104

[licMgr@myremoteserver /]$ ssh -Y licMgr@192.168.0.104
The authenticity of host '192.168.0.104 (192.168.0.104)' can't be established.
RSA key fingerprint is 31:ee:ca:18:13:4e:89:9e:64:07:e7:0c:8d:df:9d:35.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '192.168.0.104' (RSA) to the list of known hosts.
licMgr@192.168.0.104's password:
Last login: Tue Oct 19 17:59:25 2010 from 192.168.0.100
[licMgr@myremoteserver ~]$ xclock
X connection to localhost:11.0 broken (explicit kill or server shutdown).
[licMgr@myremoteserver ~]$ xterm
X connection to localhost:11.0 broken (explicit kill or server shutdown).

sorry again for being so slow to understand.

Can you tell me exactly how you want me to do this?

thx,
Regards

The command you ran is correct.  I tried it again and it worked for me.

Try
firefox &

If you see the same error message you may have one of the following problems.
1.  X-client not running.
2.  X-server not allowing connections

First, after you loging the same way, you should try:
echo $DISPLAY

for me it returned the value
localhost:10.0

For you I am not expecting it to be incorrect.  You should see some value here.

For x-server to accept X-connections  (the target machine to which you are trying to connect) you can issue the following command
xhost +

DETAILS: http://www.faqs.org/docs/Linux-mini/Remote-X-Apps.html#s5

Try connecting again if it solves your problem and if it doesn't you have the first problem

So now this could be your problem
http://www.experts-exchange.com/OS/Unix/Solaris/Q_22119526.html

Are you connecting from Windows of Unix/Linux?

Lets see what you get

Author

Commented:
thank you Experts.....

it worked...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial