X11vnc (Simplified Chinese) from archwikijump to: navigation
,
Search
| I18n |
English |
| Simplified Chinese |
Warning: This creates a VNC without a password.
This means that anyone can access your VNC over the network and view your X interface. This can be easily avoided through SSH connections.
| Contents [Hide ]
- 1
Set x11vnc
- 1.1
Install
- 1.2
Run
- 1.3
Access
- 2
SSH port forwarding
|
Set x11vnc
Install
pacman -S x11vnc
Run
First, you need to run an X Server server. Use startx or similar.
Startx
x11vnc -display :0 -auth ~/.Xauthority
If it fails, you may need to run it as root.
x11vnc -display :0 -autho /home/USER/.Xauthority
Where user is the username of the user who is running the X server.
NT
Run as root
x11vnc -display :0 -auth /var/lib/gdm/:0.Xauth
Access
Run the VNC client on another machine and enter the IP address of the x11vnc server. Click Connect. Then you need to set the IP address.
SSH port forwarding
For safe usex11vnc
First, install and configure SSH
.
Startx11vnc
Specify the command line option"-localhost
", Which causes
The VNC service can only be bound to the local network interface. In this case, the connection directly connected from the outside world will be rejected.
When you need to access the VNC service from another computer, first use SSH
Log on to run
VNC host, which forwards the port listened by the VNC service to your local host. In the following example, assume that the Host Name of the running VNC is "foo", and the VNC listens to port 5900:
ssh foo -L 5900:localhost:5900
After an SSH connection is established, open the VNC client program, but do not connect it to port 5900 of foo. Instead, connect it to port 5900 of the Local Machine (localhost.
In this way, you can securely access remote X services through encrypted channels.