WhitewaterFoundry / Fedora-Remix-for-WSL

Fedora Remix for Windows Subsystem for Linux.
Other
698 stars 51 forks source link

Flatpak support #81

Open barnscott opened 4 years ago

barnscott commented 4 years ago

Is your feature request related to a problem? Please describe.

Currently, it appears flatpaks are not supported and is installed without any remotes. Input: flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo Output: error: Unable to connect to system bus

Currently using 2004+WSL2, Fedora-Remix release 32.

Describe the solution you'd like It would be ideal for Fedora-Remix to ship with support for registry.fedoraproject.com remote and enable flatpak development via WSL/Fedora-Remix.

WSLUser commented 4 years ago

You need to start dbus. The newest release version contains some dbus fixes to get it working correctly.

crramirez commented 4 years ago

Have you tried:

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

It works for me

barnscott commented 4 years ago

Due to the error i received, and the fact that i hadn't got dbus to launch successfully, i incorrectly assumed that the flatpak repo could not be added.

But yes, @crramirez, using sudo did let me add the repo.

However, i still cant install flatpak application as im receiving similar dbus errors:

$ flatpak install flathub org.gabmus.notorious -y

Looking for matches…
Required runtime for org.gabmus.notorious/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.36) found in remote flathub

org.gabmus.notorious permissions:
    ipc     fallback-x11     wayland     x11     dri     file access [1]

    [1] home

        ID                                             Branch            Op           Remote            Download
 1. [✗] org.freedesktop.Platform.GL.default            19.08             i            flathub             1.0 kB / 85.1 MB
 2. [✗] org.freedesktop.Platform.openh264              2.0               i            flathub           593.6 kB / 916.8 kB
 3. [✗] org.gabmus.notorious.Locale                    stable            i            flathub           710.5 kB / 682.9 kB
 4. [✗] org.gnome.Platform.Locale                      3.36              i            flathub            30.8 MB / 323.0 MB
 5. [✗] org.gnome.Platform                             3.36              i            flathub           173.7 MB / 324.5 MB
 6. [ ] org.gabmus.notorious                           stable            i            flathub           < 2.5 MB

Warning: Failed to get revokefs-fuse socket from system-helper: Unable to connect to system bus
Warning: Unable to connect to system bus
Warning: Failed to get revokefs-fuse socket from system-helper: Unable to connect to system bus
Warning: Unable to connect to system bus
Warning: Failed to get revokefs-fuse socket from system-helper: Unable to connect to system bus
Warning: Unable to connect to system bus
Warning: Failed to get revokefs-fuse socket from system-helper: Unable to connect to system bus
Warning: Unable to connect to system bus
Warning: Failed to get revokefs-fuse socket from system-helper: Unable to connect to system bus
Error: Unable to connect to system bus
error: Failed to install org.gnome.Platform: Unable to connect to system bus

Are dbus errors a known issue with a fix coming as @WSLUser suggests? Or do i just have something misconfigured?

crramirez commented 4 years ago

May sound repetitive but use sudo again. It worked for me this way.

It looks like flatpak is trying to use dbus to gain administrative privileges.

The fixes are already in place. Simply the system bus is not as reliable in WSL due to the lack of all the configurations and daemons present in a full Linux installation.

Regards, Carlos

barnscott commented 4 years ago

I must have a mis-configuration then, because I had received the issues below. I'll keep poking around.

$ sudo flatpak install flathub org.gabmus.notorious -y

Looking for matches…
Required runtime for org.gabmus.notorious/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.36) found in remote flathub

org.gabmus.notorious permissions:
    ipc     fallback-x11     wayland     x11     dri     file access [1]

    [1] home

        ID                                             Branch            Op           Remote            Download
        ID                                             Branch            Op           Remote            Download
 1. [✓] org.freedesktop.Platform.GL.default            19.08             i            flathub            84.6 MB / 85.1 MB
 2. [✗] org.freedesktop.Platform.openh264              2.0               i            flathub           860.1 kB / 916.8 kB
        ID                                             Branch            Op           Remote            Download
 1. [✓] org.freedesktop.Platform.GL.default            19.08             i            flathub            84.6 MB / 85.1 MB
 2. [✗] org.freedesktop.Platform.openh264              2.0               i            flathub           860.1 kB / 916.8 kB
 3. [✓] org.gabmus.notorious.Locale                    stable            i            flathub           710.5 kB / 682.9 kB
 4. [✓] org.gnome.Platform.Locale                      3.36              i            flathub           141.2 MB / 323.0 MB
 5. [✓] org.gnome.Platform                             3.36              i            flathub           273.3 MB / 324.5 MB
 6. [✓] org.gabmus.notorious                           stable            i            flathub             1.6 MB / 2.5 MB

Warning: While trying to apply extra data: apply_extra script failed, exit status 256
Installation complete.

$ sudo flatpak run org.gabmus.notorious error: "flatpak run" is not intended to be ran with sudo $ flatpak run org.gabmus.notorious

bwrap: Creating new namespace failed, likely because the kernel does not support user namespaces.  bwrap must be installed setuid on such systems.
error: ldconfig failed, exit status 256
crramirez commented 4 years ago

Ok, this means that it is not supported yet. I tested until the installation because right now I don't have handy WSL2 I thought it could work in WSL2. I can make a full test but in some days. We have a similar case with pods. These containers like things don't work yet.

I will investigate this "bwrap must be installed setuid on such systems."

I'll keep you informed

Regards, Carlos

Croydon commented 4 years ago

I have similar problems

I can run Flatpak only with sudo, otherwise I'm getting error along the line of

Warning: Failed to get revokefs-fuse socket from system-helper: Unable to connect to system bus

TezieG commented 3 years ago

I don't know what operating system you guys are working on but for me it worked (on windows) to start Ubuntu as an Administrator and used sudo before the command, hope that helps.

mdegans commented 3 years ago

I just used --user and it worked. so flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo. No sudo needed.

starvsion commented 2 years ago

it works in WSL2 in Win11 ( you need to install flatpak, and maybe genie?)

image