SlideShare uma empresa Scribd logo
Screen Sharing on Raspberry Pi 5 Using VNC in
Weston and Wayland with the Yocto Project and
OpenEmbedded
Leon Anavi
Konsulko Group
leon.anavi@konsulko.com
leon@anavi.org
FOSDEM 2024
FOSDEM 2024, Leon Anavi
In Previous Episode
FOSDEM 2024, Leon Anavi
Agenda
 Wayland and Weston
 VNC
 Weston and the Yocto Project Releases
 core-image-weston with VNC demo on
Raspberry Pi 5
FOSDEM 2024, Leon Anavi
Wayland & Weston
 Wayland is a display protocol that specifies the communication between a display
server and its clients
 Started in 2008 with the aim to replace the X Window System in GNU/Linux and
Unix-based distributions
 Security by design through isolation of the input and output of every window
 Weston is the reference Wayland compositor, there are many other compositors
 Weston 13.0 was released on November 27, 2023
FOSDEM 2024, Leon Anavi
Remote Desktop Options in Weston and Wayland
 Remote Desktop Protocol (RDP)
 Virtual Network Computing (VNC)
FOSDEM 2024, Leon Anavi
Virtual Network Computing (VNC)
 Graphical desktop-sharing system based on Remote Frame Buffer protocol (RFB)
 Initially Olivetti Research Laboratory developed and published RFB in 1998, next
versions of the protocol were published by RealVNC Ltd
 Pixel based
 Works with all windowing systems and applications, including MS Windows, Mac
OS, X11 and Wayland
FOSDEM 2024, Leon Anavi
RDP vs VNC
RDP
(Remote Desktop Protocol)
VNC
(Virtual Network Computing)
Protocol ITU-T T.128 Remote Frame Buffer
protocol (RFB)
Type Semantic (aware of controls, fonts
and other graphical primitives)
Pixel based
Weston version 2.0 and newer 12.0 and newer
Weston support
since
2016 2022
FOSDEM 2024, Leon Anavi
VNC in Weston
FOSDEM 2024, Leon Anavi
 VNC in Weston
FOSDEM 2024, Leon Anavi
VNC in Weston
 VNC backend is available in Weston 12 and newer version
 VNC backend for Weston depends on NeatVNC
 NeatVNC is an open source VNC server library with a clean interface, started by
