
Když se z nějakého důvodu potřebujeme vzdáleně dostat na plochu (X11) stroje s Linuxem (třeba na multimédia či x-kové aplikace), můžeme sáhnout po balíku X11VNC. Jak provést jeho základní nastavení je uvedeno dále.
Instalace a nastavení x11vnc pro Linux (*Ubuntu*)
#instalaceapt-get install x11vnc
#nastavení heslax11vnc -storepasswd
#spuštění vnc serveru na portu 5900 s heslem v /home/user/.vnc/passwdx11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -rfbauth /home/user/.vnc/passwd -rfbport 5900
Autostart X11VNC po spuštění systému Ubuntu
#vytvořit soubor autostart_vnc.shvim /home/user/.local/share/autostart_vnc.sh
...#!/bin/bash
x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -rfbauth ~/.vnc/passwd -rfbport 5900
#přidat práva spouštěníchmod +x /home/user/.local/share/autostart_vnc.sh
#nastavit do cronucrontab -e
...@reboot /home/user/.local/share/autostart_vnc.sh
Pokud X11VNC po spuštění přesto nenastartuje po bootu, tak nastavte pravidelné spouštění v cronu:
*/10 * * * * /home/user/.local/share/autostart_vnc.shŘešení možných problémů
#zastavení x11vncx11vnc -R stop
#clear x11vncx11vnc -clear-all
#zabití x11vnckillall x11vnc && /usr/bin/x11vnc -rfbport 5900 -bg -vncconnect -xvnc -forever
#pokud dochází k ohlášení po přihlášenírm /home/user/.Xauthority
Create the Service Unit file
So far, we have just issued standard command related to the x11vnc package. We need to create the service unit file for our x11vnc service. To do this, we will issue the following command :
<code>sudo nano /lib/systemd/system/x11vnc.service</code>
This file should content the following lines
<code>[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
[Install]
WantedBy=multi-user.target</code>
Save the file
Configure Systemd
It’s time to issue the command to have systemd aware of the change and make the service running at startup. In a command prompt, you will issue the following command :
<code>sudo systemctl daemon-reload</code>
<code>sudo systemctl enable x11vnc.service</code>
- Host: Windows10,
- HyperVisor: Hyper-V
- Client: Ubuntu 16.04.2 LTS s x11vnc
Ako viewer som skúšal:
- tigervnc,
- tightvnc
- ssvnc
Nefunguje písanie Num číslic, a taktiež nefunguje držanie kláves: napr. držanie Delete zmaže len 1 symbol. Viete poradiť v čom môže byť problém?
To že delete smaže jen jeden znak je normální, to mně dělá také.
comma@krankenwagen ~ $ /etc/init.d/x11vnc.sh
error opening logfile: /var/log/x11vnc.log
open: Permission denied