Flatpak system operation ConfigureRemote not allowed for user

Hello,

Created a flatpak and testing it before uploading it to my repo in GitHub

My YML file.

org.flatpak.EasyEdit.yml

  • First build as normal

$ flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo builddir org.flatpak.EasyEdit.yml
  • Create single file bundle from repo

$ flatpak build-bundle repo EasyEdit-$(arch)-1.3.5.flatpak org.flatpak.EasyEdit
  • Install new created file

$ flatpak install EasyEdit-$(arch)-1.3.5.flatpak
  • Issue when trying to install even knowing it was all created as normal user is that to install it ask to run a root / sudo.

$ flatpak install EasyEdit-x86_64-1.3.5.flatpak
error: Flatpak system operation ConfigureRemote not allowed for user

Why can’t i install this as normal user? :stuck_out_tongue_winking_eye:

Flatpak installs to the system installation by default (i.e. --system is implied). On a properly-configured system, flatpak will prompt for authentication, at least for an admin account.

You can use --user to install to the user installation.

Please also note that .flatpak single-file bundles are not the preferred distribution method for Flatpak applications.

As you probably know, Flatpaks are normally installed from remotes, such as Flathub.
But if you install a single-file bundle, it does not have a remote as origin. In this case, Flatpak creates a new remote. Should be named something like appname-origin, which is set as the apps remote.

Now, since managing remotes is an privileged task, it will need the proper permissions to be done.

So, to install a single-file bundle on the system, you need to provide that permission. Like mentioned already, normally you should be prompted for an administration password, or you could use sudo.

However, if all you want is to test your app build, just install it to the user installation with --user.

1 Like

An additional option:
Since you already use --repo=repo when building your app, you can also add that repo as an remote, by running this command:

flatpak --user remote-add --no-gpg-verify devbuild-repo ./repo

This would add the remote devbuild-repo using the repo folder created by flatpak-builder.

Then, you can use the flatpak install and update commands as with any other remote for your development builds.