Bug 192844 - vncserver does not honour :display# option
vncserver does not honour :display# option
Product: Fedora
Classification: Fedora
Component: vnc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2006-05-23 11:34 EDT by Graham King
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-24 09:19:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Graham King 2006-05-23 11:34:11 EDT
Description of problem:
vncserver :10  should start a vncserver ":10" listening on port 5910/tcp. 
Instead, it starts :1 listening on 5901/tcp.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
[user@host ~]$ ps -ef | grep [X]vnc
[user@host ~]$ vncserver -localhost :10

Actual results:
New 'host.domain:1 (user)' desktop is host.domain:1

Starting applications specified in /home/user/.vnc/xstartup
Log file is /home/user/.vnc/host.domain:1.log

[user@host ~]$ ps -ef | grep [X]vnc
user     14600     1  0 16:06 pts/3    00:00:00 Xvnc :1 -desktop host.domain:1
(user) -httpd /usr/share/vnc/classes -auth /home/user/.Xauthority -geometry
1024x768 -depth 16 -rfbwait 30000 -rfbauth /home/user/.vnc/passwd -rfbport 5901
-pn -localhost :10

[root@host ~]# /usr/sbin/lsof -i 4 -a -n -P -p 14600
Xvnc    14600    user    1u  IPv4 930667       TCP *:6010 (LISTEN)
Xvnc    14600    user    4u  IPv4 930670       TCP (LISTEN)
Xvnc    14600    user    5u  IPv4 930671       TCP (LISTEN)

Expected results:
Xvnc :10 should be listening on

Additional info:
(Side issue: I'm also slightly surprised that Xvnc listens on all interfaces for
X clients, even when -localhost is specified.  I realise that this option
prevents non-local vnc clients from connecting, but expected it to apply to X
clients also.  Possible security issue?)
Comment 1 Jitka Kozana 2006-05-24 09:19:15 EDT
You have to run:
vncserver :10 -localhost
instead of 
vncserver -localhost :10.

In the first case, display number 10 will be chosen and Xvnc will listen on 
port, as expected.

But, if write :10  as the last parameter, Xvnc will choose first free display 
to run on (which is in your case #1).

Read the manual page (man vncserver), if I did not make myself clear enough. 
(The way how to start Xvnc on a certain display, is different for Xvnc command 
and the vncserver command. Consult the manual page.)

As for your side note -- I do not believe this is a security issue. However, 
if you believe, this could be misused, you can try it. 

Note You need to log in before you can comment on or make changes to this bug.