PJ-Singh-001 / Cubic

The Official Web Site for Cubic (Custom Ubuntu ISO Creator) (https://github.com/PJ-Singh-001/Cubic)
810 stars 47 forks source link

How to add flatpak package to the iso? #262

Open mirek190 opened 1 year ago

mirek190 commented 1 year ago

Simple question.

How to add flatpak package to the iso.

PJ-Singh-001 commented 1 year ago

The usual flatpak commands no longer work?

mirek190 commented 1 year ago

I tried but getting such error

root@cubic:~# flatpak install flathub org.mozilla.firefox Looking for matches?

error: Unable to load summary from remote flathub: GPG verification enabled, but no summary found (check that the configured URL in remote config is correct) root@cubic:~#

or installing from a file

root@cubic:/usr/ota# flatpak install org.mozilla.firefox.flatpakref error: No entry for app/org.mozilla.firefox/x86_64/stable in remote 'freedesktop' summary flatpak cache root@cubic:/usr/ota#

or straight from http address also error

root@cubic:/usr/ota# flatpak install https://dl.flathub.org/repo/appstream/org.mozilla.firefox.flatpakref error: No entry for app/org.mozilla.firefox/x86_64/stable in remote 'freedesktop' summary flatpak cache root@cubic:/usr/ota#

PJ-Singh-001 commented 1 year ago

I think you are missing the Flathub repository...

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --assumeyes --noninteractive flathub org.mozilla.firefox
mirek190 commented 1 year ago

I am tryind thay on elementary os 7 ( based on ubuntu 22.04 )

Still can not install ...

You have entered the virtual environment.
root@cubic:~# flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
root@cubic:~# flatpak install --assumeyes --noninteractive flathub org.mozilla.firefox
error: Unable to load summary from remote flathub: GPG verification enabled, but no summary found (check that the configured URL in remote config is correct)
root@cubic:~# 

I made some progress ...

root@cubic:~# flatpak update
Looking for updates?
Nothing to do.
root@cubic:~# flatpak repair
[47/48] Verifying appcenter:runtime/org.gnome.Epiphany.Locale/x86_64/stable?
Checking remotes...
Pruning objects
Erasing .removed
root@cubic:~# flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

flatpak install org.mozilla.firefox
Looking for matches?
F: An error was encountered searching remote ?flathub? for ?org.mozilla.firefox?: Unable to load summary from remote flathub: GPG verification enabled, but no summary found (check that the configured URL in remote config is correct)
Required runtime for org.mozilla.firefox/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/22.08) found in remote flathub
Do you want to install it? [Y/n]: y

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

    [1] /run/.heim_org.h5l.kcm-socket, xdg-download
    [2] org.a11y.Bus, org.freedesktop.FileManager1, org.freedesktop.Notifications, org.freedesktop.ScreenSaver, org.gnome.SessionManager, org.gtk.vfs.*
    [3] org.mozilla.firefox.*, org.mozilla.firefox_beta.*, org.mpris.MediaPlayer2.firefox.*
    [4] org.freedesktop.NetworkManager

        ID                                             Branch                 Op            Remote             Download
 1. [?] org.freedesktop.Platform.GL.default            22.08                  i             flathub            143.8?MB / 143.1?MB
 2. [?] org.freedesktop.Platform.GL.default            22.08-extra            i             flathub             16.2?MB / 143.1?MB
        ID                                             Branch                 Op            Remote             Download
 1. [?] org.freedesktop.Platform.GL.default            22.08                  i             flathub            143.8?MB / 143.1?MB
 2. [?] org.freedesktop.Platform.GL.default            22.08-extra            i             flathub             16.2?MB / 143.1?MB
 3. [?] org.freedesktop.Platform.Locale                22.08                  i             flathub            149.4?MB / 333.4?MB
 4. [?] org.freedesktop.Platform.openh264              2.2.0                  i             flathub            883.8?kB / 944.3?kB
 5. [?] org.freedesktop.Platform                       22.08                  i             flathub            216.9?MB / 211.7?MB
 6. [?] org.mozilla.firefox.Locale                     stable                 i             flathub             49.0?MB / 49.0?MB
 7. [?] org.mozilla.firefox                            stable                 i             flathub             94.9?MB / 91.1?MB

