diff options
-rw-r--r-- | os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm | 4 | ||||
-rw-r--r-- | os-plugins/plugins/x11vnc/XX_x11vnc.sh | 22 | ||||
-rw-r--r-- | os-plugins/plugins/xserver/XX_xserver.sh | 2 |
3 files changed, 19 insertions, 9 deletions
diff --git a/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm b/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm index 43d7cb45..d3c50e84 100644 --- a/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm +++ b/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm @@ -37,8 +37,8 @@ sub getInfo description => unshiftHereDoc(<<' End-of-Here'), enables x11vnc server (user or xorg) End-of-Here - # depends on xorg to be configured - precedence => 80, + # waits for xorg to add configuration if needed + precedence => 70, }; } diff --git a/os-plugins/plugins/x11vnc/XX_x11vnc.sh b/os-plugins/plugins/x11vnc/XX_x11vnc.sh index 2c58665e..75346cd8 100644 --- a/os-plugins/plugins/x11vnc/XX_x11vnc.sh +++ b/os-plugins/plugins/x11vnc/XX_x11vnc.sh @@ -22,12 +22,19 @@ addvnc2xorg () { -e '/\"Module\"/a\\ \ Load "vnc"' \ -e '/n \"Device\"/a\\ \ Option "usevnc" "yes"' \ -e '/n \"Device\"/a\\ \ Option "rfbauth" "/etc/X11/vncpasswd"' \ - -i /mnt/etc/X11/xorg.conf - # password setting - echo "$x11vnc_pass" > /mnt/etc/X11/vncpasswd - echo -e "__BEGIN_VIEWONLY__\n$x11vnc_viewonlypass" >> /mnt/etc/X11/vncpasswd - # multiuser handling - sed -i "s/,/\n/" /mnt/etc/X11/vncpasswd + -e '/e \"Generic Mouse\"/a\\ \ InputDevice "VNC Keyboard" "ExtraKeyboard"' \ + -e '/e \"Generic Mouse\"/a\\ \ InputDevice "VNC Mouse" "ExtraPointer"' \ + -e '/\"CorePointer\"/ { +a\ +EndSection\ +Section "InputDevice"\ + Identifier "VNC Keyboard"\ + Driver "rfbkeyb"\ +EndSection\ +Section "InputDevice"\ + Identifier "VNC Mouse"\ + Driver "rfbmouse" +}' -i /mnt/etc/X11/xorg.conf } # main script @@ -116,6 +123,9 @@ if [ -e /initramfs/plugin-conf/x11vnc.conf ]; then # x11mod offers access to the running X server via module elif [ "$x11vnc_mode" = "x11mod" ]; then + # password setting (use stage4 environment) + echo -e "$x11vnc_pass\n$x11vnc_viewonlypass" | chroot /mnt vncpasswd -f \ + > /mnt/etc/X11/vncpasswd ( waitfor /mnt/etc/X11/xorg.conf 10000; addvnc2xorg ) & fi fi diff --git a/os-plugins/plugins/xserver/XX_xserver.sh b/os-plugins/plugins/xserver/XX_xserver.sh index ec4411bc..882da329 100644 --- a/os-plugins/plugins/xserver/XX_xserver.sh +++ b/os-plugins/plugins/xserver/XX_xserver.sh @@ -129,7 +129,7 @@ Section "Module" Load "dri" EndSection Section "InputDevice" - Identifier "Generic Keyboard" + Identifier "Generic Keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" |