LINUX.ORG.RU

История изменений

Исправление AEP, (текущая версия) :

systemd-сервис, сохранить как /etc/systemd/system/vnc@.service:

[Unit]
Description=X server for %i
After=nss-user-lookup.target

[Service]
Environment=DISPLAY=
EnvironmentFile=/etc/systemd/system/vnc/%i.conf
ExecStart=/bin/su - %i -c '. /etc/environment ; exec /usr/bin/startx -- $DISPLAY'
TimeoutStopSec=5
RestartSec=5
Restart=always

[Install]
WantedBy=graphical.target

Конфиг к нему, сохранить как /etc/systemd/system/vnc/aep.conf:

DISPLAY=:67

Конфиг иксов, сохранить как /etc/X11/xorg.conf.d/10-dummy.conf :

# For details, please see:
# https://xpra.org/Xdummy.html

Section "ServerFlags"
  Option "DontVTSwitch" "true"
  Option "AllowMouseOpenFail" "true"
  Option "PciForceNone" "true"
  Option "AutoEnableDevices" "false"
  Option "AutoAddDevices" "false"
  Option "AutoAddGPU" "false"
EndSection

Section "InputDevice"
  Identifier "dummy_mouse"
  Option "CorePointer" "true"
  Driver "void"
EndSection

Section "InputDevice"
  Identifier "dummy_keyboard"
  Option "CoreKeyboard" "true"
  Driver "void"
EndSection

Section "Device"
  Identifier "dummy_videocard"
  Driver "dummy"
  VideoRam 65536
EndSection

Section "Monitor"
  Identifier "dummy_monitor"
  HorizSync   30-1000
  VertRefresh 23-61

  Modeline "3840x2160" 266.75  3840 4056 4456 5072  2160 2163 2168 2192 -hsync +vsync
  Modeline "3200x1800" 233.00  3200 3384 3720 4240  1800 1803 1808 1834 -hsync +vsync
  Modeline "2560x1440" 146.25  2560 2680 2944 3328  1440 1443 1448 1468 -hsync +vsync
  Modeline "1920x1200" 193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
  Modeline "1920x1080" 173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
  Modeline "1600x900"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync
  Modeline "1366x768"   84.75  1366 1432 1568 1776  768 771 781 798 -hsync +vsync
  Modeline "1280x800"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync
  Modeline "1280x768"   79.50  1280 1344 1472 1664  768 771 781 798 -hsync +vsync
  Modeline "1280x720"   74.50  1280 1344 1472 1664  720 723 728 748 -hsync +vsync

  DisplaySize 423 238
  Option "PreferredMode" "1600x900"
  Option "DefaultModes" "false"
EndSection

Section "Screen"
  Identifier "dummy_screen"
  Device "dummy_videocard"
  Monitor "dummy_monitor"
  DefaultDepth 24
EndSection

Section "ServerLayout"
  Identifier   "dummy_layout"
  Screen       "dummy_screen"
  InputDevice  "dummy_mouse"
  InputDevice  "dummy_keyboard"
EndSection

Затем:

systemctl enable vnc@aep.service
systemctl start vnc@aep.service

x11vnc запускается через desktop-файл /etc/xdg/autostart/x11vnc.desktop, содержащий команду из предыдущего комментания. Еще есть скрипт, генерирующий динамические пароли для x11vnc.

Исходная версия AEP, :

systemd-сервис, сохранить как /etc/systemd/system/vnc@.service:

[Unit]
Description=X server for %i
After=nss-user-lookup.target

[Service]
Environment=DISPLAY=
EnvironmentFile=/etc/systemd/system/vnc/%i.conf
ExecStart=/bin/su - %i -c '. /etc/environment ; exec /usr/bin/startx -- $DISPLAY'
TimeoutStopSec=5
RestartSec=5
Restart=always

[Install]
WantedBy=graphical.target

Конфиг к нему, сохранить как /etc/systemd/system/vnc/aep.conf:

DISPLAY=:67

Конфиг иксов:

cat /etc/X11/xorg.conf.d/10-dummy.conf 
# For details, please see:
# https://xpra.org/Xdummy.html

Section "ServerFlags"
  Option "DontVTSwitch" "true"
  Option "AllowMouseOpenFail" "true"
  Option "PciForceNone" "true"
  Option "AutoEnableDevices" "false"
  Option "AutoAddDevices" "false"
  Option "AutoAddGPU" "false"
EndSection

Section "InputDevice"
  Identifier "dummy_mouse"
  Option "CorePointer" "true"
  Driver "void"
EndSection

Section "InputDevice"
  Identifier "dummy_keyboard"
  Option "CoreKeyboard" "true"
  Driver "void"
EndSection

Section "Device"
  Identifier "dummy_videocard"
  Driver "dummy"
  VideoRam 65536
EndSection

Section "Monitor"
  Identifier "dummy_monitor"
  HorizSync   30-1000
  VertRefresh 23-61

  Modeline "3840x2160" 266.75  3840 4056 4456 5072  2160 2163 2168 2192 -hsync +vsync
  Modeline "3200x1800" 233.00  3200 3384 3720 4240  1800 1803 1808 1834 -hsync +vsync
  Modeline "2560x1440" 146.25  2560 2680 2944 3328  1440 1443 1448 1468 -hsync +vsync
  Modeline "1920x1200" 193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
  Modeline "1920x1080" 173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
  Modeline "1600x900"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync
  Modeline "1366x768"   84.75  1366 1432 1568 1776  768 771 781 798 -hsync +vsync
  Modeline "1280x800"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync
  Modeline "1280x768"   79.50  1280 1344 1472 1664  768 771 781 798 -hsync +vsync
  Modeline "1280x720"   74.50  1280 1344 1472 1664  720 723 728 748 -hsync +vsync

  DisplaySize 423 238
  Option "PreferredMode" "1600x900"
  Option "DefaultModes" "false"
EndSection

Section "Screen"
  Identifier "dummy_screen"
  Device "dummy_videocard"
  Monitor "dummy_monitor"
  DefaultDepth 24
EndSection

Section "ServerLayout"
  Identifier   "dummy_layout"
  Screen       "dummy_screen"
  InputDevice  "dummy_mouse"
  InputDevice  "dummy_keyboard"
EndSection

Затем:

systemctl enable vnc@aep.service
systemctl start vnc@aep.service

x11vnc запускается через desktop-файл /etc/xdg/autostart/x11vnc.desktop, содержащий команду из предыдущего комментания. Еще есть скрипт, генерирующий динамические пароли для x11vnc.