xibosignage / xibo-linux

Xibo for Linux - Digital Signage Player
https://xibo.org.uk/xibo-for-linux
GNU Affero General Public License v3.0
76 stars 54 forks source link

Snap: build against 20.04 #267

Open dasgarner opened 2 years ago

dasgarner commented 2 years ago

We still build against 18.04 when snapping, but we're using 20.04 in our dev container. Investigate whether we can no build against 20.04 and see if that enables us to reduce some of our compilation requirements.

dasgarner commented 2 years ago

The player won't start: ERROR: not connected to the gnome-3-28-1804 content interface

Stivius commented 2 years ago

What if you remove xibo-player completely and then install from edge? Seems like during update it didn't reconnect slots correctly.

UPD: Hmm, from stable to edge channel it refreshed without errors on my laptop P.S. Ubuntu 18.04

Stivius commented 2 years ago

OK, for some reason snap image (.snap file) is built with gnome-3-38 extension but when pushed to edge and then installed from edge it uses gnome-3-28 connection which is odd. Could you manage connections for this snap on the snapcraft.io page?

dasgarner commented 2 years ago

What if you remove xibo-player completely and then install from edge? Seems like during update it didn't reconnect slots correctly.

I did try a complete reinstall, but same results.

Hmm, from stable to edge channel it refreshed without errors on my laptop

I reverted edge to the previous working version as there are 107 people using it. edge does mean that it might break, so I have republished r240.

I then tried the refresh on another machine and this time it worked.

Interface                 Plug                                Slot                             Notes
audio-playback            xibo-player:audio-playback          :audio-playback                  -
content[gnome-3-38-2004]  xibo-player:gnome-3-38-2004         gnome-3-38-2004:gnome-3-38-2004  -
content[gtk-3-themes]     xibo-player:gtk-3-themes            gtk-common-themes:gtk-3-themes   -
content[icon-themes]      xibo-player:icon-themes             gtk-common-themes:icon-themes    -
content[sound-themes]     xibo-player:sound-themes            gtk-common-themes:sound-themes   -
dbus                      -                                   xibo-player:dbus-daemon          -
desktop                   xibo-player:desktop                 :desktop                         -
desktop-legacy            xibo-player:desktop-legacy          :desktop-legacy                  -
framebuffer               xibo-player:framebuffer             -                                -
gsettings                 xibo-player:gsettings               :gsettings                       -
home                      xibo-player:home                    :home                            -
network                   xibo-player:network                 :network                         -
opengl                    xibo-player:opengl                  :opengl                          -
screen-inhibit-control    xibo-player:screen-inhibit-control  :screen-inhibit-control          -
wayland                   xibo-player:wayland                 :wayland                         -
x11                       xibo-player:x11                     :x11                             -

Could you manage connections for this snap on the snapcraft.io page?

There aren't any options for that in the store UI.

Seems like during update it didn't reconnect slots correctly.

Yes this looks to be exactly right, if it list connections there are empty slots. I am not at that machine now, but I can get the output of snap connections xibo-player and post here.

dasgarner commented 2 years ago

On the working player, none of the web based content works, the browser renders with the following error inside it:

GDBus.Error:org.freedeakstop.portal.Error.NotAllowed This call is not available in the sandbox

Stivius commented 2 years ago

On the working player, none of the web based content works, the browser renders with the following error inside it:

GDBus.Error:org.freedeakstop.portal.Error.NotAllowed This call is not available in the sandbox

That happened due to snap environment probably... On my machine, everything works as expected, including web rendering. It's pretty weird how sandboxed environment produces very different behaviour every time

Potential dirty fix: https://forum.snapcraft.io/t/help-gdbus-error-this-call-is-not-available-inside-the-sandbox/29969

dasgarner commented 2 years ago

Here is the output for snap connections xibo-player on the machine which gives this message:

