Tutorial: VNC (Virtual Network Computer) to connect to Linux CentOS remote desktop

888u

Last update at :2024-05-26,Edit by888u

Tutorial:VNCConnectionLinux CentOS Remote Desktop

Recently I plan to publish more tutorials for beginners on VPS, because the blogger is a novice. There are quite a few VPSs on hand, which would be a bit of a waste if you don’t use them for learning and tossing around. Let’s play with the entire VNC software first.

What is VNC

VNC is an excellent remote control tool software developed by the famous AT&T European Research Laboratory. VNC is a free open source software based on UNIX and Linux operating systems. It has powerful remote control capabilities, is efficient and practical, and its performance is comparable to any remote control software in Windows and MAC. VNC (Virtual Network Computer) is the abbreviation of virtual network computer. VNC is an excellent remote control tool software developed by the famous AT&T's European Research Laboratory. VNC is a free open source software based on UNIX and Linux operating systems. It has powerful remote control capabilities, is efficient and practical, and its performance is comparable to any remote control software in Windows and MAC. In Linux, VNC includes the following four commands: vncserver, vncviewer, vncpasswd, and vncconnect. In most cases users only need two of these commands: vncserver and vncviewer.

What is the use of VNC

Because the cost of overseas Windows VPS is high, and there are not many options to choose from, and because the choice of Linux VPS is large, there are more Linux VPSs that need to install a visual desktop environment similar to Windows.

How to install VNC on Centos

1. Install VNC

  • yum install vnc-server
  • 2. Add users

  • useradd vnc
  • passwd vnc
  • 3. Set the user’s vnc password

  • su vnc
  • vncpasswd
  • exit
  • 4. Edit vnc server configuration file

  • vi /etc/sysconfig/vncservers
  • Add at the end:

  • VNCSERVERS="1:vnc"
  • VNCSERVERARGS[1]=”-geometry 1024×768″
  • 5. Create xstartup script (centos-6 users ignore this step)

  • /sbin/service vncserver start
  • /sbin/service vncserver stop
  • su vnc
  • vi ~/.vnc/xstartup
  • Add the following code:

  • #!/bin/sh
  • # Add the following line to ensure you always have an xterm available.
  • ( while true ; do xterm ; done ) &
  • # 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 gray
  • vncconfig -iconic &
  • xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
  • twm &
  • Exit to root:

  • exit
  • 6. Start vnc

  • /sbin/service vncserver start
  • 7. Test vnc 7.1. Use java to connect to vncserver Enter http://192.168.0.10:5801 in the browser to log in to the desktop. 7.2. Use vnc viewer to connect to vncserver Open vnc viewer and enter 192.168.0.10:1 in the server to connect. Note: Replace 192.168.0.10 with your own server IP.

    Or use the one-click installation package made by some netizens on the Internet, but pay attention to the version number to see if it is supported.

    Recommended site searches: foreign hosts, Internet cafe IP address query, foreign server rental and registration domain name purchase, free virtual host application in domain name, website registration number telecom host rental, ws domain name, network IP address query,

    Tutorial: VNC (Virtual Network Computer) to connect to Linux CentOS remote desktop

    All copyrights belong to 888u unless special state
    取消
    微信二维码
    微信二维码
    支付宝二维码