noVNC + websockify - propagate vncpasswd and autoconnect

28 views
Skip to first unread message

Kevin Niland

unread,
May 28, 2024, 12:29:49 PMMay 28
to noVNC
Hi all,

I am trying to implement noVNC + websockify in my Docker image, whereby I can launch a desktop in my browser.

Right now, I have a script that starts up what I need and looks like this:

================================
#!/bin/bash

VNC_PASSWORD="passwrd"

vncpasswd <<EOF
$VNC_PASSWORD
$VNC_PASSWORD
n
EOF

xinit /etc/X11/xdm/Xsession startxfce4 -- /usr/bin/Xvnc :10 -auth $HOME/.Xauthority -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/Type1 -pn -rfbauth $HOME/.vnc/passwd -rfbport 5910 2>&1 &

x0vncserver -display :10

websockify -D --web /usr/share/novnc/ 0.0.0.0:6080 localhost:5910

sleep infinity

=================

This script is called from my entrypoint and I am able to visit localhost:6080/vnc.html to connect, enter my password, and view the desktop.
However, I want the connecting and password entry to happen in the background and unbeknownst to the user. I know I can do http://127.0.0.1:6080/vnc.html?autoconnect=true&password=passwrd to do this but this is obviously not secure.

Is there a way I can handle all this in the background? Is there a way to autoconnect and propagate the password from .vnc/passwd to this that is supported by noVNC/websockify?

Pierre Ossman

unread,
May 30, 2024, 8:47:03 AMMay 30
to no...@googlegroups.com, Kevin Niland
On 28/05/2024 18:29, Kevin Niland wrote:
>
> This script is called from my entrypoint and I am able to visit
> localhost:6080/vnc.html to connect, enter my password, and view the desktop.
> However, I want the connecting and password entry to happen in the
> background and unbeknownst to the user. I know I can do
> http://127.0.0.1:6080/vnc.html?autoconnect=true&password=passwrd to do this
> but this is obviously not secure.
>

The user has to have something secret for things to be secure, so there
needs to be something provided. How do you identify your users from any
random person visiting your server?

Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

sedi hilary

unread,
Jun 3, 2024, 3:08:41 AMJun 3
to no...@googlegroups.com
Can I get a well and secured sock5 IP? 

--
You received this message because you are subscribed to the Google Groups "noVNC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to novnc+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/novnc/c412f03f-c5f3-4479-bdda-6facee25dc0an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages