I did a
> netstat -an | grep 6000
and nothing showed up, so it sounds like you're right. How do I setup to listen on port 6000?
Main Topics
Browse All TopicsWe just rebuilt 3 Fedora systems (kernel 2.4.22-1), and all are having the following problem (problems that we didn't have before they were just rebuilt). None of them can throw x windows to other displays of these 3 systems (I'll call them Sys0, Sys1, and Sys2). They all can throw windows to other linux (Fedora) systems on our network (DualDell for example). In fact, Sys0 has the following interesting behavior. It has 2 monitors attached, :0.0 and :0.1 by default. xclock can be thrown to each of these from the other. However, if I say #export DISPLAY=localhost:0.0 on either, I cannot throw up xclock as it gives "refused by server" error. I can ping localhost successfully (it is in /etc/hosts). The same problems occur for setting the display to Sys0:0.0.
I have looked for differences between dualdell and Sys0 in /etc/X11/gdm , /etc/X11/xdm, /etc/pam.d and have not found any differences. I've done this lots of times (and have had to do the ol' xhost + trick), but have never been stumped. It looks like some kind of X11 permissions / security issue, but I'm at a loss for where to look now.
Thanks for any help.
Dean
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I can't throw an X window to another machine--that's the problem. I don't care how I solve it as long as it can be solved (that was the point of the 7/29/2005 posting)--sorry if that wasn't clear. What I don't care about is the security issue as the machines are in a closed environment. But we still have the problem that we can't display an X window (like xclock) from Sys1 onto the Sys0 display.
The latest thing someone tried, but I have fully verified it working or not, is to run on machine called "Sys0":
iptables -I INPUT -p tcp --dport 6000 -j ACCEPT
or try to put this kind of statements into /etc/sysconfig/iptables_co
Hope that clarifies the situation...
(Pretty much what Andrew is saying, but perhaps a bit more verbose:-):
I'm "guessing" that the X server on Sys0 gets started with the "-nolisten <port(s)>" or "-nolisten tcp" flag, perhaps in /etc/X11/xdm/Xservers (xdm and kdm) or /etc/X11/gdm/gdm.conf (in the [servers] section (which might point on to "subsection"). This is not something that can be set in XF86Configure or xorg.conf.
This would definitely have the effect you describe, since DISPLAY=:0 would use unix domain sockets (local FIFOs) while DISPLAY=localhost:0 would use network sockets for the same communication.
-- Glenn
What you both are saying makes sense (and I have looked previously for the nolisten option anywhere) and haven't found it. I wonder if "nolisten" is a default condition in X for this kernel? Or is there some other Xauthority file that this could be in?
Thanks again--sounds like we're all on the same page, but I still have to find who is closing the port or forcing "nolisten".
Dean
This is my entire Xservers file from /etc/X11/xdm/Xservers:
# $Xorg: Xserv.ws.cpp,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
#
# Xservers file, workstation prototype
#
# This file should contain an entry to start the server on the
# local display; if you have more than one display (not screen),
# you can add entries to the list (one per line). If you also
# have some X terminals connected which do not support XDMCP,
# you can add them here as well. Each X terminal line should
# look like:
# XTerminalName:0 foreign
#
:0 local /usr/X11R6/bin/X
--------------------------
Here is the gdm.conf file (/etc/X11/gdm/gdm.conf) without comment lines:
[daemon]
AutomaticLoginEnable=false
AutomaticLogin=
TimedLoginEnable=false
TimedLogin=
TimedLoginDelay=30
Greeter=/usr/bin/gdmgreete
DefaultPath=/usr/local/bin
RootPath=/usr/local/sbin:/
User=gdm
Group=gdm
LogDir=/var/log/gdm
PidFile=/var/run/gdm.pid
PostLoginScriptDir=/etc/X1
PreSessionScriptDir=/etc/X
PostSessionScriptDir=/etc/
DisplayInitDir=/etc/X11/gd
XKeepsCrashing=/etc/X11/gd
ServAuthDir=/var/gdm
BaseXsession=/etc/X11/xdm/
DefaultSession=default.des
UserAuthDir=
UserAuthFBDir=/tmp
UserAuthFile=.Xauthority
StandardXServer=/usr/X11R6
Xnest=/usr/X11R6/bin/Xnest
[security]
AllowRoot=true
AllowRemoteRoot=true
AllowRemoteAutoLogin=false
RelaxPermissions=0
RetryDelay=1
UserMaxFile=65536
[xdmcp]
Enable=true
HonorIndirect=true
Willing=/etc/X11/gdm/Xwill
[gui]
GtkRC=/usr/share/themes/Bl
[greeter]
TitleBar=false
ConfigAvailable=false
Browser=false
MinimalUID=500
Logo=
BackgroundColor=#20305a
ShowGnomeFailsafeSession=f
ShowLastSession=false
GraphicalTheme=Bluecurve
GraphicalThemeDir=/usr/sha
[chooser]
HostImageDir=/usr/share/ho
Hosts=
[debug]
Enable=true
[servers]
0=Standard
[server-Standard]
name=Standard server
command=/usr/X11R6/bin/X -audit 0
flexible=true
[server-Terminal]
name=Terminal server
command=/usr/X11R6/bin/X -audit 0 -terminate
flexible=false
handled=false
[server-Chooser]
name=Chooser server
command=/usr/X11R6/bin/X -audit 0
flexible=false
chooser=true
Interesting...I hadn't thought to look for kdm config files in particular. I didn't know where to find them, so did a quick Vivisimo search and found that they are in /usr/share/config/kdm, most of its files linking to /etc/X11/xdm. If found the file kdmrc which looks like it's the same format as xdm-config. I found settings in kdmrc there that said:
[Xdmcp]
# Whether KDM should listen to XDMCP requests. Default is true.
Enable=false
and changed it to
Enable=true
I'll let you know how it works once I'm allow to interrupt development to try it out.
Dean
So what is the recommendation? I did try turning Enable to true in the 'kdmrc" file to no avail. If the display is using Gnome, will kdmrc be used at all anyway?
As you can see from the gdm.conf file, -nolisten is not set. What else could it be? Or, alternatively, could you post or know where I can find a set of gdm.conf / xdm config files that will allow tcp:6000 listening?
Arhum, this is probably gdm, yes. Let's find out:
ps xww|grep dm|grep -v grep
.... should show one of gdm, kdm or xdm (or in rare cases like Mdk/Mdv you might have bastards like mdkkdm:).
If it is gdm, then you have the DisallowTCP option in gdm.conf that defaults to true on most distros... Set it explicitly to false and see what happens when you restart gdm...
It is easy to see if X gets spawned off with the nolisten flag too:
ps xww|grep X11|grep -v grep
... would show it nicely;-).
-- Glenn
netstat -an | grep 6000 shows nothing. Thanks for the info on XDMCP--that eliminates those options. So, if something is happening "automagically" (I love that term), how can I not so automagically Allow TCP?
Also, in case it is of interest,
[root@Sys0 xdm]# nmap -sT localhost
Starting nmap 3.48 ( http://www.insecure.org/nm
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1648 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
111/tcp open rpcbind
513/tcp open login
514/tcp open shell
631/tcp open ipp
783/tcp open hp-alarm-mgr
32774/tcp open sometimes-rpc11
32775/tcp open sometimes-rpc13
Nmap run completed -- 1 IP address (1 host up) scanned in 0.363 seconds
[root@Sys0 xdm]# nmap -sT 204.100.186.247
Starting nmap 3.48 ( http://www.insecure.org/nm
Interesting ports on Sys0 (204.100.186.247):
(The 1652 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
111/tcp open rpcbind
513/tcp open login
514/tcp open shell
32774/tcp open sometimes-rpc11
Nmap run completed -- 1 IP address (1 host up) scanned in 0.363 seconds
Look for yourself:
http://yippi.hypermall.com
> FYI: whenever I tried to make the change (DisallowTCP=false) and then reboot the server (via ctr-alt-backspace), it
> didn't take. Rebooting did.
This is because then you only restart _the X server_, not the gdm process that is spawning X.
Come to think of it, perhaps FC3 has moved on from having prefdm (the script that actually starts the display manager) in /etc/inittab, unto having it as a separate init-script (the "dm" service)... In that case one could have just done "service dm restart" ... Well, no matter, a reboot would do nicely:-).
Anyway, glad to see your problem is solved!
-- Glenn
Business Accounts
Answer for Membership
by: gheistPosted on 2005-07-26 at 14:04:25ID: 14531666
X server does not listen on localhost:6000, so all connections via internet socket fail ( which is security measure)