Browse Source

passwordless vnc with socket auth

pull/1/head
parent
commit
0c31fb3494
2 changed files with 3 additions and 4 deletions
  1. +2
    -2
      templates/workspaces/workspace.space.fish.j2
  2. +1
    -2
      vars/main.yaml

+ 2
- 2
templates/workspaces/workspace.space.fish.j2 View File

@@ -7,7 +7,7 @@ exec urxvt -title tmux-workspace -e fish -c 'ssh -t {{workspaces[workspace].host


{% elif "vncviewer" in workspaces[workspace].type %} {% elif "vncviewer" in workspaces[workspace].type %}


{% if workspaces[workspace].fetch_vnc_passsword_file | default(true) %}
{% if workspaces[workspace].fetch_vnc_passsword_file | default(false) %}
if not test -d ~/.vnc/passwd.{{workspaces[workspace].host}} if not test -d ~/.vnc/passwd.{{workspaces[workspace].host}}
rsync {{workspaces[workspace].host}}:~/.vnc/passwd ~/.vnc/passwd.{{workspaces[workspace].host}} rsync {{workspaces[workspace].host}}:~/.vnc/passwd ~/.vnc/passwd.{{workspaces[workspace].host}}
end end
@@ -16,7 +16,7 @@ end
{% if workspaces[workspace].type == "vncviewer-ssh-socket" %} {% if workspaces[workspace].type == "vncviewer-ssh-socket" %}


socat "UNIX-LISTEN:.vnc/socket.anix,reuseaddr" EXEC:'ssh {{workspaces[workspace].host}} socat STDIO UNIX-CONNECT\:.vnc/socket' & socat "UNIX-LISTEN:.vnc/socket.anix,reuseaddr" EXEC:'ssh {{workspaces[workspace].host}} socat STDIO UNIX-CONNECT\:.vnc/socket' &
exec xtigervncviewer .vnc/socket.{{workspaces[workspace].host}} -PasswordFile ~/.vnc/passwd.{{workspaces[workspace].host}}
exec xtigervncviewer .vnc/socket.{{workspaces[workspace].host}}


{% elif workspaces[workspace].type == "vncviewer-ssh-tcp" %} {% elif workspaces[workspace].type == "vncviewer-ssh-tcp" %}




+ 1
- 2
vars/main.yaml View File

@@ -140,12 +140,11 @@ vncserver_options: |
-geometry {{home_vncserver_geometry}} -geometry {{home_vncserver_geometry}}
-depth 24 -depth 24
-rfbwait 30000 -rfbwait 30000
-rfbauth %h/.vnc/passwd
-rfbunixpath %h/.vnc/socket -rfbunixpath %h/.vnc/socket
-nolisten tcp -nolisten tcp
-pn -pn
-localhost -localhost
-SecurityTypes VncAuth
-SecurityTypes None
{% if not home_vncserver_allow_resize %} {% if not home_vncserver_allow_resize %}
-AcceptSetDesktopSize=0 -AcceptSetDesktopSize=0
{% endif %} {% endif %}