Is it possible to install and use Flatpak as a non-root user?

Parke parke.nexus at gmail.com
Tue Feb 11 22:19:22 UTC 2020


Previously, I mentioned the error I encountered when trying to run:

1) The Flatpak version of GnuCash ...
2) ... using the version of Flatpak provided by Alpine Linux ...
3) ... running inside of an Alpine Linux "Mini Root Filesystem" ...
4) ... running inside of a Linux user namespace ...
5) ... created by the "lxroot" program I wrote ...
6) ... running as a non-root user ...
7) ... all on top of an Ubuntu 19.10 kernel.

For reference, here is the description of the error I encountered:

On Sat, Feb 1, 2020 at 6:29 PM Parke <parke.nexus at gmail.com> wrote:
> Now, when I try to run GnuCash, I get the following error(s):
>
> $ flatpak --user run org.gnucash.GnuCash
> ldconfig: /app/lib/libguile-2.2.so.1.3.0-gdb.scm is not an ELF file -
> it has the wrong magic bytes at the start.
>
> error: Invalid group: 1002
>
> $ id
> uid=1002 gid=1002 groups=1002,65534(nobody)

Update:  I am happy to report that I have now resolved the above
issues.  I can now run GnuCash as described in 1-7 above.

The solution:

1)  export DISPLAY=:0 inside the lxroot.

2)  Import /tmp into the lxroot to provide access to the X Server
socket.  (Xorg is running outside the lxroot, on the host Ubuntu 19.10
system.)

3)  Ensure that a proper $HOME/.Xauthority file exists inside the lxroot.

4)  Copy /etc/passwd and /etc/group into the lxroot so that Flatpak
can look up (a) the name of the current user id and (b) the name of
the current group id.

Cheers,

Parke


More information about the Flatpak mailing list