Use Xvfb in Centos with x11vnc to build VNCServer

Source: Internet
Author: User
It is too important to remotely run the Linux window program to use XWindows. you can use Xvfb to create a virtual X Window, start VNCServer through x11vnc, and forward the virtual window started by Xvfb. 12345678yuminstallxorg-x11-server-Xvfbyumin

Remote running of Linux window program X Windows is too heavyweight. you can use Xvfb to create a virtual X Window, start the VNC Server through x11vnc, and forward the virtual window started by Xvfb.

12345678
Yum install xorg-x11-server-Xvfbyum install x11vnc # New X virtual window Xvfb: 1-screen 0 1024x768x24-nolisten tcp & # set the default window to the new virtual window, when you open a window program, call export DISPLAY =: 1 # or DISPLAY =: 1 firefox

INIT:
1234567891011121314151617
#!/bin/bash#chkconfig: 345 95 50#description: Starts xvfb on display 1if [ -z "$1" ]; then    echo "`basename $0` {start|stop}"    exitfi   case "$1" in    start)    Xvfb :1 -screen 0 1024x768x24 -nolisten tcp &    export DISPLAY=:1    echo 'export DISPLAY=:1' >> ~/.bashrc     ;;     stop)    killall Xvfb    ;;esac

# Create a VNC server and forward the specified X Window
1
x11vnc -listen 0.0.0.0 -rfbport 5900 -noipv6 -passwd password -display :1 -forever

Connect to the VNC client. the default port is 5900. TightVNC or UltraVNC can be used in Windows.
The startup software window is too small. set:
1
xdotool search --name ".*Mozilla Firefox" windowsize 1440 900

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.