Access the graphics environment of a video-less server through vnc

Source: Internet
Author: User

Access the graphics environment of a video-less server through vnc
Recently, Fedora 22 was installed on a Power server without a video card. Because there is no video card, Xserver cannot be started on the local machine. Therefore, you want to remotely access the graphic environment of the server through vnc. Install xserver and a simple window manager twm on the server (depending on your preferences, you can install a desktop environment such as gnome or KDE) to install vncserver, dnf install tigervnc-server, after the installation, you can start vncserver. vncserver will automatically find the first available display number. Here: 1 is used. You can also explicitly specify the display number, for example, vncserver: 3. Edit the xstartup script. After the vncserver is started, ~ /. Vnc/xstartup. This script file is equivalent ~ /. Xinitrc is a series of commands that need to be run when xserver is started, including commands to start a window manager or desktop environment. Use vncserver-kill: 1 to disable the started vncserver, and then edit ~ /. Vnc/xstartup file. I only need to add one line of the startup Window Manager Command: exec twm. Install the vnc client on the machine on which you want to connect to the server, such as xvncviewer. Note that the X environment must be configured for the machine on which the vnc client is installed. Otherwise, it is like the blind guy still wants to watch a movie. Connect to the server: xvncviewer <server ip >:< port>. Note that you must specify the port number to connect. The port used by the vncserver starts from 5900. If the display number is: 1, the port number is 5901. If the display number is: 5, the port number is 5905. Suppose our server IP address is 10.1.50.123, then we use xvncviewer 10.1.50.123: 5901 to connect to the server. What's going on? If the system prompts that the server cannot be connected or the connection is rejected, the specified server port rejects access. Run the iptables command to release the port: iptables-I INPUT-p tcp -- dport 5901-j ACCEPT. Connect to the server with xvncviewer 10.1.50.123: 5901 and enter the access password. Haha, the simple twm graphic interface is displayed. To use desktop environments such as xfce, gnome, and kde, add commands for using the corresponding graphic environment in xstartup.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.