Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1981365
  • 博文数量: 593
  • 博客积分: 20034
  • 博客等级: 上将
  • 技术积分: 6779
  • 用 户 组: 普通用户
  • 注册时间: 2006-02-06 14:07
文章分类

全部博文(593)

文章存档

2016年(1)

2011年(101)

2010年(80)

2009年(10)

2008年(102)

2007年(16)

2006年(283)

我的朋友

分类: LINUX

2011-03-27 18:23:28

To change the default port for vncserver on Linux from 5900 (+display number), you must first open the file /usr/bin/vncserver as root (or sudo) with your favorite text editor. If you scroll down to around 25% mark in the file, you’ll see the line:

$vncPort = 5900 + $displayNumber;

Change 5900 to whatever port you would like, save the file, stop and restart the vnc service.

Java (port 5800 + display number) doesn’t seem to change, so how do we change it? This is a little easier. When starting up your vnc server, just add the option “-httpport “. /etc/sysconfig/vncservers For example:

vncserver -display 800x600 -depth 16 -httpport 5000

阅读(870) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~