zoukankan      html  css  js  c++  java
  • VNC连接桌面

    1、#yum -y install vnc *vnc-server*

     

    2、修改VNCServer主配置文件

    #vim /etc/sysconfig/vncservers

    复制最后两行并去掉行首注释符,然后修改为

    VNCSERVERS="1:root"

    VNCSERVERARGS[1]="-geometry 1024x768"

     

    3、设置VNCServer远程连接密码

    #vncpasswd

    输入两次相同的密码

     

    4、启动vncserver服务

    #/etc/init.d/vncserver start  下面会提示

    Starting VNC server: 1:root
    New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1  等下用  ip:1登录

     

    5、上一步执行完毕会在root宿主目录下生成.vnc开头的隐藏目录,该目录下面的文件就是root用户的VNC桌面配置文件。打开xstartup配置桌面

    #vim /root/.vnc/xstartup

    将最后一行改为

    gnome &

    (使用GNOME桌面)

     

    6、开启防火墙VNCServer端口(或者关闭防火墙和selinux  /etc/init.d/iptables stop  和  setenforce 0)

    #vim /etc/sysconfig/iptables

    在“-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT”下面添加一行-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT

    重启iptables服务

    #/etc/init.d/iptables restart

     

     

    7、下载一个vnc-4_1_2-x86_win32_viewer

    在VNC Server一栏输入,再输入密码就能连接上了

  • 相关阅读:
    集合框架
    hashtable
    测试3
    opcache的威力
    信息的信息
    php blog to explore
    BEHAT安装
    Failed to start: SocketListener0@0.0.0.0:4444
    模板方法设计模式
    mysqldump
  • 原文地址:https://www.cnblogs.com/hanxing/p/5689950.html
Copyright © 2011-2022 走看看