Help - Search - Members - Calendar
Full Version: X listening on port 6000 [solved]
MandrivaUsers.org > General Help > Software
mandusr20071
I found that my mandriva 2007.1 was listening on both ports 6000 and 7741. The other one was lisa, which was not active when I installed it. Anyway, I turned it off using chkconfig. I looked up how to prevent X from listening on this site, but the change does not seem to do anything. In the file /etc/X11/xdm/Xservers,
CODE
:0 local /usr/bin/X -nolisten tcp -deferglyphs 16


I am using IceWM. Any help is appreciated, as I use this machine to access Internet.
coverup
Use firewall?
mandusr20071
QUOTE (coverup @ Aug 25 2008, 08:13 AM) *
Use firewall?


A firewall is necessary no matter what ports you have closed. However, it would be better to close down the port since I am not using it. BTW, it seems that KDE will close the port by default if it is chosen as the desktop environment, so it should be possible with some setting, but which file do I change?
pmpatrick
You have the right command but it is almost certainly in the wrong spot. Mandriva 2007.1 uses either the either kdm or gdm display manager, not xdm; can't recall which one it is. You could try poking around in /etc/X11/ to try and find a better place to put your "nolisten tcp" line. First determine which dm you are using by going into mcc>boot>display manager and work from there. For sure it's not xdm and placing your command in an xdm config file will insure that the command is never run.

You could also try sticking the command in a more primitive X startup file like /etc/X11/Xsession, but the dm config file might override that when it executes. Also, take a look at /etc/X11/wmsession.d and /etc/X11/dm.d. Those are the locations in mdv2008.1 that I would look at and they are probably the same in mdv 2007.1. You will probably have to do some tracing down through the X init scripts to find the one that actually starts X. If you want to forgo a dm altogether and start X from a command line login, you could probably accomplish what you want with:

$ startx -- -nolisten tcp
mandusr20071
QUOTE (pmpatrick @ Aug 26 2008, 07:35 PM) *
You have the right command but it is almost certainly in the wrong spot. Mandriva 2007.1 uses either the either kdm or gdm display manager, not xdm;


Yes, running
CODE
ps -ef |grep dm

gives /usr/bin/kdm -nodaemon as the dm. However, there is no file for kdm in /etc/X11. There is a directory for kdm in /etc/kde/. The file /etc/kde/kdm/kdmrc has an option called ServerArgsLocal which is currently set to "-deferglyphs 16". BTW, the comment next to it says that the default is "-nolisten tcp" (as I had mentioned in my previous post)! I don't know why it was changed to the insecure option. wall.gif

I'll post a follow up if the above changes work.

Thanks for the helpful post!
mandusr20071
CODE
netstat -tan
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State


It works! I had some trouble though. When I logged off from IceWM, X did not come back up. Running startx from the command line started up KDE. After a reboot though, everything seems to work.

So the procedure is as follows: Edit the /etc/kde/kdm/kdmrc file and next time X starts, it should be fine.

CODE
192c192
< ServerArgsLocal=-nolisten tcp -deferglyphs 16
---
> ServerArgsLocal=-deferglyphs 16
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.