Can't use VNC [SOLVED!]

I’ve had a crazy idea… What about… noVNC

what, you mean find a way to launch x11vnc from the web gui, and then launch noVNC inside a web page to connect to it? Insane idea! Let’s do it,

Ok, so it’s pretty easy. The hard bit is sorting out the new buster vnc server which has changed from vnc4server to tigervnc-server. If you do apt install vnc4server you then have to edit /etc/vnc.conf. Add the line $SecurityTypes = "None". You probably want to comment out the line starting $geometry as it’s set to huge.

Then run vncserver It now shouldn’t ask you for a password and launch the server listening at display :1. This is localhost connection only so if you want to use a standard vnc viewer you will have to tunnel through ssh.

Then

git clone https://github.com/novnc/noVNC.git
cd noVNC
./utils/launch.sh --vnc localhost:1

This will throw up

root@zynthian:~/noVNC# ./utils/launch.sh --vnc localhost:1
Warning: could not find self.pem
Using local websockify at /root/noVNC/utils/websockify/run
Starting webserver and WebSockets proxy on port 6080
websockify/websocket.py:30: UserWarning: no 'numpy' module, HyBi protocol will be slower
  warnings.warn("no 'numpy' module, HyBi protocol will be slower")
WebSocket server settings:
  - Listen on :6080
  - Web server. Web root: /root/noVNC
  - No SSL/TLS support (no cert file)
  - proxying from :6080 to localhost:1


Navigate to this URL:

    http://zynthian:6080/vnc.html?host=zynthian&port=6080

Press Ctrl-C to exit

Browse to the url and hit connect. You should get a big black screen.

Connect another ssh session to the zynth and run something like DISPLAY=:1 zynaddsubfx and the gui should launch in the web page.

I’ll leave proper full integration as an exercise for the reader.

edit: I think the wm being used in that screenshot is matchbox. If you install blackbox you might get a nice wm.

3 Likes

Amazing solution !!!

1 Like

Hi @zynthianers!

I just added noVNC integration. It’s enabled when enabling the VNC Server from UI’s admin or from webconf (UI options). Once it’s enabled, you can point your browser to:

http://zynthian.local:6080/vnc.html

for having super-easy access to the engine’s native UI. Also, a link is available on webconf’s software menu.

Please, update and test.

Enjoy … and thanks for clearing the way!!

2 Likes

Wow, that’s great! the “NoVNC” works quite nicely (using the direct link).

If it was intended that there is a link appearing in the software menu of the webconfig when the VNC server is on, it does not appear for me there.

I did find another issue: the UI options from the webconfig crashed for me:

http://zynthian.local/ui-options
500: Internal Server Error

@jofemodo - you have made my day ! Works perfect !

1 Like

You have to reload the webconf after enabling the VNC Server from the UI.

Curious. I can’t reproduce the error. Could you send the webconf log? From the terminal:

journalctl -u zynthian-webconf -f

and then provoke the error and copy/paste de error from the terminal.

Thanks!

hi @jofemodo,

Both issues magically disappeared while I tried to reproduce them again this morning after a reboot (and another update just to make sure).

Thanks :slight_smile:

3 Likes

Yea, I just dove into the possibilities of smaller, cheaper headless Zenthians relying on mobile device UI

Ok, so prior to this, I had the zynth display available via VNC on 5900… now I have the secondary screen on 5901 instead… any way i can have both?

I made it in there one time and at my second try noVNC doesn’t let me Connect. Very frustrating. noVNC server running, but no way to get on my zynthian. it worked nicely one time and I did it like explained above. no idea what is going on.

1 Like

bin off that old script. you’re supposed to be starting it in the admin on the zynthian and connecting using the zynthian webconfig page.

There is no option to show the instrument GUI via zynthian.local

With VNC viewer i can access the Zynthian UI, but i don’t need that. I have a touch screen.

noVNC did show it nicely, but only once.
I suspect some sort of security issue.

I am still stuck getting the original vnc screen on 5900… can we please get both options on the menu?

What is the feature request reference for this?

Please enable vnc:5900 via menu for the main zynthian screen (as well as vnc:5901 for instruments) · Issue #447 · zynthian/zynthian-issue-tracking · GitHub Here!

1 Like

Many boots ago I enabled VNC server in the web.config. That was not enough to connect with VNC for me. It seems I also had to use raspi-config, which failed the first night I tried it as it could not find libavahi-glibl on the net, but the next morning it found it.

I saw the noVNC connect window one time at that URL, but the connect button would not work. I tried rebooting, now I dont get anything at that url except “Refused to connect”

From the admin screen via the zynth display sized VNC window, going to admin, VNC server is not checkmarked, and it refuses to checkmark…

With a fresh install of ZynthianOS 2104, enabling VNC Server in webconf and pressing the Save button then connecting VNC Viewer to zynthian.local:5901 I can see Zynthian’s secondary display:

There is a ticket open requesting another VNC server port be opened to display the main UI which I am looking at.

Will you please explain what ZynthianOS image you have flashed to your Zynthian? What updates you have applied since? Any other info that might impact this? I would expect this to work out of the box like it does for me. If you can reflash the image and start from scratch and it doesn’t work then we can try to trace what external elements are influencing this.

2 Likes

I am restarting with fresh image. Software I am using was downloaded two days ago, stable.

Linux command prompt shows:

########################## ----------------------------------------

# ZynthianOS: Built on os.zynthian.org

## # Timestamp: 2020-09-05

## # # ## # Optimized: Raspberry Pi 3 Model B Plus

# # # # # # # ----------------------------------------

# # # # # # ### Kit: Custom

# # # # # # # # # Display: Generic HDMI Display

## # # # # ## # Soundcard: RBPi Headphones

## ## # Wiring Layout: DUMMIES

# ----------------------------------------

##########################
zynthian-ui: stable (01c808)
zynthian-webconf: stable (b64c73)
zyncoder: stable (d852c8)
zynthian-sys: stable (140eac)
zynthian-data: stable (194fd5)
---------------------------------------

Linux zynthian 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l

Web.conf shows this:

SOFTWARE

zyncoder: stable (d852c8f)
zynthian-ui: stable (01c808c)
zynthian-sys: stable (140eac7)
zynthian-data: stable (194fd59)
zynthian-webconf: stable (b64c737)

VNC to zynthian.local:5901 does show me the above screen, with the addition of an xterm window.

I am trying to setup headless version. VNC directly to zynthian.local is not working, connection refused. On my image yesterday, raspi-config kept complaining a package was missing when i attempted to enable VNC with it two nights ago. Somehow repeating that step many times, and the package was found. Then i was able to VNC to zynthian.local and get a display that looks like what is shown on the kit, and select different layers, etc. I never had a launch of GUI for any of the synths. Have XQuartz setup on Mac, and other XWindows on Windows and Android, and none of them ever show an xwindow coming up when I ssh -Y, I only get logged into a linux command prompt.

With fresh image tonight, I am getting the same error about missing package when i use the raspi-config instructions I found elsewhere here. Here are my steps;

Flash image from 2021/05/19
VNC does not connect
login to http://zynthian.local
Hardware → Kit → Custom
Hardware → Audio → Soundcard → Rbpi Headphones
Configure internet: System → Wifi → Add Network. (Right now am used wired ethernet.)

Hardware / Display   / Generic HDMI Display 
Hardware / Wiring   / DUMMIES

System → Reboot

webconf:

interface → UI options
enable vnc Server
enable cursor
enable touch widgets

VNC refuses to connect at this point.
From XQuartz xterm → SSH -Y does not launch and xwindow

At Zynthian shell prompt, used raspi-config, UI Options, to enable VNC Server
Rapsi-config gave this message:
Unit vncserver-x11-serviced.service could not be found.
It then proceeded to list 2 packages to upgrafe, and 48 to newly install.

Err:39 http://raspbian.raspberrypi.org/raspbian buster/main armhf libavahi-glib1 armhf 0.7-4+b1
404 Not Found [IP: 93.93.128.193 80]

E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/a/avahi/libavahi-glib1_0.7-4+b1_armhf.deb 404 Not Found [IP: 93.93.128.193 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?