command line – flatpak calibre: Cannot read from /home/nicholas/in.epub (permissions?)

Looking to convert an epub to mobi with calibre:

nicholas@gondor:~/ebooks$ 
nicholas@gondor:~/ebooks$ flatpak --command="sh" run com.calibre_ebook.calibre -c "ebook-convert ~/in.epub ~/out.mobi"
Cannot read from /home/nicholas/in.epub
nicholas@gondor:~/ebooks$ 
nicholas@gondor:~/ebooks$ ll
total 1200
drwxrwxr-x  2 nicholas nicholas    4096 Jul 18 13:43 ./
drwxr-xr-x 28 nicholas nicholas    4096 Jul 18 13:16 ../
-rw-r--r--  1 nicholas nicholas 1220236 Jul 18 13:16 in.epub
nicholas@gondor:~/ebooks$ 
nicholas@gondor:~/ebooks$ uname -a
Linux gondor 5.8.0-59-generic #66-Ubuntu SMP Thu Jun 17 00:46:01 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
nicholas@gondor:~/ebooks$ 
nicholas@gondor:~/ebooks$ flatpak info com.calibre_ebook.calibre

calibre - The one stop solution to all your e-book needs

          ID: com.calibre_ebook.calibre
         Ref: app/com.calibre_ebook.calibre/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 5.23.0
     License: GPL-3.0
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 360.9 MB
     Runtime: org.freedesktop.Platform/x86_64/20.08
         Sdk: org.freedesktop.Sdk/x86_64/20.08

      Commit: 13464e660f35716a725261af4b45d3abc199a3ce52ebdd9ee887c7ae623b5873
      Parent: 4f7f3b603f31cc781caf8260f887118a1bb466748891c9e122826728e25d3eed
     Subject: Update calibre-5.22.1-x86_64.txz to 5.23.0 (9184a3f3)
        Date: 2021-07-11 19:56:21 +0000
nicholas@gondor:~/ebooks$ 

The file was readable and converted to mobi fine with an online converter. The converted file loaded on a Kindle fine, so there’s presumably no problem with the epub itself. The book is readable on the Kindle, converted fine.

How is this accomplished from the console using the flatpak install of calibre?


note: the GUI for calibre reads from the home directory fine and adds books to its library. This book is, in fact, in the calibre library. The scope of the question is just how to use the conversion script for the flatpak install of calibre.

There’s nothing odd or unique about permissions to directories, it’s a vanilla install. Presumably some flatpak weirdness.

bash – Assign flatpak run org.chromium.Chromium to an alias

I am using https://www.cypress.io/ for react components e2e testing. The CypressJS could not detect the installed Chromium on my computer, because I have installed it with flatpark.

One of the contributor of CypresJS told me the following:

It appears that we do not currently support flatpak browser detection
due to flatpaked programs not appearing in path. If you can assign
flatpak run org.chromium.Chromium to an alias or a standalone
executable in $PATH, the autodetection may work.

Is it possible to assign flatpak run org.chromium.Chromium to an alias? If yes, then how?

kde – Icon problem installing 2 different versions of the same application via flatpak

I recently installed both versions of the same application via flatpak (QGIS, “stable” and “lts” branches). After installation, however, I could start only the last installed version (branch “lts”) from the application menu (KDE). I can instead start both versions using the terminal with:

flatpak run --branch=stable org.qgis.qgis  

flatpak run --branch=lts org.qgis.qgis  

So I thought about creating a second entry in the applications menu for the “stable” version of the application with a menu editor (kmenuedit) using a different icon to distinguish the two versions. The application started but the icon was the same for both versions.
The two versions of the application are installed in:

/var/lib/flatpak/app/org.qgis.qgis/x86_64/lts  
/var/lib/flatpak/app/org.qgis.qgis/x86_64/stable  

Each version has its own org.qgis.qgis.desktop file and its own icon folder in its own folder. I tried to change the path of the icon in the .desktop file of the version I wanted to differentiate and this worked for the applications menu but not for the taskbar and the dock (Latte Dock) where the same icon always appears for both versions.
I noticed that in addition to the org.qgis.qgis.desktop files inside the folders of each of the two versions of the application I have another org.qgis.qgis.desktop file related only to the version installed last in:

/var/lib/flatpak/exports/share/applications  

where there are the .desktop files for all applications (Darktable, RawTherapee, Zoom etc.) installed via flatpak. The application icons (along with the icons of all other applications installed via flatpak) are installed in:

/var/lib/flatpak/exports/share/icons  

How could I be able to use two different icons that work both in the application menu, in the taskbar and in the dock?

Adding Flatpak program to Debian alternatives

As the error message implies, ‘update-alternatives’ deals with file paths, not with runnable command lines – it needs to be given an actual file that it would place at “/usr/bin/gnome-www-browser”. (The alternatives system doesn’t even distinguish whether something is a program or not.)

Flatpak provides executable links of every program at /var/lib/flatpak/exports/bin (one per flatpak ID, corresponding to its default branch), so you should be able to use:

update-alternatives --install /usr/bin/gnome-www-browser 
                              gnome-www-browser 
                              /var/lib/flatpak/exports/bin/org.mozilla.firefox

Otherwise write a one-line shell script, put it somewhere in /usr/local, and give that to update-alternatives.

package management – Viewing the contents of a flatpak

