Install VNC Server On CentOS 6.4

转自:http://www.unixmen.com/install-vnc/

In this handy tutorial, let me show you how to install vncserver on Centos 6.4 and how to  connect to this server from remote hosts.

Install Desktop Environment

Sometimes you may need the GUI to do some tasks in Linux even if that tasks are not preferred for Unix administrations .

For GNOME:

# yum groupinstall  "General Purpose Desktop" "Desktop Platform"

 For KDE:

# yum groupinstall  "KDE Desktop"

Install VNC server

# yum -y install vnc-server
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: centos.crazyfrogs.org
* epel: be.mirror.eurid.eu
* extras: centos.crazyfrogs.org
* updates: centos.crazyfrogs.org
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package tigervnc-server-module.i686 0:1.1.0-5.el6_4.1 will be installed
--> Finished Dependency Resolution

Install   Tigervnc-Server

# yum install tigervnc-server

Make vnc password for user (Ex. pirat9). Login to the user and run the following command:

$ vncpasswd
Password:
Verify:

Configure VNC configuration for new user

Edit /etc/sysconfig/vncservers file and add the user name:

VNCSERVERS="2:pirat9"

you can add more users with multiple different display size for every user.

VNCSERVERS="2:userx 3:usery 4:userz"
VNCSERVERARGS[2]="-geometry 1280x1024"
VNCSERVERARGS[3]="-geometry 1280x1024"
VNCSERVERARGS[4]="-geometry 800x600"

Make it to start automatically on every reboot and start the vnc service.

# chkconfig vncserver on

# /etc/init.d/vncserver start
Starting VNC server: 2:pirat9 xauth: creating new authority file /home/pirat9/.Xauthority
xauth: (stdin):1: bad display name "unixmen-Centos64:2" in "add" command
New 'unixmen-Centos64:2 (pirat9)' desktop is unixmen-Centos64:2
Creating default startup script /home/pirat9/.vnc/xstartup
Starting applications specified in /home/pirat9/.vnc/xstartup
Log file is /home/pirat9/.vnc/unixmen-Centos64:2.log [ OK ]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值