Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatpak fails to execute child process ?dbus-launch? (No such file or directory) for fedora remote #565

Open
MasinAD opened this issue May 23, 2024 · 4 comments
Labels
bug Something isn't working f40 Related to Fedora 40 flatpak Related to Flatpak or a Flatpak'ed application

Comments

@MasinAD
Copy link

MasinAD commented May 23, 2024

Describe the bug
Any attempt at installing a flatpak from the fedora remote results in an error:

wmde@wmde-103180:~$ LANG=C sudo flatpak install fedora org.mozilla.Thunderbird

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

For security reasons, the password you type will not be visible.

[sudo] password for wmde: 
Looking for matches?
Required runtime for org.mozilla.Thunderbird/x86_64/stable (runtime/org.fedoraproject.Platform/x86_64/f39) found in remote fedora
Do you want to install it? [Y/n]: 

org.mozilla.Thunderbird permissions:
    ipc                     network                cups                     pcsc
    pulseaudio              wayland                x11                      dri
    file access [1]         dbus access [2]        bus ownership [3]

    [1] /run/.heim_org.h5l.kcm-socket, xdg-download, xdg-run/gnupg:ro, ~/.gnupg
    [2] org.a11y.Bus, org.freedesktop.Notifications
    [3] org.mozilla.thunderbird_default.*


        ID                                 Branch         Op        Remote        Download
 1.     org.fedoraproject.Platform         f39            i         fedora        < 835.9?MB
 2.     org.mozilla.Thunderbird            stable         i         fedora        < 138.5?MB

Proceed with these changes to the system installation? [Y/n]: 
error: Failed to execute child process ?dbus-launch? (No such file or directory)

Installing flatpaks from the flathub remote works, though:

wmde@wmde-103180:~$ LANG=C sudo flatpak install flathub org.mozilla.Thunderbird
Looking for matches?

org.mozilla.Thunderbird permissions:
    ipc                           network                cups                   pcsc
    pulseaudio                    wayland                x11                    dri
    devel                         file access [1]        dbus access [2]        bus ownership [3]
    system dbus access [4]

    [1] /run/.heim_org.h5l.kcm-socket, xdg-download, xdg-run/gnupg:ro, xdg-run/speech-dispatcher:ro,
        ~/.gnupg
    [2] org.a11y.Bus, org.gtk.vfs.*
    [3] org.mozilla.thunderbird.*, org.mozilla.thunderbird_beta.*
    [4] org.freedesktop.NetworkManager


        ID                                    Branch       Op       Remote        Download
 1. [?] org.mozilla.Thunderbird.Locale        stable       i        flathub       684.5?kB / 42.1?MB
 2. [?] org.mozilla.Thunderbird               stable       i        flathub        90.3?MB / 92.1?MB

Installing 2/2? ???????????????????? 100%  45.2?MB/s
Note that '/var/lib/flatpak/exports/share' is not in the search path
set by the XDG_DATA_HOME and XDG_DATA_DIRS
environment variables, so applications may not
be able to find it until you set them. The
directories currently searched are:

        ID                                    Branch       Op       Remote        Download
 1. [?] org.mozilla.Thunderbird.Locale        stable       i        flathub       684.5?kB / 42.1?MB
 2. [?] org.mozilla.Thunderbird               stable       i        flathub        90.3?MB / 92.1?MB

Installation complete.

To Reproduce

  1. It's an almost clean Silverblue 40 installation
  2. Install flatpak from fedora remote

Expected behavior
I expect the flatpak being installed.

OS version:

State: idle
BootedDeployment:
● fedora:fedora/40/x86_64/silverblue
                  Version: 40.20240522.0 (2024-05-22T00:58:59Z)
               BaseCommit: f4e339b385beb28685580790296a05876b04c8dfde93f563531f508c7a0e861e
             GPGSignature: Valid signature by 115DF9AEF857853EE8445D0A0727707EA15B79CC
          LayeredPackages: clevis clevis-dracut clevis-luks clevis-systemd libxcrypt-compat
                           puppet rubygem-rexml
                Initramfs: -a tpm2-tss -I /etc/vconsole.conf 