Andri Yngvason with code available at GitHub under ISC license
 NeatVNC has build dependencies on libdrm, meson and pkg-config
 NeatVNC has a runtime dependency on aml (Andri's Main Loop)
FOSDEM 2024, Leon Anavi
The Yocto Project
 Open source collaborative project of the Linux foundation for creating custom
Linux-based distributions for embedded devices using the OpenEmbedded Build
System
 OpenEmbedded Build System includes BitBake and OpenEmbedded Core
 Poky is a reference distribution of the Yocto Project provided as metadata, without
binary files, to bootstrap your own distribution for embedded devices
 Bi-annual release cycle
 Long term support (LTS) release covering two-year period
FOSDEM 2024, Leon Anavi
The Yocto Project Releases
Codename Version Release Date Support Level
Scarthgap 5.0 April 2024
Future – LTS (until
April 2028)
Nanbield 4.3 November 2023 Until May 2024
Kirkstone 4.0 May 2022 LTS (until Apr. 2026)
Dunfell 3.1 April 2020 LTS (until Apr. 2024)
FOSDEM 2024, Leon Anavi
Wayland and Weston in Yocto and OpenEmbedded
 OpenEmbedded-Core is a layer containing the core metadata for current versions
of OpenEmbedded
 OpenEmbedded-Core provides recipes for Wayland and Weston
FOSDEM 2024, Leon Anavi
The Yocto Project, Wayland and Weston Versions
Codename Version Wayland Weston
Scarthgap 5.0 1.22 (?) 13.0.0 (?)
Nanbield 4.3 1.22 12.0.2
Kirkstone 4.0 1.20 10.0.2
Dunfell 3.1 1.18 8.0.0
FOSDEM 2024, Leon Anavi
Bitbaking Weston with VNC
Extend the recipe for building Weston:
 Enable VNC backend:
PACKAGECONFIG:append = " vnc"
This will enable -Dbackend-vnc=true and add neatvnc (from layer meta-oe) as a
build dependency
 Place a PAM configuration file in the package:
FILES:${PN}:append = " ${sysconfdir}/pam.d/weston-remote-access"
 For example, weston_%.bbappend:
https://github.com/leon-anavi/meta-weston-remote-desktop/blob/main/meta-weston-vnc/recipes-graphics/
wayland/weston_%25.bbappend
FOSDEM 2024, Leon Anavi
aml and neatvnc in meta-oe
FOSDEM 2024, Leon Anavi
Bitbaking NeatVNC for Weston with VNC
 Enable TLS:
PACKAGECONFIG:append = " tls"
 libweston/backend-vnc/meson.build from Weston 12 and 13:
dep_neatvnc = dependency('neatvnc', version: ['>= 0.6.0', '< 0.7.0'], required: false, fallback: ['neatvnc', 'neatvnc_dep'])
 libweston/backend-vnc/meson.build from Weston branch main:
dep_neatvnc = dependency('neatvnc', version: ['>= 0.7.0', '< 0.8.0'], required: false, fallback: ['neatvnc', 'neatvnc_dep'])
 Select NeatVNC matching Weston requirements, for example:
PREFERRED_VERSION_neatvnc = "git"
FOSDEM 2024, Leon Anavi
weston-init.bbappend
 Set password weston (from mkpasswd -m sha256crypt) for user weston:
WESTONPASSWD = "$5$409x651F5vyY1.4o$Iuplll7/qNSEcflYNjH..0zwylmyLsbZdZGS6hBcro5"
USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G
video,input,render,wayland -p '${WESTONPASSWD}' weston"
 Create a directory on the target device to store TLS key and certificate:
do_install:append(){
install -m 0755 -d ${D}${sysconfdir}/vnc/keys/
chown weston:weston ${D}${sysconfdir}/vnc/keys/
}
FILES:${PN} += "
${sysconfdir}/vnc/keys 
"
FOSDEM 2024, Leon Anavi
TLS security
 Generate a key and certificate files to use with TLS security:
mkdir -p ~/.pki/CA/private/
cd ~/.pki/CA
openssl genrsa -out private/cakey.pem 2048
openssl req -new -x509 -nodes -days 365000 -key private/cakey.pem -out
cacert.pem
openssl genrsa -out tls.key 2048
openssl req -new -key tls.key -out tls.csr
openssl req -new -key tls.key -out tls.csr -subj "/CN=raspberrypi5"
openssl x509 -req -days 365 -in tls.csr -out tls.crt -CA cacert.pem -CAkey
private/cakey.pem
FOSDEM 2024, Leon Anavi
Using VNC on Weston
 Copy tls.crt and tls.key to /etc/vnc/keys on the target device, e.g. Raspberry Pi 5
 Enable VNC screen sharing in /etc/xdg/weston/weston.ini:
[screen-share]
command=/usr/bin/weston --backend=vnc-backend.so
--vnc-tls-cert=/etc/vnc/keys/tls.crt --vnc-tls-key=/etc/vnc/keys/tls.key --
shell=fullscreen-shell.so
 After loading Weston, press ctrl+alt+s to launch screen sharing
FOSDEM 2024, Leon Anavi
VNC Automatic Startup
 Launch Weston with screen-share.so, for example in Weston systemd service:
ExecStart=/usr/bin/weston --modules=systemd-notify.so,screen-share.so
 Add start-on-startup=true to section [screen-share] in weston.ini:
[screen-share]
command=/usr/bin/weston --backend=vnc-backend.so
--vnc-tls-cert=/etc/vnc/keys/tls.crt --vnc-tls-key=/etc/vnc/keys/tls.key --
shell=fullscreen-shell.so
start-on-startup=true
FOSDEM 2024, Leon Anavi
Remote Connection
 From another computer in the same network connect to the embedded device
using a VNC client, for example with vinagre, an open source remote desktop
viewer for Linux and the GNOME Desktop:
vinagre --gtk-vnc-debug
FOSDEM 2024, Leon Anavi
VNC Demo
 Vinagre on Ubuntu
22.04.3 LTS with X11 and
GNOME 42.9
 core-image-weston with
Weston version 12.0.2 on
Raspberry Pi 5 (using BSP
layer meta-raspberrypi)
FOSDEM 2024, Leon Anavi
VNC Frames per Second on Raspberry Pi 5
 With VNC enabled
weston-simple-egl
runs with up to 20fps
on Raspberry Pi 5
FOSDEM 2024, Leon Anavi
QA
 Raspberry Pi 5
 Raspberry Pi 4
 ROCK Pi 4
 Toradex Verdin i.MX8M Plus SoM
 Notes:
As of the moment Weston 12 (or newer) with etnaviv open source driver should
be used on NXP i.MX6, i.MX7, i.MX8, etc.
The fork weston-imx for Vivante proprietary GPU driver hasn’t been upgraded to
Weston 12 yet. Therefore VNC backend is still not available in weston-imx.
FOSDEM 2024, Leon Anavi
Conclusions
 VNC is a pixel based graphical desktop-sharing system
 VNC backend was added in Weston version 12
 VNC backend in Weston depends on NeatVNC and aml
 Generate appropriate key and certificate files for TLS encryption
 The latest versions of the Yocto Project and OpenEmbedded provide the
necessary tools and dependencies to build core-image-weston and to enable VNC
 Layer meta-weston-remote-desktop provides example integrations of both VNC
and RDP in Weston
FOSDEM 2024, Leon Anavi
Thank You!
Useful links
 Wayland
https://wayland.freedesktop.org/
 Weston source code
https://gitlab.freedesktop.org/wayland/weston
 The Yocto Project
https://www.yoctoproject.org/
 The Yocto Project releases
https://wiki.yoctoproject.org/wiki/Releases
 Simple example Yocto/OE layer for VNC and RDP on Weston:
https://github.com/leon-anavi/meta-weston-remote-desktop/tree/main

Mais conteúdo relacionado

Semelhante a Screen Sharing on Raspberry Pi 5 Using VNC in Weston and Wayland with the Yocto Project and OpenEmbedded

OVS-NFV Tutorial
OVS-NFV TutorialOVS-NFV Tutorial
"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016
Phil Estes
 
Docker from scratch
Docker from scratchDocker from scratch
Docker from scratch
Michał Wójtowicz
 
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
DynamicInfraDays
 
How to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux DevicesHow to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux Devices
Leon Anavi
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Partner S.A.
 
Issues of OpenStack multi-region mode
Issues of OpenStack multi-region modeIssues of OpenStack multi-region mode
Issues of OpenStack multi-region mode
Joe Huang
 
High Performance Computing and Open Source & Linux Technical Excellence Sympo...
High Performance Computing and Open Source & Linux Technical Excellence Sympo...High Performance Computing and Open Source & Linux Technical Excellence Sympo...
High Performance Computing and Open Source & Linux Technical Excellence Sympo...
Gonéri Le Bouder
 
DockerCon17 - Beyond the backslash
DockerCon17 - Beyond the backslashDockerCon17 - Beyond the backslash
DockerCon17 - Beyond the backslash
Taylor Brown
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
Soshi Nemoto
 
Docker con osdk_ver1.0
Docker con osdk_ver1.0Docker con osdk_ver1.0
Docker con osdk_ver1.0
Shunjiro Yatsuzuka
 
Kubernetes networking-made-easy-with-open-v switch
Kubernetes networking-made-easy-with-open-v switchKubernetes networking-made-easy-with-open-v switch
Kubernetes networking-made-easy-with-open-v switch
InfraEngineer
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
Ruoshi Ling
 
Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017
Patrick Chanezon
 
DockerとKubernetesをかけめぐる
DockerとKubernetesをかけめぐるDockerとKubernetesをかけめぐる
DockerとKubernetesをかけめぐる
Kohei Tokunaga
 
Installing OpenCV 2.3.1 with Qt
Installing OpenCV 2.3.1 with QtInstalling OpenCV 2.3.1 with Qt
Installing OpenCV 2.3.1 with Qt
Luigi De Russis
 
Open stack icehouse microsoftupdate
Open stack icehouse microsoftupdateOpen stack icehouse microsoftupdate
Open stack icehouse microsoftupdate
Kamesh Pemmaraju
 
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Mike Qin
 
Apt get no more let Vagrant, Puppet and Docker take the stage
Apt get no more let Vagrant, Puppet and Docker take the stageApt get no more let Vagrant, Puppet and Docker take the stage
Apt get no more let Vagrant, Puppet and Docker take the stage
Alessandro Cinelli (cirpo)
 
Software Composition Analysis in PHP
Software Composition Analysis in PHP Software Composition Analysis in PHP
Software Composition Analysis in PHP
Piotr Horzycki
 

Semelhante a Screen Sharing on Raspberry Pi 5 Using VNC in Weston and Wayland with the Yocto Project and OpenEmbedded (20)

OVS-NFV Tutorial
OVS-NFV TutorialOVS-NFV Tutorial
OVS-NFV Tutorial
 
"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016
 
Docker from scratch
Docker from scratchDocker from scratch
Docker from scratch
 
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
 
How to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux DevicesHow to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux Devices
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: Introduction
 
Issues of OpenStack multi-region mode
Issues of OpenStack multi-region modeIssues of OpenStack multi-region mode
Issues of OpenStack multi-region mode
 
High Performance Computing and Open Source & Linux Technical Excellence Sympo...
High Performance Computing and Open Source & Linux Technical Excellence Sympo...High Performance Computing and Open Source & Linux Technical Excellence Sympo...
High Performance Computing and Open Source & Linux Technical Excellence Sympo...
 
DockerCon17 - Beyond the backslash
DockerCon17 - Beyond the backslashDockerCon17 - Beyond the backslash
DockerCon17 - Beyond the backslash
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
 
Docker con osdk_ver1.0
Docker con osdk_ver1.0Docker con osdk_ver1.0
Docker con osdk_ver1.0
 
Kubernetes networking-made-easy-with-open-v switch
Kubernetes networking-made-easy-with-open-v switchKubernetes networking-made-easy-with-open-v switch
Kubernetes networking-made-easy-with-open-v switch
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
 
Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017
 
DockerとKubernetesをかけめぐる
DockerとKubernetesをかけめぐるDockerとKubernetesをかけめぐる
DockerとKubernetesをかけめぐる
 
Installing OpenCV 2.3.1 with Qt
Installing OpenCV 2.3.1 with QtInstalling OpenCV 2.3.1 with Qt
Installing OpenCV 2.3.1 with Qt
 
Open stack icehouse microsoftupdate
Open stack icehouse microsoftupdateOpen stack icehouse microsoftupdate
Open stack icehouse microsoftupdate
 
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
 
Apt get no more let Vagrant, Puppet and Docker take the stage
Apt get no more let Vagrant, Puppet and Docker take the stageApt get no more let Vagrant, Puppet and Docker take the stage
Apt get no more let Vagrant, Puppet and Docker take the stage
 
Software Composition Analysis in PHP
Software Composition Analysis in PHP Software Composition Analysis in PHP
Software Composition Analysis in PHP
 

Mais de Leon Anavi

Как да играем компютърни игри с Nintendo Wii Nunchuk чрез Raspberry Pi RP2040...
Как да играем компютърни игри с Nintendo Wii Nunchuk чрез Raspberry Pi RP2040...Как да играем компютърни игри с Nintendo Wii Nunchuk чрез Raspberry Pi RP2040...
Как да играем компютърни игри с Nintendo Wii Nunchuk чрез Raspberry Pi RP2040...
Leon Anavi
 
Как да убием и последната дискета с Open Source технологии?
Как да убием и последната дискета с Open Source технологии?Как да убием и последната дискета с Open Source технологии?
Как да убием и последната дискета с Open Source технологии?
Leon Anavi
 
Linux обновления с RAUC и Docker
Linux обновления с RAUC и DockerLinux обновления с RAUC и Docker
Linux обновления с RAUC и Docker
Leon Anavi
 
Open Hardware Makers
Open Hardware MakersOpen Hardware Makers
Open Hardware Makers
Leon Anavi
 
Open Source Tools for Making Open Source Hardware
Open Source Tools for Making Open Source HardwareOpen Source Tools for Making Open Source Hardware
Open Source Tools for Making Open Source Hardware
Leon Anavi
 
Linux дистрибуции и софтуерни обновления за вградени устройства
Linux дистрибуции и софтуерни обновления за вградени устройства Linux дистрибуции и софтуерни обновления за вградени устройства
Linux дистрибуции и софтуерни обновления за вградени устройства
Leon Anavi
 
Getting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry PiGetting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry Pi
Leon Anavi
 
Automotive Grade Linux on Raspberry Pi: How Does It Work?
Automotive Grade Linux on Raspberry Pi: How Does It Work?Automotive Grade Linux on Raspberry Pi: How Does It Work?
Automotive Grade Linux on Raspberry Pi: How Does It Work?
Leon Anavi
 
Comparison of Open Source Software Home Automation Tools
Comparison of Open Source Software Home Automation ToolsComparison of Open Source Software Home Automation Tools
Comparison of Open Source Software Home Automation Tools
Leon Anavi
 
Практични примери за device tree overlays на Raspberry Pi
Практични примери за device tree overlays на Raspberry PiПрактични примери за device tree overlays на Raspberry Pi
Практични примери за device tree overlays на Raspberry Pi
Leon Anavi
 
The Software Developer’s Guide to Open Source Hardware
The Software Developer’s Guide to Open Source HardwareThe Software Developer’s Guide to Open Source Hardware
The Software Developer’s Guide to Open Source Hardware
Leon Anavi
 
Making Open Source Hardware for Retrogaming on Raspberry Pi
Making Open Source Hardware for Retrogaming on Raspberry PiMaking Open Source Hardware for Retrogaming on Raspberry Pi
Making Open Source Hardware for Retrogaming on Raspberry Pi
Leon Anavi
 
Вграждане на умни гласови асистенти в устройства с Linux
Вграждане на умни гласови асистенти в устройства с LinuxВграждане на умни гласови асистенти в устройства с Linux
Вграждане на умни гласови асистенти в устройства с Linux
Leon Anavi
 
Comparison of Voice Assistant SDKs for Embedded Linux Devices
 Comparison of Voice Assistant SDKs for Embedded Linux Devices Comparison of Voice Assistant SDKs for Embedded Linux Devices
Comparison of Voice Assistant SDKs for Embedded Linux Devices
Leon Anavi
 
Open Source MQTT Brokers
Open Source MQTT BrokersOpen Source MQTT Brokers
Open Source MQTT Brokers
Leon Anavi
 
Въведение в RetroPie за Raspberry Pi
Въведение в RetroPie за Raspberry PiВъведение в RetroPie за Raspberry Pi
Въведение в RetroPie за Raspberry Pi
Leon Anavi
 
Free and Open Source Software Tools for Making Open Source Hardware
 Free and Open Source Software Tools for Making Open Source Hardware Free and Open Source Software Tools for Making Open Source Hardware
Free and Open Source Software Tools for Making Open Source Hardware
Leon Anavi
 
Building a Remote Control Robot with Automotive Grade Linux
Building a Remote Control Robot with Automotive Grade LinuxBuilding a Remote Control Robot with Automotive Grade Linux
Building a Remote Control Robot with Automotive Grade Linux
Leon Anavi
 
Връщане към живота на ретро електроника с Raspberry Pi
Връщане към живота на ретро електроника с Raspberry PiВръщане към живота на ретро електроника с Raspberry Pi
Връщане към живота на ретро електроника с Raspberry Pi
Leon Anavi
 
Open Source Hardware with KiCAD and OSHPark
Open Source Hardware with KiCAD and OSHParkOpen Source Hardware with KiCAD and OSHPark
Open Source Hardware with KiCAD and OSHPark
Leon Anavi
 

Mais de Leon Anavi (20)

Как да играем компютърни игри с Nintendo Wii Nunchuk чрез Raspberry Pi RP2040...
Как да играем компютърни игри с Nintendo Wii Nunchuk чрез Raspberry Pi RP2040...Как да играем компютърни игри с Nintendo Wii Nunchuk чрез Raspberry Pi RP2040...
Как да играем компютърни игри с Nintendo Wii Nunchuk чрез Raspberry Pi RP2040...
 
Как да убием и последната дискета с Open Source технологии?
Как да убием и последната дискета с Open Source технологии?Как да убием и последната дискета с Open Source технологии?
Как да убием и последната дискета с Open Source технологии?
 
Linux обновления с RAUC и Docker
Linux обновления с RAUC и DockerLinux обновления с RAUC и Docker
Linux обновления с RAUC и Docker
 
Open Hardware Makers
Open Hardware MakersOpen Hardware Makers
Open Hardware Makers
 
Open Source Tools for Making Open Source Hardware
Open Source Tools for Making Open Source HardwareOpen Source Tools for Making Open Source Hardware
Open Source Tools for Making Open Source Hardware
 
Linux дистрибуции и софтуерни обновления за вградени устройства
Linux дистрибуции и софтуерни обновления за вградени устройства Linux дистрибуции и софтуерни обновления за вградени устройства
Linux дистрибуции и софтуерни обновления за вградени устройства
 
Getting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry PiGetting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry Pi
 
Automotive Grade Linux on Raspberry Pi: How Does It Work?
Automotive Grade Linux on Raspberry Pi: How Does It Work?Automotive Grade Linux on Raspberry Pi: How Does It Work?
Automotive Grade Linux on Raspberry Pi: How Does It Work?
 
Comparison of Open Source Software Home Automation Tools
Comparison of Open Source Software Home Automation ToolsComparison of Open Source Software Home Automation Tools
Comparison of Open Source Software Home Automation Tools
 
Практични примери за device tree overlays на Raspberry Pi
Практични примери за device tree overlays на Raspberry PiПрактични примери за device tree overlays на Raspberry Pi
Практични примери за device tree overlays на Raspberry Pi
 
The Software Developer’s Guide to Open Source Hardware
The Software Developer’s Guide to Open Source HardwareThe Software Developer’s Guide to Open Source Hardware
The Software Developer’s Guide to Open Source Hardware
 
Making Open Source Hardware for Retrogaming on Raspberry Pi
Making Open Source Hardware for Retrogaming on Raspberry PiMaking Open Source Hardware for Retrogaming on Raspberry Pi
Making Open Source Hardware for Retrogaming on Raspberry Pi
 
Вграждане на умни гласови асистенти в устройства с Linux
Вграждане на умни гласови асистенти в устройства с LinuxВграждане на умни гласови асистенти в устройства с Linux
Вграждане на умни гласови асистенти в устройства с Linux
 
Comparison of Voice Assistant SDKs for Embedded Linux Devices
 Comparison of Voice Assistant SDKs for Embedded Linux Devices Comparison of Voice Assistant SDKs for Embedded Linux Devices
Comparison of Voice Assistant SDKs for Embedded Linux Devices
 
Open Source MQTT Brokers
Open Source MQTT BrokersOpen Source MQTT Brokers
Open Source MQTT Brokers
 
Въведение в RetroPie за Raspberry Pi
Въведение в RetroPie за Raspberry PiВъведение в RetroPie за Raspberry Pi
Въведение в RetroPie за Raspberry Pi
 
Free and Open Source Software Tools for Making Open Source Hardware
 Free and Open Source Software Tools for Making Open Source Hardware Free and Open Source Software Tools for Making Open Source Hardware
Free and Open Source Software Tools for Making Open Source Hardware
 
Building a Remote Control Robot with Automotive Grade Linux
Building a Remote Control Robot with Automotive Grade LinuxBuilding a Remote Control Robot with Automotive Grade Linux
Building a Remote Control Robot with Automotive Grade Linux
 
Връщане към живота на ретро електроника с Raspberry Pi
Връщане към живота на ретро електроника с Raspberry PiВръщане към живота на ретро електроника с Raspberry Pi
Връщане към живота на ретро електроника с Raspberry Pi
 
Open Source Hardware with KiCAD and OSHPark
Open Source Hardware with KiCAD and OSHParkOpen Source Hardware with KiCAD and OSHPark
Open Source Hardware with KiCAD and OSHPark
 

Último

UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 

Último (20)

UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 

Screen Sharing on Raspberry Pi 5 Using VNC in Weston and Wayland with the Yocto Project and OpenEmbedded

  • 1. Screen Sharing on Raspberry Pi 5 Using VNC in Weston and Wayland with the Yocto Project and OpenEmbedded Leon Anavi Konsulko Group leon.anavi@konsulko.com leon@anavi.org FOSDEM 2024
  • 2. FOSDEM 2024, Leon Anavi In Previous Episode
  • 3. FOSDEM 2024, Leon Anavi Agenda  Wayland and Weston  VNC  Weston and the Yocto Project Releases  core-image-weston with VNC demo on Raspberry Pi 5
  • 4. FOSDEM 2024, Leon Anavi Wayland & Weston  Wayland is a display protocol that specifies the communication between a display server and its clients  Started in 2008 with the aim to replace the X Window System in GNU/Linux and Unix-based distributions  Security by design through isolation of the input and output of every window  Weston is the reference Wayland compositor, there are many other compositors  Weston 13.0 was released on November 27, 2023
  • 5. FOSDEM 2024, Leon Anavi Remote Desktop Options in Weston and Wayland  Remote Desktop Protocol (RDP)  Virtual Network Computing (VNC)
  • 6. FOSDEM 2024, Leon Anavi Virtual Network Computing (VNC)  Graphical desktop-sharing system based on Remote Frame Buffer protocol (RFB)  Initially Olivetti Research Laboratory developed and published RFB in 1998, next versions of the protocol were published by RealVNC Ltd  Pixel based  Works with all windowing systems and applications, including MS Windows, Mac OS, X11 and Wayland
  • 7. FOSDEM 2024, Leon Anavi RDP vs VNC RDP (Remote Desktop Protocol) VNC (Virtual Network Computing) Protocol ITU-T T.128 Remote Frame Buffer protocol (RFB) Type Semantic (aware of controls, fonts and other graphical primitives) Pixel based Weston version 2.0 and newer 12.0 and newer Weston support since 2016 2022
  • 8. FOSDEM 2024, Leon Anavi VNC in Weston
  • 9. FOSDEM 2024, Leon Anavi  VNC in Weston
  • 10. FOSDEM 2024, Leon Anavi VNC in Weston  VNC backend is available in Weston 12 and newer version  VNC backend for Weston depends on NeatVNC  NeatVNC is an open source VNC server library with a clean interface, started by Andri Yngvason with code available at GitHub under ISC license  NeatVNC has build dependencies on libdrm, meson and pkg-config  NeatVNC has a runtime dependency on aml (Andri's Main Loop)
  • 11. FOSDEM 2024, Leon Anavi The Yocto Project  Open source collaborative project of the Linux foundation for creating custom Linux-based distributions for embedded devices using the OpenEmbedded Build System  OpenEmbedded Build System includes BitBake and OpenEmbedded Core  Poky is a reference distribution of the Yocto Project provided as metadata, without binary files, to bootstrap your own distribution for embedded devices  Bi-annual release cycle  Long term support (LTS) release covering two-year period
  • 12. FOSDEM 2024, Leon Anavi The Yocto Project Releases Codename Version Release Date Support Level Scarthgap 5.0 April 2024 Future – LTS (until April 2028) Nanbield 4.3 November 2023 Until May 2024 Kirkstone 4.0 May 2022 LTS (until Apr. 2026) Dunfell 3.1 April 2020 LTS (until Apr. 2024)
  • 13. FOSDEM 2024, Leon Anavi Wayland and Weston in Yocto and OpenEmbedded  OpenEmbedded-Core is a layer containing the core metadata for current versions of OpenEmbedded  OpenEmbedded-Core provides recipes for Wayland and Weston
  • 14. FOSDEM 2024, Leon Anavi The Yocto Project, Wayland and Weston Versions Codename Version Wayland Weston Scarthgap 5.0 1.22 (?) 13.0.0 (?) Nanbield 4.3 1.22 12.0.2 Kirkstone 4.0 1.20 10.0.2 Dunfell 3.1 1.18 8.0.0
  • 15. FOSDEM 2024, Leon Anavi Bitbaking Weston with VNC Extend the recipe for building Weston:  Enable VNC backend: PACKAGECONFIG:append = " vnc" This will enable -Dbackend-vnc=true and add neatvnc (from layer meta-oe) as a build dependency  Place a PAM configuration file in the package: FILES:${PN}:append = " ${sysconfdir}/pam.d/weston-remote-access"  For example, weston_%.bbappend: https://github.com/leon-anavi/meta-weston-remote-desktop/blob/main/meta-weston-vnc/recipes-graphics/ wayland/weston_%25.bbappend
  • 16. FOSDEM 2024, Leon Anavi aml and neatvnc in meta-oe
  • 17. FOSDEM 2024, Leon Anavi Bitbaking NeatVNC for Weston with VNC  Enable TLS: PACKAGECONFIG:append = " tls"  libweston/backend-vnc/meson.build from Weston 12 and 13: dep_neatvnc = dependency('neatvnc', version: ['>= 0.6.0', '< 0.7.0'], required: false, fallback: ['neatvnc', 'neatvnc_dep'])  libweston/backend-vnc/meson.build from Weston branch main: dep_neatvnc = dependency('neatvnc', version: ['>= 0.7.0', '< 0.8.0'], required: false, fallback: ['neatvnc', 'neatvnc_dep'])  Select NeatVNC matching Weston requirements, for example: PREFERRED_VERSION_neatvnc = "git"
  • 18. FOSDEM 2024, Leon Anavi weston-init.bbappend  Set password weston (from mkpasswd -m sha256crypt) for user weston: WESTONPASSWD = "$5$409x651F5vyY1.4o$Iuplll7/qNSEcflYNjH..0zwylmyLsbZdZGS6hBcro5" USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,wayland -p '${WESTONPASSWD}' weston"  Create a directory on the target device to store TLS key and certificate: do_install:append(){ install -m 0755 -d ${D}${sysconfdir}/vnc/keys/ chown weston:weston ${D}${sysconfdir}/vnc/keys/ } FILES:${PN} += " ${sysconfdir}/vnc/keys "
  • 19. FOSDEM 2024, Leon Anavi TLS security  Generate a key and certificate files to use with TLS security: mkdir -p ~/.pki/CA/private/ cd ~/.pki/CA openssl genrsa -out private/cakey.pem 2048 openssl req -new -x509 -nodes -days 365000 -key private/cakey.pem -out cacert.pem openssl genrsa -out tls.key 2048 openssl req -new -key tls.key -out tls.csr openssl req -new -key tls.key -out tls.csr -subj "/CN=raspberrypi5" openssl x509 -req -days 365 -in tls.csr -out tls.crt -CA cacert.pem -CAkey private/cakey.pem
  • 20. FOSDEM 2024, Leon Anavi Using VNC on Weston  Copy tls.crt and tls.key to /etc/vnc/keys on the target device, e.g. Raspberry Pi 5  Enable VNC screen sharing in /etc/xdg/weston/weston.ini: [screen-share] command=/usr/bin/weston --backend=vnc-backend.so --vnc-tls-cert=/etc/vnc/keys/tls.crt --vnc-tls-key=/etc/vnc/keys/tls.key -- shell=fullscreen-shell.so  After loading Weston, press ctrl+alt+s to launch screen sharing
  • 21. FOSDEM 2024, Leon Anavi VNC Automatic Startup  Launch Weston with screen-share.so, for example in Weston systemd service: ExecStart=/usr/bin/weston --modules=systemd-notify.so,screen-share.so  Add start-on-startup=true to section [screen-share] in weston.ini: [screen-share] command=/usr/bin/weston --backend=vnc-backend.so --vnc-tls-cert=/etc/vnc/keys/tls.crt --vnc-tls-key=/etc/vnc/keys/tls.key -- shell=fullscreen-shell.so start-on-startup=true
  • 22. FOSDEM 2024, Leon Anavi Remote Connection  From another computer in the same network connect to the embedded device using a VNC client, for example with vinagre, an open source remote desktop viewer for Linux and the GNOME Desktop: vinagre --gtk-vnc-debug
  • 23. FOSDEM 2024, Leon Anavi VNC Demo  Vinagre on Ubuntu 22.04.3 LTS with X11 and GNOME 42.9  core-image-weston with Weston version 12.0.2 on Raspberry Pi 5 (using BSP layer meta-raspberrypi)
  • 24. FOSDEM 2024, Leon Anavi VNC Frames per Second on Raspberry Pi 5  With VNC enabled weston-simple-egl runs with up to 20fps on Raspberry Pi 5
  • 25. FOSDEM 2024, Leon Anavi QA  Raspberry Pi 5  Raspberry Pi 4  ROCK Pi 4  Toradex Verdin i.MX8M Plus SoM  Notes: As of the moment Weston 12 (or newer) with etnaviv open source driver should be used on NXP i.MX6, i.MX7, i.MX8, etc. The fork weston-imx for Vivante proprietary GPU driver hasn’t been upgraded to Weston 12 yet. Therefore VNC backend is still not available in weston-imx.
  • 26. FOSDEM 2024, Leon Anavi Conclusions  VNC is a pixel based graphical desktop-sharing system  VNC backend was added in Weston version 12  VNC backend in Weston depends on NeatVNC and aml  Generate appropriate key and certificate files for TLS encryption  The latest versions of the Yocto Project and OpenEmbedded provide the necessary tools and dependencies to build core-image-weston and to enable VNC  Layer meta-weston-remote-desktop provides example integrations of both VNC and RDP in Weston
  • 27. FOSDEM 2024, Leon Anavi Thank You! Useful links  Wayland https://wayland.freedesktop.org/  Weston source code https://gitlab.freedesktop.org/wayland/weston  The Yocto Project https://www.yoctoproject.org/  The Yocto Project releases https://wiki.yoctoproject.org/wiki/Releases  Simple example Yocto/OE layer for VNC and RDP on Weston: https://github.com/leon-anavi/meta-weston-remote-desktop/tree/main