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 |