canonical / ubuntu-frame-vnc

Remote access to Ubuntu Frame, based on wayvnc
GNU General Public License v3.0
0 stars 0 forks source link

build / usage trouble (Compositor doesn't support screencopy) #2

Closed steadfasterX closed 2 years ago

steadfasterX commented 2 years ago

Many thanks for this project! Right at the time I need it :)

somehow and likely due to the recent changes in wayvnc and neatvnc I cannot get this snap working again. i made it build (see next) but always getting the error in my system logs once I start the snap:

+ exec /snap/precitaste-kiosk-vnc/x1/bin/wayland-launch /snap/precitaste-kiosk-vnc/x1/usr/local/bin/wayvnc
ERROR: Compositor doesn't support screencopy! Exiting.
ERROR: Failed to initialise wayland

What I have tried (to no eval):

1. build as it is

breaks with an error in wayvnc:

../src/src/main.c: In function ‘wayvnc_process_frame’:
../src/src/main.c:643:18: error: too few arguments to function ‘nvnc_fb_new’
  643 |   self->buffer = nvnc_fb_new(width, height, format);
      |                  ^~~~~~~~~~~

which I "fixed" by using the repo https://salsa.debian.org/debian/wayvnc containing a fix for that (details: https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1861702.html)

RESULT: build finishes, error see above.

2. adding --gpu

(see here) to the sed command here

RESULT: build finishes, error see above.

3. rebuild with specific commits on neatvnc & wayvnc

-> at the time this repo has been created. Of course reverted the sed command change from step (as --gpu is not there at this time):

neatvnc:

   source: https://github.com/any1/neatvnc.git
   source-commit: 9285594e9d4ff4a3a2f7f937789b8b21bbebd7f1

wayvnc:

    source: https://github.com/any1/wayvnc.git
    source-commit: 099bdb8e17765149dcd6bb2ad9b23f5bab06c856

RESULT: build finishes, error see above.

4. using a newer cmake version

(bc I saw a red deprecated warning during build) by adding the following to override-pull

      apt install -y software-properties-common lsb-release
      #gpg --keyserver hkp://pgp.mit.edu --recv-keys 6AF7F09730B3F0A4
      gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 6AF7F09730B3F0A4
      wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
      apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
      apt install -y kitware-archive-keyring cmake
      apt purge -y dirmngr

RESULT: build finishes, error see above.

Example build log (excerpt)

CLICK to show log ``` neatvnc| Library m found: YES neatvnc| Dependency pixman-1 found: YES 0.38.4 (cached) neatvnc| Run-time dependency libturbojpeg found: YES 2.0.3 neatvnc| Run-time dependency gnutls found: YES 3.6.13 neatvnc| Run-time dependency zlib found: YES 1.2.11 neatvnc| Dependency gbm found: YES 21.2.6 (cached) neatvnc| Dependency libdrm found: YES 2.4.107 (cached) neatvnc| Run-time dependency libavcodec found: YES 59.18.100 neatvnc| Run-time dependency libavfilter found: YES 8.24.100 neatvnc| Run-time dependency libavutil found: YES 57.17.100 Executing subproject neatvnc:aml aml| Project name: aml aml| Project version: 0.2.2 aml| C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0") aml| C linker for the host machine: cc ld.bfd 2.34 aml| Program git found: YES (/usr/bin/git) aml| Library rt found: YES aml| Run-time dependency threads found: YES aml| Header "sys/epoll.h" has symbol "epoll_create" : YES aml| Header "sys/event.h" has symbol "kqueue" : NO aml| Message: epoll backend chosen aml| Build targets in project: 1 aml| Subproject aml finished. neatvnc| Configuring config.h using configuration neatvnc| Build targets in project: 2 neatvnc| Subproject neatvnc finished. Program wayland-scanner found: YES (/usr/bin/wayland-scanner) Dependency wayland-client found: YES 1.18.0 (cached) Checking for function "memfd_create" : YES Configuring config.h using configuration Found pkg-config: /usr/bin/pkg-config (0.29.1) Found CMake: /usr/bin/cmake (3.23.2) Build-time dependency scdoc found: NO (tried pkgconfig and cmake) Build targets in project: 4 wayvnc 0.4.0 Subprojects aml : YES 2 warnings neatvnc : YES 2 warnings User defined options screencopy-dmabuf: enabled <---- !! neatvnc:h264 : enabled ```

Conclusion

I am currently out of ideas how I can get this working again. Any help highly appreciated..

AlanGriffiths commented 2 years ago
  • exec /snap/precitaste-kiosk-vnc/x1/bin/wayland-launch /snap/precitaste-kiosk-vnc/x1/usr/local/bin/wayvnc ERROR: Compositor doesn't support screencopy! Exiting. ERROR: Failed to initialise wayland

For security reasons, screencopy is not enabled by default by Ubuntu Frame. (The default is to only to provide it to ubuntu-frame-vnc)

For it to work with precitaste-kiosk-vnc you would need to reconfigure Ubuntu Frame

steadfasterX commented 2 years ago

For security reasons, screencopy is not enabled by default by Ubuntu Frame. (The default is to only to provide it to ubuntu-frame-vnc)

o m g . . . @AlanGriffiths THANKS!

After a temporary test with:

sudo snap set ubuntu-frame config="add-wayland-extensions=zwlr_screencopy_manager_v1"

it worked!! Thanks thanks thanks! :)

but maybe check the above errors anyways as you cannot compile ubuntu-frame-vnc atm as mentioned in 1) and 2) in my OP

AlanGriffiths commented 2 years ago

you cannot compile ubuntu-frame-vnc atm

I can, and so can the person developing the snap.

Note that the snap is a work in progress, which is reflected in it's availability on the store being restricted to --edge

Saviq commented 2 years ago

@steadfasterX as you can see here it built just fine as-is:

https://launchpad.net/~mir-team/+snap/ubuntu-frame-vnc-edge/+build/1838030

Saviq commented 2 years ago

FWIW when stabilizing this, we will move to stable versions of the dependencies, with edge potentially pointing at HEADs still.

steadfasterX commented 2 years ago

FWIW when stabilizing this, we will move to stable versions of the dependencies, with edge potentially pointing at HEADs still.

yea I dunno what was wrong but it compiles fine now.. thx for your reply!