Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-08-2012, 03:52 PM   #1
Registered: Dec 2008
Posts: 61

Rep: Reputation: 17
VNC Port

Dear all,


We need our VNC Server to run on port o (hostname:0) as our applciation requires to be like that.
Now, by default whenever am starting , it starts port 1

like below :

and the display is

I need to start this in

I tried the following :

vi /usr/bin/vncserver

# Find display number.

if ((@ARGV > 0) && ($ARGV[0] =~ /^\d+)$/)) {
$displayNumber = $0;


# Find display number.

if ((@ARGV > 0) && ($ARGV[0] =~ /^\d+)$/)) {
$displayNumber = $1;

[root@test tmp]# ps -ef | grep vnc
root 19691 24162 0 23:31 pts/5 00:00:00 grep vnc
[root@test tmp]# service vncserver start
Starting VNC server: [ OK ]
[root@test tmp]# vncserver

New ' (root)' desktop is

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/

Please advise . how to proceed

Old 09-08-2012, 03:56 PM   #2
Registered: Dec 2008
Posts: 61

Original Poster
Rep: Reputation: 17
I tried the below too

Warning: is taken because of /tmp/.X1-lock
Remove this file if there is no X server

I tried removing the file /tmp/.X1-lock too but still its starting on 1 only


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
VNC on different port (80) blackhawk999 Linux - Software 2 11-06-2007 12:10 PM
VNC Port Cottsay Linux - Software 2 11-04-2006 09:27 PM
vnc open port Murdock1979 Linux - Security 3 05-01-2006 03:11 AM
VNC on non-standard port king_scott_2 Linux - Software 2 07-19-2005 07:25 AM
VNC port redirection sqn Linux - Networking 5 11-18-2003 09:38 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration