mirror of
https://github.com/fredrikr79/nixos.git
synced 2026-01-10 00:43:47 +01:00
add password auth to x11vnc
This commit is contained in:
@@ -154,18 +154,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# services.x11vnc = {
|
||||
# enable = true;
|
||||
# display = ":0"; # use existing x session
|
||||
# auth = null; # uses current x session auth
|
||||
# loop = true;
|
||||
# extraOptions = [
|
||||
# "-forever" # keep open
|
||||
# "-shared" # multiple clients
|
||||
# "-nopw" # no password
|
||||
# "-rfbport 5900" # vnc port
|
||||
# ];
|
||||
# };
|
||||
systemd.services.x11vnc = {
|
||||
description = "x11vnc server for mirroring x display";
|
||||
after = [ "display-manager.service" ];
|
||||
@@ -173,11 +161,20 @@ in
|
||||
serviceConfig = {
|
||||
# ExecStart = "${pkgs.x11vnc}/bin/x11vnc -display :0 -forever -nopw -rfbport 5900 -auth /home/fredrikr/.Xauthority";
|
||||
ExecStart = ''
|
||||
${pkgs.x11vnc}/bin/x11vnc -display :0 -forever -shared -nopw -rfbport 5900 -listen 0.0.0.0 -auth /home/fredrikr/.Xauthority \
|
||||
-ncache 10 -ncache_cr -repeat -xkb -noxdamage
|
||||
${pkgs.x11vnc}/bin/x11vnc -display :0 -forever -shared -usepw \
|
||||
-rfbport 5900 -listen 0.0.0.0 \
|
||||
-auth /home/fredrikr/.Xauthority \
|
||||
# -ncache 10 -ncache_cr \
|
||||
-repeat -xkb -noxdamage \
|
||||
-tightfilexfer -xrandr -many \
|
||||
-clip 1920x1080 # Adjust if needed
|
||||
-clip 1920x1080+0+0 \
|
||||
-geometry 1920x1080 \
|
||||
-noxinerama \
|
||||
-grabptr -grabkbd -noxrecord -noxfixes \
|
||||
-rfbauth /home/fredrikr/.vnc/passwd
|
||||
# -ssl -sslverify -sslcert /home/fredrikr/x11vnc-ssl.pem -sslCipher ALL \
|
||||
'';
|
||||
# TODO: add ssl encryption to vnc connection
|
||||
Restart = "always";
|
||||
User = "fredrikr";
|
||||
Environment = "DISPLAY=:0";
|
||||
@@ -280,6 +277,7 @@ in {
|
||||
alsa-utils
|
||||
x11vnc
|
||||
gawk
|
||||
openssl
|
||||
]);
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
||||
Reference in New Issue
Block a user