`

Setup VNC in Linux

阅读更多

Setup VNC in Linux
1. check if VNC installed in your system.

$ rpm -qa|grep 'vnc'
vnc-server-4.1.2-14.el5_3.1

 

2. Open firewall for VNC port:

  • add the bold row
$ vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
  •  restart iptables:
$ service iptables restart
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: filter                    [  OK  ]
Unloading iptables modules:                                [  OK  ]
Applying iptables firewall rules:                          [  OK  ]
Loading additional iptables modules: ip_conntrack_netbios_n[  OK  ]

 

 

3. Add/Modify users for the vnc

$ vi /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own).  You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

# Use "-nohttpd" to prevent web-based VNC clients connecting.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.  See the "-via" option in the
# `man vncviewer' manual page.

VNCSERVERS="1:oracle"
VNCSERVERARGS[1]="-geometry 1024x768 -depth 16"

 

$ vi ~/.vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

 
4. Starting the server and startup options

Start:

$ vncserver :1

New 'oslcn33.cn.oracle.com:1 (oracle)' desktop is oslcn33.cn.oracle.com:1

Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/oslcn33.cn.oracle.com:1.log

 

    Stop:

$ vncserver -kill :1
Killing Xvnc process ID 4623

 

Setting a password

$ vncpasswd
Password:
Verify:

 

分享到:
评论

相关推荐

    VNC4.5.4Linux图形化界面

    VNC4.5.4是VNC的一个版本,专注于为Linux操作系统提供远程图形化界面的支持。这个版本可能包含了优化和改进,以提供更好的性能和用户体验。 在Linux环境中,VNC通常用于在没有物理显示器或者需要远程管理服务器的...

    ipad VNC 远程linux

    ipad VNC 远程linux ipad VNC 远程linux ipad VNC 远程linux ipad VNC 远程linux ipad VNC 远程linux

    real vnc 4.1.3 for linux 免费版 rpm包

    real vnc 4.1.3 for linux rpm 包,带服务端客户端

    vnc for linux

    vnc for linux

    在 linux 中安装 RealVNC

    在Linux系统中安装RealVNC是一项实用且关键的技能,尤其对于远程桌面访问与管理有着不可忽视的作用。RealVNC是一种流行的虚拟网络计算(VNC)软件,它允许用户通过网络连接并控制另一台计算机的桌面环境。无论是从...

    windows下使用vnc连接Linux系统

    Windows下使用VNC连接Linux系统 VNC(Virtual Network Computing)是一种远程控制工具,允许用户在Windows下连接Linux系统,通过图形化界面访问系统。为了实现这种连接,需要在Linux系统中安装VNC服务器,并在...

    linux下realVNC安装使用

    centos6.2下安装realVNC,配置,在windows下通过vncviewer连接使用。 有需要的可以下载。

    linux下vnc view安装包

    1、deb 64位 2、版本7.8.0

    vnc linux客户端工具

    VNC (Virtual Network Computing)是虚拟网络计算机的缩写。... 在 Linux 中,VNC 包括以下四个命令:vncserver,vncviewer,vncpasswd,和 vncconnect。大多数情况下我只需要其中的两个命令:vncserver 和 vncviewer。

    vnc-5.2.0-Linux-x86

    这个“vnc-5.2.0-Linux-x86”压缩包文件是VNC的一个特定版本,特别针对Linux x86架构进行了优化。以下是关于VNC和这个软件包的详细知识点: 1. **VNC的历史与背景**: VNC最初由英国剑桥大学AT&T实验室的科学家们...

    VNC-5.1.0-Linux-x86-RPM.tar.gz

    "VNC-5.1.0-Linux-x86-RPM.tar.gz" 是一个包含 RealVNC 公司的 VNC 5.1.0 版本软件的Linux x86架构的RPM压缩包。这个包包括了VNC Server(服务端)和VNC Viewer(客户端)两个组件,适用于32位的Linux系统。 1. **...

    VNC Linux

    在Linux系统中,VNC提供了便捷的方式,使得管理员或用户能够远程控制和管理计算机,而无需实际坐在该机器前。VNC 5.2.0 是一个较新的版本,提供了稳定性和性能的改进。 标题提到的"VNC Linux"指的是VNC软件在Linux...

    tightvnc1.3 for linux

    《TightVNC 1.3 for Linux:远程桌面控制的高效解决方案》 TightVNC,一个在Linux操作系统上广泛使用的开源远程桌面控制软件,是本文的核心关注点。其1.3版本针对Linux系统提供了稳定的性能和丰富的功能,使得用户...

    RealVNC5.0安装使用-linux

    ### RealVNC 5.0在Linux下的安装与使用指南 #### 一、RealVNC软件下载与安装 **RealVNC**是一款广泛使用的远程桌面访问软件,它允许用户通过网络控制另一台计算机的桌面环境,特别适用于企业级远程支持和协作场景...

    Linux VNC 密码解密

    解密Linux 上的VNC 用户密码,VNC用户密码保存在~username/.vnc/passwd

    VNC-Viewer-5.2.1-Linux-x64

    VNC-Viewer-5.2.1-Linux-x64

    vncviewer linux 远程工具

    vncviewer linux 远程工具 非常好的工具

    Linux VNC-Server-6.2.0-Linux-x64.rpm

    Linux VNC-Server-6.2.0-Linux-x64.rpm下载,64位版本

    real VNC linux

    标题"real VNC linux"指的是RealVNC公司提供的VNC服务在Linux操作系统上的应用。RealVNC是VNC协议的一个流行实现,提供了服务器(VNC Server)和客户端(VNC Viewer)组件,使得用户可以在任何平台(包括Linux)上...

Global site tag (gtag.js) - Google Analytics