Additional context
We layered the puppet package. When applying our puppet manifests we encounter this error for each flatpak from the fedora remote but not the flathub remote. The same manifest works without issues for Workstation 39 and 40.

@MasinAD MasinAD added the bug Something isn't working label May 23, 2024
@travier travier added f40 Related to Fedora 40 flatpak Related to Flatpak or a Flatpak'ed application labels May 23, 2024
@MasinAD
Copy link
Author

MasinAD commented May 23, 2024

Without sudo it works. But why is it failing in the puppet manifest? The puppet agent runs as root, and AFAIU headless there shouldn't be a dbus session but maybe I'm wrong.

wmde@wmde-103180:~$ LANG=C flatpak remotes 
Name                 Options
elementary_appcenter system
fedora               system,oci
flathub              system,filtered

Maybe it has something to do with the oci option?

@travier
Copy link
Member

travier commented May 23, 2024

Please try to reproduce this issue in a clean Fedora Silverblue installation.

@MasinAD
Copy link
Author

MasinAD commented May 23, 2024

@travier I installed Fedora Silverblue 40 in a GNOME Box. The issue exists there, too. I only created a single user. Installing a flatpak either with sudo or as root after sudo -i fails:

root@fedora:~# LANG=C flatpak install fedora org.gnome.Meld
Looking for matches?

org.gnome.Meld permissions:
    ipc     wayland    x11    dri    file access [1]

    [1] host


        ID                     Branch         Op         Remote        Download
 1.     org.gnome.Meld         stable         i          fedora        < 11.9?MB

Proceed with these changes to the system installation? [Y/n]: 
error: Failed to execute child process ?dbus-launch? (No such file or directory)

I assume the problem lies in dbus-launch not having a replacement with dbus-broker. I'm a noob when it comes to dbus so I don't know if dbus-run-session or dbus-broker-launch can act as a replacement. At least, they don't work as a drop-in as symlinking either of those to dbus-launch doesn't help.

So, why does the fedora remote require dbus-launch and the flathub remote doesn't? It has something to do with OCI vs OStree, I guess. And why does it work when run as the currently GUI logged-in user? I just ssh'ed to localhost as myself and ran flatpak install fedora org.gnome.Meld. Strangely, that worked, although I needed to authenticate thrice. Then I ssh'ed as the admin user wmde and ran sudo -u masin.wiedner -- flatpak install fedora org.gnome.Fractal which errored after one authentication. The same error occurs when instead I ran sudo -- su -l masin.wiedner and then ran the usual flatpak install command:

masin.wiedner@wmde-103180:~$ LANG=C flatpak install fedora org.gnome.Fractal
Looking for matches?

org.gnome.Fractal permissions:
    ipc     network     fallback-x11     pulseaudio    wayland    x11    dri



        ID                        Branch         Op         Remote         Download
 1.     org.gnome.Fractal         stable         i          fedora         < 22.4?MB

Proceed with these changes to the system installation? [Y/n]: 
error: Cannot autolaunch D-Bus without X11 $DISPLAY

I know, I know, Flatpak and Silverblue seem to be systems dedicated for self-administrating end-users. But not being able to remotely install a flatpak seems a little bit odd. Ideally, I'd like to install flatpaks from fedora remote without being graphically logged in.

flatpak requiring dbus for OCI isn't a Silverblue issue. Fedora providing OCI flatpaks, though, … 🤷 … would you mind pointing me in the right direction, please?

@travier
Copy link
Member

travier commented May 23, 2024

You should probably reach out to the Flatpak SIG for Fedora Flatpaks: https://fedoraproject.org/wiki/SIGs/Flatpak

@MasinAD MasinAD changed the title flatpail fails to execute child process ?dbus-launch? (No such file or directory) for fedora remote flatpak fails to execute child process ?dbus-launch? (No such file or directory) for fedora remote May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working f40 Related to Fedora 40 flatpak Related to Flatpak or a Flatpak'ed application
Projects
None yet
Development

No branches or pull requests

2 participants