zoukankan      html  css  js  c++  java
  • How to set VNC

     VNC is useful to remotely to control one computer .

    1. Install 

        yum install vnc vnc-server

    2. Setting the vnc account

        edit the file : "vim /etc/sysconfig/vncservers"

        VNCSERVERS="1:root 2:roc"

    3. Set the password for the different account

        As root user , run "vncpasswd" command to set the password;

       Then run the command again as roc user.

    4. Start the servers

        service vncserver start

    5. Test it by vncviewer

        vncviewer localhost:1  or vncviewer localhost:2

       It should be work.

    6. Open the firewall to be  access by other users

          6.1   vim  /etc/sysconfig/iptables

           Add below two lines in that file

        -A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT

        -A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT 

         6.2  Apply the new rules for the firewall

             service iptables restart

    7. Then other users can access it in remote.

        vncviewer ip:1 

        if you cant access it , you can stop the iptable to try it again. ( service iptable stop)

    Note:

     1. Some other remote control tools are also useful. Such as screen, tsclient, mstsc , rdesktop. The later three ones are access the window os, which mostly like mstsc.

    2. Screen command:

       2.1 Create the name termeral:

           screen -S  XXX

       2.2 Share the terminal

           screen -x XXX

       

     

        

  • 相关阅读:
    Servlet和Filter的url匹配
    iterator的用法
    python学习笔记
    python的序列之列表
    java开发实战学习笔记3
    java学习笔记4
    Java Java集合
    Struts2中的几个符号
    DbHelper.cs
    做word,excel时需要引用com
  • 原文地址:https://www.cnblogs.com/zhyg6516/p/1690072.html
Copyright © 2011-2022 走看看