Operating System - Linux
1822034 Members
3384 Online
109639 Solutions
New Discussion юеВ

Re: howto connect from linux server to other linux machine using X windows ?

 
SOLVED
Go to solution
'chris'
Super Advisor

howto connect from linux server to other linux machine using X windows ?

hi

howto connect from a linux server to the other linux machine using X windows ?

I use in both cases SuSE 8.2

kind regards
chris
9 REPLIES 9
Stuart Browne
Honored Contributor
Solution

Re: howto connect from linux server to other linux machine using X windows ?

Ok, a bit of clarification would be nice.

You're running an X Server (the gui bit with the mouse) on one machine (MachineA for example), and you want to run an application on another machine (MachineB) with the gui stuff on MachineA ?

If so, then you need to do something similar to the following:

xhost +MachineB
telnet MachineB
(log in)
export DISPLAY=MachineA:0
(run application)

If you're using SSH between machines, it's even easier:

ssh MachineB
(log in)
(run application)

SSH automatically does most of the fiddly bits for you (setting DISPLAY etc.). It also has the added advantage of encrypting the display information.

If this isn't what you meant, then please give a bit more details.

Thanks.
One long-haired git at your service...
Philippe MALINGE
New Member

Re: howto connect from linux server to other linux machine using X windows ?

Hello,

if you want to get the full X window environnement including desktop, you can open your X session on the other machine.

- On the X connection server allow XDMCP

- On the client, launch X like this :
/usr/bin/X11/X -query your_X_connection_server

You can put this line in your /etc/inittab at run level 5

Hope this help.
Fido
Michael Schulte zur Sur
Honored Contributor

Re: howto connect from linux server to other linux machine using X windows ?

Hi,

shouldn't it be

on MaschineB
xhost +MachineA

on MaschineA
telnet MachineB
(log in)
export DISPLAY=MachineA:0
(run application)

?

greetings,

Michael
Steven E. Protter
Exalted Contributor

Re: howto connect from linux server to other linux machine using X windows ?

hopefully none of the machines in the above examples are exposed to the public Internet.

Long term use of xhost+ is a significant security hazard unless you are behind a firewall.

I've been successul using Linux to X window HP-UX boxes by openning up port 7000 on the iptables firewall internal network only.

I'm not sure what the proper port number is foir Linux but the rest of the instructions I agree with. xhost+ is to big a security hazard for me. I've been burned and a user getting control of your box that way can gain root priviledged if root is the X user.

I don't mean this as a critcism. I'm just concerned about xhost+

SEP

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Michael Schulte zur Sur
Honored Contributor

Re: howto connect from linux server to other linux machine using X windows ?

Hi SEP,

are you afraid of any form of xhosts + even when used with specific hosts?

just curious,

Michael
Stuart Browne
Honored Contributor

Re: howto connect from linux server to other linux machine using X windows ?

Michael, no. the 'xhost' command needs to be run on the system running the X Server.

It says "Allow remote machine to display X-Clients on my X-Server".

Using SSH is the preferable way to do all of this in any case, as not only is the information encrypted, it also runs all of the X-Auth securely.

From memory, the 'xhost +' is only a check based on hostname + ident, so spoofing is always possible.

Now, as for the ports, by default X under Linux is on the 6000 + display (so for :0, it's 6000, for :1, it's 6001 etc. etc.). SSH usually binds it's self to :10 onwards.

If combining xhost and firewalling, you should be reasonably safe.
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: howto connect from linux server to other linux machine using X windows ?

xhost+ causes me concern. It causes me no concern inside a firewall where all users are trusted.

We are prohibited from using it at our shop except for short diagnostic purposes even though there has never been a breach of our firewall. To be perfectly honest I have no idea what the vulnerability is or how to exploit it.

It the command is run with an X session logged in as root, root priveledges are supposedly easy to get.

Sources: Jewish Federation Security Audit, July 2000. HP-UX Practical Network Security July 2001.

The manual for the HP class is at work, if I have time I'll add quotes on Monday.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Peeyush
Regular Advisor

Re: howto connect from linux server to other linux machine using X windows ?

i know its not related to Xwindows....but u can use VNC to connect GUI of ur linux from any OS(windows and linux flavours)
any suggestion for my site.. http://geocities.com/peeyush_maurya/
Michael Schulte zur Sur
Honored Contributor

Re: howto connect from linux server to other linux machine using X windows ?

Hi,

I must admit, I was wrong.
Stuart is right. I thought, it would work like Tru64 but apparently it does not. :-(

thanks,

Michael

-9 points please :-)