Servidor VNC sem sistema X Window

6

Um servidor VNC funcionará sem o X Server instalado? Eu sei que o vnc funciona com o X Server, mas e sem ele?

    
por anonman 15.05.2014 / 03:37

2 respostas

4

Não, você normalmente precisará do X instalado no servidor em que está usando o VNC, já que ele está exibindo apenas um desktop X a partir deste servidor.

In computing, Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical screen updates back in the other direction, over a network.

Esse bit pode ser o que confunde as pessoas:

Note that the machine the VNC server is running on does not need to have a physical display. In the normal method of operation a viewer connects to a port on the server (default port 5900).

Quando eles mencionam "Display", estão falando de um monitor físico. O servidor remoto ainda requer que o X seja instalado e configurado para que os desktops da GUI possam ser executados.

E quanto ao Xvnc, X11vnc e vncserver?

Xvnc

Xvnc é um servidor X11 que pode ser executado de forma independente, mas ainda assim Exigir um desktop para operá-lo, caso contrário, quando você iniciá-lo, você será presenteado com apenas uma janela preta. Portanto, o Xvnc tecnicamente não exige que o X seja instalado, pois contém seu próprio servidor X.

So Xvnc is really two servers in one. To the applications it is an X server, and to the remote VNC users it is a VNC server. By convention we have arranged that the VNC server display number will be the same as the X server display number, which means you can use eg. snoopy:2 to refer to display 2 on machine 'snoopy' in both the X world and the VNC world.

Normally you will start Xvnc using the vncserver script, which is designed to simplify the process, and which is written in Perl. You will probably want to edit this to suit your preferences and local conditions. We recommend using vncserver rather than running Xvnc directly, but Xvnc has essentially the same options as a standard X server, with a few extensions. Running Xvnc -h will display a list.

$ export DISPLAY=localhost:1.0
$ /usr/bin/Xvnc :1 -ac -auth "/root/.Xauthority" \
    -geometry "1200x700" -depth 8 -rfbwait 120000 \
    -rfbauth /root/.vnc/passwd 2> /root/.vnc/ServerDaemon.log &
$ /bin/sleep 10
$ /usr/bin/fvwm 2> /root/.vnc/fvwm.log &
x11vnc

Onde Xvnc contém seu próprio servidor X, x11vnc não. É um servidor VNC que se integra com um servidor X, Xvnc ou Xvfb já em execução. Ele tem o recurso exclusivo de poder se conectar a coisas que têm um framebuffer.

trecho

x11vnc keeps a copy of the X server's frame buffer in RAM. The X11 programming interface XShmGetImage is used to retrieve the frame buffer pixel data. x11vnc compares the X server's frame buffer against its copy to see which pixel regions have changed (and hence need to be sent to the VNC viewers.)

trecho

It allows remote access from a remote client to a computer hosting an X Window session and the x11vnc software, continuously polling the X server's frame buffer for changes. This allows the user to control their X11 desktop (KDE, GNOME, XFCE, etc.) from a remote computer either on the user's own network, or from over the Internet as if the user were sitting in front of it. x11vnc can also poll non-X11 frame buffer devices, such as webcams or TV tuner cards, iPAQ, Neuros OSD, the Linux console, and the Mac OS X graphics display.

x11vnc does not create an extra display (or X desktop) for remote control. Instead, it uses the existing X11 display shown on the monitor of a Unix-like computer in real time, unlike other Linux alternatives such as TightVNC Server. However, it is possible to use Xvnc or Xvfb to create a 'virtual' extra display, and have x11vnc connect to it, enabling X-11 access to headless servers.

vncserver

vncserver é apenas um script Perl de interface que ajuda a facilitar a complexidade de configurar o VNC + X em servidores remotos que você usará o VNC para se conectar.

vncserver is used to start a VNC (Virtual Network Computing) desktop. vncserver is a Perl script which simplifies the process of starting an Xvnc server. It runs Xvnc with appropriate options and starts a window manager on the VNC desktop.

Referências

por 15.05.2014 / 04:05
0

Se você não estiver executando o X11 (X), mas usando o framebuffer, existe o framebuffer-vncserver. link Isso funciona bem, com a exceção de que não suporta entrada. Isso é fácil de contornar, injetando diretamente a entrada no lado do servidor.

    
por 09.08.2017 / 01:39