[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#539186: nolisten switch in /etc/X11/xinit/xserverrc ignored



On 13 Oct 2009, Julien Cristau wrote:
> On Wed, Jul 29, 2009 at 17:56:35 +0100, Anthony Campbell wrote:
> 
> > /etc/X11/xinit/xserverrc contains the line:
> > 
> > exec /usr/bin/X11/X -nolisten tcp
> > 
> > But connecting to a server at port 6000 in an X terminal says that port
> > 6000 is not available. I got round it by starting X with 
> > 'startx -- -nolisten tcp'.
> > 
> > For some reason this does not affect two other machines but it does
> > affect this one.
> > 
> I'm not sure I understand this bug report.  Can you show actual error
> messages, and output of 'ps aufx' when this occurs?
> What X servers are you starting, how, etc.  We'll need some more verbose
> info on your setup…
> 
> Cheers,
> Julien

I need to access a server via ssh, using this line:

ssh -f  -L 6000:localhost:4499 campbell@91.204.208.39 -N

I do this and then supply the password needed to connect. I then get:

bind: Address already in use
channel_setup_fwd_listener: cannot listen to port: 6000
Could not request local forwarding.

After some research on google I used this command to find which process
was using port 6000:

Starting Nmap 5.00 ( http://nmap.org ) at 2009-10-14 07:43 BST
Interesting ports on localhost (127.0.0.1):
Not shown: 992 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
25/tcp   open  smtp
111/tcp  open  rpcbind
113/tcp  open  auth
143/tcp  open  imap
515/tcp  open  printer
993/tcp  open  imaps
6000/tcp open  X11

I therefore realised it was X11 that was listening on this port. I found
two ways of getting round this: either do ssh before starting X, or
start X with the --nolisten switch.

The above switch is there in /etc/X11/xinit/xserverrc but it does not
seem to have any effect.

Hope this is clear

Anthony

-- 
Anthony Campbell - ac@acampbell.org.uk 
Microsoft-free zone - Using Debian GNU/Linux
http://www.acampbell.org.uk (blog, book reviews, 
and sceptical articles)




Reply to: