-
Recently I found this video: I have been coding an embedded Linux program (by Avalonia 11.0.5) for embedded devices these days and I am thinking about how the user can control it with PC (windows platform). This is a bit different from traditional cross-platform, because I don't want to expose the functions of the embedded hardware as an interface to connect with programs on Windows. It seems we can control an Avalonia program directly via VNC Viewer in the video above. I looked up how to do it on Google, but I only saw a lot of people saying they did it, but no tutorials. And I found a related Nuget library (https://www.nuget.org/packages/Avalonia.Headless.Vnc/), but I don't understand how to use it. How can I achieve this? Are there any tutorials? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Yes, we have VNC server, yes https://github.com/AvaloniaUI/Avalonia/blob/master/src/Headless/Avalonia.Headless.Vnc/HeadlessVncPlatformExtensions.cs#L37-L40 VNC backend initially was a simple proof of concept, it wasn't much documented, but you can use it for sure. |
Beta Was this translation helpful? Give feedback.
-
@kyuranger Did you manage to do it? I think I'm in a similar situation to you. I did not manage to make it work. Also, did you want to show the app in both the embedded hardware and VNC? I want to do that but according to this this discussion #4608 it might not be possible... |
Beta Was this translation helpful? Give feedback.
Yes, we have VNC server, yes https://github.com/AvaloniaUI/Avalonia/blob/master/src/Headless/Avalonia.Headless.Vnc/HeadlessVncPlatformExtensions.cs#L37-L40
VNC backend initially was a simple proof of concept, it wasn't much documented, but you can use it for sure.
From my memory, the only sample is StartWithHeadlessVncPlatform usage in the ControlCatalog: https://github.com/AvaloniaUI/Avalonia/blob/master/samples/ControlCatalog.NetCore/Program.cs#L59C32-L59C60