When I install a package, I like to see what it’s installed. With apt I can use apt-file show, with AppImages I can view the mounted filesystem, and with Snap I could mount the snap without running it to see the contents.

How do I do the equivalent with a flatpak? Preferably, before running it?

why are there multiple ways to install (apt, snap, flatpak)

Using Ubuntu 20.04. When a program is missing, for example curl, the command line suggests to install by sudo apt install curl. Sometimes it’s snap or flatpak instead of apt.

What is the reason there are so many ways to install an app?

permissions – PHPStorm (flatpak) cannot access / var / www

A brief introduction about me
I just installed Feren OS (which is based on Ubuntu if I'm correct). As a web developer, I work with the Linux and Unix command line on a daily basis, but only for fairly simple things. So I still consider myself a Linux newbie.

Introduction to my question
The question I'm about to ask has been asked before (I have googled it). However, the situations mentioned seem to be a little different and the answers provided did not solve my problem.

As mentioned above, I use Feren OS, so my problem may be specific to that distribution. I am asking my question here on AskUbuntu, because my goal is to learn a lot about Linux and this is one of the largest communities. So if this is the wrong place to ask this question please say so but otherwise I would appreciate any help.

My problem
First of all, I installed Apache2 from the command line (using apt). I have created a fully functional job website at / var / www / projects / some_website / web. This part is also what I am familiar with for my daily work.

I have also installed PHPStorm (flatpak) from the store. The store itself is (depending on your box) a custom Feren OS store. However, I would say that has nothing to do with the problem I am having.

In Feren OS I am logged in as user "paul".

Now when, as user "Paul", I open the terminal, I can go anywhere. For example, I can go to "/ var / www". I can create directories there, share them, etc. As I said, this part I am familiar with.

However, from PHPStorm I can go to "/ var", but I can't see all the directories there. Even when I type "/ var / www" in the address box there, it can't go there.

For comparison, I also opened the text editor Kate. This program can access "/ var / www" as you would expect.

PHPStorm screenshot that cannot access / var / www, while the terminal can

What I tried to fix
The answers I found on the internet mainly mentioned that the user should be added to the www data group and / var / www / should belong to that group.

While I consider this solution to be pointless in my case, I did try. I think it doesn't make sense, because other applications running under the same user can access the directory.

To be safe, I have added user "Paul" to the group "www-data" and have chosen / var / www to that group, as you can see in the attached screenshot.

My questions
1. What is the difference between PHPStorm and Konsole and Kate? That makes PHPStorm unable to access / var / www /, while all other tools do.

  1. What should I do to solve this problem?

How do I interpret the `flatpak install` output?

I am simply trying to install Spotify with flatpak install spotify. Here is the output:

Looking for matches…
Found similar ref(s) for ‘spotify’ in remote ‘flathub’ (system).
Use this remote? (Y/n): y
Found ref ‘app/com.spotify.Client/i386/stable’ in remote ‘flathub’ (system).
Use this ref? (Y/n): y
Required runtime for com.spotify.Client/i386/stable (runtime/org.freedesktop.Platform/i386/18.08) found in remote flathub
Do you want to install it? (Y/n): y

com.spotify.Client permissions:
    ipc                    network                pulseaudio               x11            dri
    file access (1)        dbus access (2)        bus ownership (3)        tags (4)

    (1) xdg-music:ro, xdg-pictures:ro
    (2) org.freedesktop.Notifications, org.gnome.SessionManager, org.gnome.SettingsDaemon
    (3) org.mpris.MediaPlayer2.spotify
    (4) proprietary


        ID                                             Gren           Op         Remote          Hämta
 1. (✓) org.freedesktop.Platform.Locale                18.08          i          flathub            25,6 kB / 316,0 MB
 2. (—) org.freedesktop.Platform.VAAPI.Intel           18.08          u          flathub             1,9 MB / 1,9 MB
 3. ( ) org.freedesktop.Platform.html5-codecs          18.08          u          flathub           < 3,4 MB
 4. ( ) org.freedesktop.Platform                       18.08          i          flathub         < 306,7 MB
 5. ( ) com.spotify.Client                             stable         i          flathub         < 109,0 MB

A list of dark permissions, fine, but after that? A numbered list of identifications? Op i/u? I don't know what you are trying to say. Will realize un install operations ..? At least the permissions section had a header.

I looked at the reference documentation for flatpak install but found no description of the output.

In addition, after accepting the above without knowing what it meant, the installation process is constantly interrupted and requires me to authenticate, which forces me to stay and monitor the entire process. Why do you ask me to authenticate again and again instead of just once? I just aborted the process after 3+ authentications since I don't feel like taking care of this thing ...


Ubuntu MATE 18.4 32 bit

Flatpak bitcoin-core does not generate the .cookie file

I am using the version of Bitcoin-Qt 0.18.1 that comes with Flatpak. I've searched the Bitcoin datadir, which is in ~/.var/app/org.bitcoincore.bitcoin-qt/data/ and there is not .cookie file there. This prevents me from running Electrum Personal Server.

My distribution of Linux is MX Linux.

My bitcoin.conf it is empty.

Where are flatpak executables stored?

I am trying to make Flatpak Libreoffice the default application to open files in Thunderbird.

At the moment, Thunderbird (also a flatpak) is using the default system controller. I tried to change it but I can't find where the libreoffice executable is on my system.

Where are the flatpak executables?