Connecting the L5 with other devices

I did what the README.md says and also installed meson:

git clone https://github.com/any1/wayvnc.git
git clone https://github.com/any1/neatvnc.git
git clone https://github.com/any1/aml.git

mkdir wayvnc/subprojects
cd wayvnc/subprojects
ln -s ../../neatvnc .
ln -s ../../aml .
cd -

mkdir neatvnc/subprojects
cd neatvnc/subprojects
ln -s ../../aml .
cd -

meson build
ninja -C build

It now says:

purism@pureos:~/guru/wayvnc$ meson build
The Meson build system
Version: 0.56.2
Source dir: /home/purism/guru/wayvnc
Build dir: /home/purism/guru/wayvnc/build
Build type: native build
Project name: wayvnc
Project version: 0.4.0

meson.build:1:0: ERROR: Unknown compiler(s): ['cc', 'gcc', 'clang', 'nvc', 'pgcc', 'icc']
The follow exceptions were encountered:
Running "cc --version" gave "[Errno 2] No such file or directory: 'cc'"
Running "gcc --version" gave "[Errno 2] No such file or directory: 'gcc'"
Running "clang --version" gave "[Errno 2] No such file or directory: 'clang'"
Running "nvc --version" gave "[Errno 2] No such file or directory: 'nvc'"
Running "pgcc --version" gave "[Errno 2] No such file or directory: 'pgcc'"
Running "icc --version" gave "[Errno 2] No such file or directory: 'icc'"

A full log can be found at /home/purism/guru/wayvnc/build/meson-logs/meson-log.txt

Which cc/gcc is recommended?

I would go gcc or cc.

I installed gcc (cc is not available); now it can not find -lpam, but some libpam.so.0 is installed; they are just compiling some small test C code with cc .... -lpam ... and the ld does not find it.

Edit:

Program git found: YES (/usr/bin/git)
Library m found: YES
Library rt found: YES
Library pam found: NO
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency pixman-1 found: YES 0.40.0
Dependency gbm skipped: feature screencopy-dmabuf disabled
Run-time dependency libdrm found: YES 2.4.105
Run-time dependency xkbcommon found: YES 1.0.3
Found CMake: /usr/bin/cmake (3.18.4)
Run-time dependency wayland-client found: NO (tried pkgconfig and cmake)

meson.build:48:0: ERROR: Dependency "wayland-client" not found, tried pkgconfig and cmake

Is there any guide you’d recommend for packaging .deb? I am sure there are plenty, but I am wondering if there are any you’d recommend or more relevant to PureOS.

Any reason someone in the community cannot package this? If so, would I want to target Debian or target PureOS?

There is a lot I don’t understand about this and this would be a good way to learn. I’m familiar with creating AUR packages so creating the .deb shouldn’t be too hard. It’s more the ceremony around it (where does my .deb go once I create it, etc.) that I am less sure about.

Is there any guide you’d recommend for packaging .deb?

Official Debian documentation on how to create a deb package:
https://wiki.debian.org/HowToPackageForDebian

Easy tutorial for how to create a deb package:

1 Like

Thanks.
So this will get me to a .deb file (or multiple if I were to do wayvnc + libgbm-dev + libdrm-dev + aml + neatvnc).

But where does it go?
In Arch, it would go in to the AUR since I’m just some community member.
In Debian, there isn’t an AUR (ok, well there is the DUR now but I don’t think that’s mainstream Debian stuff yet).

Is there some way that a community member can submit .debs to Debian? Or to PureOS?

Is there some way that a community member can submit .debs to Debian? Or to PureOS?

Probably best if you get a response from a Purism employee, but I assume that you need to first sign up for an account at https://source.puri.sm and then create a project under your name with the source code and your deb packages. Remember that you need to create source packages as well, named package-dev.

From there, you will have to ask a Purism employee how to get your deb packages into PureOS, but I assume that Purism would prefer that you get your packages into Debian, so all the Debian family distros can use it, and not just PureOS.

As for how to get packages added to Debian, here are the instructions:
https://www.debian.org/doc/manuals/distribute-deb/distribute-deb.html

