Few questions about Micah Lee flatpaks manual

I am interested in this manual but there are few things that confusing and I want to clarify them:

  1. Why he says to compile that Qube Apps deb package in app qube? Why not compile it directly in template so you don’t need then to copy/paste it into template? Is it somehow dangerous to perform compilation operation in template?
  2. And, as I understand, after compilation there will appear a .deb file, yes? But where it will be located so I can find it (just never compiled anything yet)? To be honestly, made a liitle search and found commands mkdir and cp but he uses different commands for compiling than in manual from the link so then I don’t know how to specify to put the files in special directory after compiling while using his commands.
  3. And to install compiled deb file I need use dpkg -i command, right?
  4. And in general, since this method (install flatpaks directly into app qubes) looks so easy, why I don’t see references to it in new threads/manuals? Is there something wrong with this method?

In order to get the Qube Apps installer, just follow the steps described by Micah Lee in his excellent guide. Building the package should be done, however, in an AppVM, as no application software, like a compiler, should ever be run in a template. Then copy the resulting package (.deb or .rpm) to a target template and install it there via sudo apt-get install or sudo dnf install, respectively. This will make the function available in any AppVM based on that terminal and allow the installation of flatpak applications in this AppVM.

If you install the Qube Apps package in a Fedora 37 template, it will run just fine and allow you to install, run, and delete any flatpak application in any AppVM based on that terminal, I assume that this will be the same for a Debian template. There is no need to install any other software in the template or AppVM to make the Qube Apps function available.

Caution: For Fedora 38, this works only if no flatpak applications are installed in the AppVM. If there are already flatpak applications, possibly from an earlier run of Qube Apps, the script will crash with an error at line 182. For Fedora 39, Qube Apps cannot be installed, because the needed package python3-pyside2 is no longer available there. (This is the same problem as with dangerzone and probably needs the same remedy as is currently constructed there.)

2 Likes

Because it’s generally discouraged to do stuff in the template except for installing applications. A general good practice I’d say. And also, templates don’t have internet generally speaking. So it’s more convenient to do on an app qube.

Since you’re compiling something anything malicious in the compilation chain could result in a malicious artifact at the end, so I don’t think it would matter in this specific case. So you’re basically trusting that nothing is malicious if you install on the template. Regardless of whether or not you compile it in the template.

Just run the script and at the end it will tell you where the produced .deb is. Not all do this.

That or sudo apt install file.deb generally works as well and it even installs dependencies.

This is probably already better answered elsewhere if you look for “flatpaks vs. distro packaging”, so I’ll stick with the Qubes-specific stuff.

When you install flatpaks in Qubes through Qube Apps, it installs them on the app qube, not the template. This is excellent if you only really need that application in one qube. Even if it has malware and compromizes that qube your template is unharmed. However, the downside is that you need to update that application manually since automatic updates (through the Qubes updater) only update repository (non-flatpaks) installed on templates.

So besides the usual disadvantages of flatpaks (large size, often unofficial builds, system integration issues) you have a few use cases that actually justify its use despite the inconveniences.

But in the end I think installing stuff on Linux is a mess and on Qubes even more. So I actually advocated in the past for an easier way of installing flatpaks on Qubes

Related discussions

1 Like

Tried and it failed. Tried do this in Whonix disposable (since I need flatpak app in Whonix based qube and also Micah’s method perfect fits for me 'cause I need only single flatpak app and don’t want it to be installed in template). Installed git then did everything described in manual and in the end of the output it says that it’s failed to build. Providing exact log from Whonix desp. terminal:

[workstation user ~/qube-apps]% ./build_deb.sh
running bdist_deb
running sdist_dsc
running egg_info
writing qube_apps.egg-info/PKG-INFO
writing dependency_links to qube_apps.egg-info/dependency_links.txt
writing top-level names to qube_apps.egg-info/top_level.txt
reading manifest file 'qube_apps.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'qube_apps.egg-info/SOURCES.txt'
Traceback (most recent call last):
  File "/home/user/qube-apps/setup.py", line 13, in <module>
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 108, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/stdeb/command/bdist_deb.py", line 34, in run
    self.run_command('sdist_dsc')
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/stdeb/command/sdist_dsc.py", line 30, in run
    debinfo = self.get_debinfo()
              ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/stdeb/command/common.py", line 197, in get_debinfo
    debinfo = DebianInfo(
              ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/stdeb/util.py", line 934, in __init__
    for line in long_description.split('\n'):
                ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'

Qube Apps failed to build!

Tried to google that attribute error message in the end and there is solution but it’s all about python language so I understand nothing. Can someone here list exactly what steps I need to take to solve this problem? And maybe this error even not related to the problem at all and then maybe someone knows the real reason why compilation failed.

Ok, can anyone reproduce these steps and confirm that it works or not works? I just reproduced exactly all steps accordingly to the manual in other app qube and got the same failure and error message.

Also googled the usual way of installing and using flatpaks in Debian and read this official article. There are two things that I have questions about:

  1. If I install Telegram flatpak app and just run it, will it be already sendboxed or I need to do some additional steps to sandbox it? From what it says, it seems that to run it in the sandbox, you need to use some “Wayland session”.
  2. Not sure about what applications are meant in “For the Command Line” section. All apps, with and without GUI or this way can be installed only CLI applications? Can you check it, please?

I had the same issue the other day. You should report the issue on the project’s github page.

1 Like