Warning: While trying to apply extra data: Failed to close file descriptor for child process (Operation not permitted)
Installation complete.
root@cubic:~# flatpak list  
Name                               Application ID                               Version           Branch               Origin               Installation
elementary platform                io.elementary.Platform                                         7.1                  appcenter            system
elementary platform                io.elementary.Platform                                         7.2                  appcenter            system
Calculator                         io.elementary.calculator                     2.0.2             stable               appcenter            system
Camera                             io.elementary.camera                         6.2.2             stable               appcenter            system
Captive Network Assistant          io.elementary.capnet-assist                  2.4.4             stable               appcenter            system
Music                              io.elementary.music                          7.1.0             stable               appcenter            system
Screenshot                         io.elementary.screenshot                     6.0.4             stable               appcenter            system
Videos                             io.elementary.videos                         3.0.0             stable               appcenter            system
Freedesktop Platform               org.freedesktop.Platform                     22.08.15          22.08                flathub              user
Mesa                               org.freedesktop.Platform.GL.default          23.1.6            22.08                freedesktop          system
Mesa                               org.freedesktop.Platform.GL.default          23.1.6            22.08                flathub              user
Mesa (Extra)                       org.freedesktop.Platform.GL.default          23.1.6            22.08-extra          flathub              user
Web                                org.gnome.Epiphany                           44.6              stable               appcenter            system
Document Viewer                    org.gnome.Evince                             44.3              stable               appcenter            system
File Roller                        org.gnome.FileRoller                         43.0              stable               appcenter            system
Firefox                            org.mozilla.firefox                          118.0.1           stable               flathub              user
root@cubic:~# 

Cubic shows flatpak installed but runninag that iso live I see

liberos@liberos:~/Desktop$ flatpak list
Name                      Application ID                      Version Branch Origin      Installation
elementary platform       io.elementary.Platform                      7.1    appcenter   system
elementary platform       io.elementary.Platform                      7.2    appcenter   system
Calculator                io.elementary.calculator            2.0.2   stable appcenter   system
Camera                    io.elementary.camera                6.2.2   stable appcenter   system
Captive Network Assistant io.elementary.capnet-assist         2.4.4   stable appcenter   system
Music                     io.elementary.music                 7.1.0   stable appcenter   system
Screenshot                io.elementary.screenshot            6.0.4   stable appcenter   system
Videos                    io.elementary.videos                3.0.0   stable appcenter   system
Mesa                      org.freedesktop.Platform.GL.default 23.1.6  22.08  freedesktop system
Web                       org.gnome.Epiphany                  44.6    stable appcenter   system
Document Viewer           org.gnome.Evince                    44.3    stable appcenter   system
File Roller               org.gnome.FileRoller                43.0    stable appcenter   system
liberos@liberos:~/Desktop$ sudo flatpak list
Name                   Application ID                     Version  Branch      Origin      Installation
Steam                  com.valvesoftware.Steam            1.0.0.78 stable      flathub     user
elementary platform    io.elementary.Platform                      7.1         appcenter   system
elementary platform    io.elementary.Platform                      7.2         appcenter   system
Calculator             io.elementary.calculator           2.0.2    stable      appcenter   system
Camera                 io.elementary.camera               6.2.2    stable      appcenter   system
Captive Network Assis… io.elementary.capnet-assist        2.4.4    stable      appcenter   system
Music                  io.elementary.music                7.1.0    stable      appcenter   system
Screenshot             io.elementary.screenshot           6.0.4    stable      appcenter   system
Videos                 io.elementary.videos               3.0.0    stable      appcenter   system
Freedesktop Platform   org.freedesktop.Platform           22.08.15 22.08       flathub     user
Freedesktop Platform   org.freedesktop.Platform           23.08.2  23.08       flathub     user
i386                   ….freedesktop.Platform.Compat.i386          23.08       flathub     user
Mesa                   …g.freedesktop.Platform.GL.default 23.1.6   22.08       freedesktop system
Mesa                   …g.freedesktop.Platform.GL.default 23.1.6   22.08       flathub     user
Mesa (Extra)           …g.freedesktop.Platform.GL.default 23.1.6   22.08-extra flathub     user
Mesa                   …g.freedesktop.Platform.GL.default 23.1.8   23.08       flathub     user
Mesa (Extra)           …g.freedesktop.Platform.GL.default 23.1.8   23.08-extra flathub     user
Mesa                   …freedesktop.Platform.GL32.default 23.1.8   23.08       flathub     user
Mesa (Extra)           …freedesktop.Platform.GL32.default 23.1.8   23.08-extra flathub     user
Web                    org.gnome.Epiphany                 44.6     stable      appcenter   system
Document Viewer        org.gnome.Evince                   44.3     stable      appcenter   system
File Roller            org.gnome.FileRoller               43.0     stable      appcenter   system
Firefox                org.mozilla.firefox                118.0.1  stable      flathub     user

Why firefox is visible only with sudo? and I do not see installed firefox inside system ( do not have any icon or can not run it from terminal )

natanjunges commented 9 months ago

Try using --system instead of --user, both when adding the flathub repository and installing flatpaks.

MakisH commented 3 weeks ago

I am also having trouble getting flatpak packages to work. I can install them, as for example:

root@cubic:~# sudo apt install flatpak
root@cubic:~# flatpak remote-add --system flathub https://flathub.org/repo/flathub.flatpakrepo
root@cubic:~# flatpak install --system flathub org.freecadweb.FreeCAD

(--system or not does not make any difference, it is the default. --user as root did not help either, as expected)

but when I am trying to run them in a live session, I get this error:

bwrap: Creating new namespace failed: Permission denied
error: ldconfig failed, exit status 256

To exclude that FreeCAD is not the problem, I also tried (arbitrarily) KiCAD (org.kicad.KiCad). Same behavior.