Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display X apps on remote X server 1

Status
Not open for further replies.

nix45

MIS
Nov 21, 2002
478
US
I'm having a problem displaying X apps on a remote host. I've done this plenty of times before but for some reason I can't get it today, I must be forgetting something. On the remote host, I ran "xhost +" to allow everyone access to the X server over the network. On the host I want to run the X apps from, I ran "export DISPLAY=remotehostname:0.0". When I try to start an X client, I get an error about not being able to open the display. Neither server has iptables running.

root@remotehost:~> xhost +
access control disabled, clients can connect from any host

root@tux root# export DISPLAY=192.168.1.61:0.0
root@tux root# xeyes
Error: Can't open display: 192.168.1.61:0.0


Thanks,
Chris
 

Hi,
new distributions have a -tcpnolisten (or similar) flag set where the X server is started up (in the Xservers file). You need to remove this flag if it is set.

Cheers
 
Ok, it was set and I removed it but still no good and also X doesn't start with the computer anymore. Its still in runlevel 5, but I have to start it manually with 'startx' after logging in. No big deal, I can fix that with some investigation later on though. I edited the /etc/X11/xdm/Xservers and / etc/opt/kde3/share/config/kdm/Xservers files on a SuSE 9.1 box.

I used to do this all the time on SuSE 9.0, RHL9, and Fedora Core 1. I also tried on a FC1 box last week but it didn't work. I'll find one and try removing the -nolisten option on it later on.

Chris
 
I had the same problem in Fedora Core 1
Try System Settings; Login Screen;Security;
and untick : Always disallow TCP connections to X server.

And restart X.

This appears to cure it !
 
I tried your solution and it worked, thanks.
I gave you a star for figuring it out, but I'm actually not going to use it though. I found that forwarding X apps over ssh is much easier and is much more secure.

I'm curious as to what unchecking that box actually does though? What files does it modify?

Chris
 
fyi, you can forward apps over ssh simply by typing "ssh -x root@host". Thats all you have to do, doesn't get any easier than that!

another fyi, if your on a WinBlows workstation and want to do this, in PuTTY, you can select SSH - Tunnels - Enable X11 forwarding before you ssh to the server. Then download/install cygwin and open a bash shell on your WinBlows machine. Type in 'X' to start an X server. Now when you open X apps from Linux, it will be forwarded to the X server on your Windows machine.

Chris
 
Hi, there,

I have the similar problem that "cannot connect to X server". And I have tried all the solutions suggected here, I could not find "Always disallow TCP connections to X server" under the System Settings; Login Screen;Security. How can I find it or what else I can try?

Thank you in advance!

Arren
 
Forget that, just tunnel it over ssh, its much easier and more secure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top