xibo@xibo-B460HD3:~/Desktop$ xibo-player
ERROR: not connected to the gnome-3-28-1804 content interface.
xibo@xibo-B460HD3:~/Desktop$ snap connections xibo-player 
Interface               Plug                                Slot                            Notes
audio-playback          xibo-player:audio-playback          :audio-playback                 -
content                 xibo-player:gnome-3-38-2004         -                               -
content[gtk-3-themes]   xibo-player:gtk-3-themes            gtk-common-themes:gtk-3-themes  -
content[icon-themes]    xibo-player:icon-themes             gtk-common-themes:icon-themes   -
content[sound-themes]   xibo-player:sound-themes            gtk-common-themes:sound-themes  -
dbus                    -                                   xibo-player:dbus-daemon         -
desktop                 xibo-player:desktop                 :desktop                        -
desktop-legacy          xibo-player:desktop-legacy          :desktop-legacy                 -
framebuffer             xibo-player:framebuffer             -                               -
gsettings               xibo-player:gsettings               :gsettings                      -
home                    xibo-player:home                    :home                           -
network                 xibo-player:network                 :network                        -
opengl                  xibo-player:opengl                  :opengl                         -
screen-inhibit-control  xibo-player:screen-inhibit-control  :screen-inhibit-control         -
wayland                 xibo-player:wayland                 :wayland                        -
x11                     xibo-player:x11                     :x11                            -

And here is the output for gnome from snap list:

gnome-3-28-1804    3.28.0-19-g98f9e67.98f9e67  161    latest/stable    canonical✓    -
gnome-3-34-1804    0+git.3556cb3               77     latest/stable/…  canonical✓    -
gnome-3-38-2004    0+git.891e5bc               112    latest/stable    canonical✓    -

I also tried running, to try and link the same interface/plug as on the working laptop.

xibo@xibo-B460HD3:~/Desktop$ snap connect xibo-player:gnome-3-38-2004 gnome-3-38-2004:gnome-3-38-2004
error: snap "xibo-player" has no plug named "gnome-3-38-2004"
dasgarner commented 2 years ago

I did a complete reinstall again, and this time the same PC to generate the above output, worked fine on edge and the web browser content works too.

Updated connections:

xibo@xibo-B460HD3:~/Desktop$ snap connections xibo-player 
Interface                 Plug                                Slot                             Notes
audio-playback            xibo-player:audio-playback          :audio-playback                  -
content[gnome-3-38-2004]  xibo-player:gnome-3-38-2004         gnome-3-38-2004:gnome-3-38-2004  -
content[gtk-3-themes]     xibo-player:gtk-3-themes            gtk-common-themes:gtk-3-themes   -
content[icon-themes]      xibo-player:icon-themes             gtk-common-themes:icon-themes    -
content[sound-themes]     xibo-player:sound-themes            gtk-common-themes:sound-themes   -
dbus                      -                                   xibo-player:dbus-daemon          -
desktop                   xibo-player:desktop                 :desktop                         -
desktop-legacy            xibo-player:desktop-legacy          :desktop-legacy                  -
framebuffer               xibo-player:framebuffer             -                                -
gsettings                 xibo-player:gsettings               :gsettings                       -
home                      xibo-player:home                    :home                            -
network                   xibo-player:network                 :network                         -
opengl                    xibo-player:opengl                  :opengl                          -
screen-inhibit-control    xibo-player:screen-inhibit-control  :screen-inhibit-control          -
wayland                   xibo-player:wayland                 :wayland                         -
x11                       xibo-player:x11                     :x11                             -

I can't explain why a reinstall did not work the first time around, but has worked this time.

Edit: web content works too!

dasgarner commented 2 years ago

I've tried a complete reinstall under Wayland, and the tricks you linked above, and I can't get past:

GDBus.Error:org.freedeakstop.portal.Error.NotAllowed
This call is not available in the sandbox
BOFHELL commented 1 year ago

Have fixed it by add the network-status plug...

1) snap download xibo-player --channel=edge 2) unsqahsfs xibo-player_240.snap 3) vim squashfs-root/meta/snap.yaml
search section for xibo-player and add - network-status (line 51) 4) snap pack squashfs-root 5) snap install xibo-player_1.8_R7_amd64.snap --dangerous

done :)

[EDIT] OS: Debian 11 [/EDIT OFF]