Bug 192844 - vncserver does not honour :display# option
Summary: vncserver does not honour :display# option
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: vnc
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Radek Vokál
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-23 15:34 UTC by Graham King
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-24 13:19:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Graham King 2006-05-23 15:34:11 UTC
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):
vnc-server-4.1.1-11.fc4

How reproducible:
always

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
COMMAND   PID    USER   FD   TYPE DEVICE SIZE NODE NAME
Xvnc    14600    user    1u  IPv4 930667       TCP *:6010 (LISTEN)
Xvnc    14600    user    4u  IPv4 930670       TCP 127.0.0.1:5901 (LISTEN)
Xvnc    14600    user    5u  IPv4 930671       TCP 127.0.0.1:5810 (LISTEN)


Expected results:
Xvnc :10 should be listening on 127.0.0.1:5910

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 13:19:15 UTC
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 127.0.0.1:5910, 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.