You are going to have to find a Debian developer to sponsor you and upload the packages to the Debian repository. Purism’s @guido.gunther (@agx@librem.social) is a Debian Developer, so you can ask him to do this.

1 Like

You need to install libwayland-dev, I just compiled in a Debian like system following this instructions

Thanks! I finally got it compiled and installed on the L5. It starts fine with

LD_LIBRARY_PATH=/usr/local/lib wayvnc

But when I connect it with an vncviewer as

vncviewer -viewonly purism::5900

the wayvnc only says: ../subprojects/neatvnc/src/server.c:994: No display buffer has been set and closes the connection. Any ideas?

What’s the output when you launch wayvnc? I connect trough the same device so I use localhost:0 for the connection.

There is no output at all:

purism@pureos:~$ cat .config/wayvnc/config 
address=0.0.0.0
# enable_auth=true
# username=luser
# password=p455w0rd
# private_key_file=/path/to/key.pem
# certificate_file=/path/to/cert.pem
purism@pureos:~$ LD_LIBRARY_PATH=/usr/local/lib wayvnc 

Now it shows the picture on the laptop. “Now” means, that I installed on the L5 in addition from the store the app TigerVNC-Viewer. Without any changes on the laptop the vncviewer 192.168.178::5900 now shows the following picture on the laptop:

I don’t know (yet) if I can scale down the window on the laptop, though.

2 Likes

@amosbatto is perfectly right. Doing upstream first it would be best to have the packaging happening in Debian (and we’d technicallly backport to PureOS at some point). The packaging process is basically identical. I’d suggest

  • filing an ITP (intend to package) (https://wiki.debian.org/ITP)
  • preparing a package that works in Debian sid on salsa in a personal repo
  • once done request to join the swaywm-team at salsa https://salsa.debian.org/swaywm-team and go there for help in case you get stuck (there’s several PureOS and Mobian people hanging around there)

Once that is there we can clone that repo to source.puri.sm and you can prepare an upload for PureOS.

2 Likes

Good to hear this is working. Can you (@guru, @guido.gunther) give a time estimate how long it will take until this is part of the Debian and PureOS repo? How can I track progress?

Just trying to estimate whether I should wait a little, or go for compiling myself.

I don’t think anybody is working on this so you could pick it up and help everyone interested in this.

I am honoured :yum:. Well, let’s see if I can replicate what seems to work in the links above.

Hi Guido,

Can you please give me some advice how to go forward to set librem 5 up as a server: wayvnc vs gnome-remote-desktop

Looking at wayvnc I see no debian-like projects are supported. [1, 2]
So I can build this now, but will this be supported in future? This route does not look very appealing to me, other than a quick temporary fix.

Gnome seems to have a working solution now [3,4] that would be more logical to expect to fit into the pureos workflow with long term maintenance.

On the librem 5 I can install gnome-remote-desktop, seemingly successful.
However, the librem 5 does not update settings with “settings / share / share screen” as expected.
Something I run into is lack of man pages how to install and set up or debug gnome-remote-server properly.

@guido.gunther:

  • Do you agree that gnome-remote-desktop looks like the preferred way forward?
  • How can I find out if this is an issue on the pureos side, or on the gnome side?
  • Where can I submit bugs / feature requests?

References
[1] https://github.com/any1/wayvnc (Installing: Arch, FreeBSD, Fedora, OpenSUSE, Void)
[2] https://github.com/any1/wayvnc/discussions/93
[3] https://wiki.gnome.org/Projects/Mutter/RemoteDesktop
[4] https://warlord0blog.wordpress.com/2021/05/17/wayland-remote-desktop/

There’s work regarding wayvnc packaging going on here:



Also note https://github.com/emersion/xdg-desktop-portal-wlr which implements the ScreenCast portal (I haven’t tested the version in Byzantium but used newer versions) over here. It doesn’t implement the RemoteDesktop portal though so wayvnc is likely the simpler way to go for now.

2 Likes

Thanks Guido, I will go with this.