qubes-issues icon indicating copy to clipboard operation
qubes-issues copied to clipboard

Chome application launchers doesn't work with qubes.StartApp

Open jevank opened this issue 2 years ago • 6 comments

How to file a helpful issue

Qubes OS release

R4.1

Brief summary

Chrome allows to install applications and creates launchers. The name of such a launcher contains the guid of the application (?) and the profile name (chrome-agimnkijcaahngcdmfeangnmldooml-Default.desktop). This is too long path to check with the prefix 'qubes-service/app-dispvm.' as qubes.StartApp does. Qubesdb's maximum path is 64, how about expanding to 128/256?

[user@dom0 ~]$ qvm-run -p -a --service -- personal qubes.StartApp+chrome-agimnkijcaahngcdmfeangaknmldooml-Default
Traceback (most recent call last):
  File "/etc/qubes-rpc/qubes.StartApp", line 39, in <module>
    main(sys.argv)
  File "/etc/qubes-rpc/qubes.StartApp", line 15, in main
    if qubes_db.read('/qubes-service/app-dispvm.' + arg) is not None:
qubesdb.Error: (0, 'Error')

Steps to reproduce

Install chrome application, sync appmenus and try to run it.

Expected behavior

Application starts

Actual behavior

Application doesn't start.

jevank avatar Apr 04 '22 13:04 jevank

This is still an issue in Qubes 4.1.2

I'm trying to install Microsoft Teams as Progressive Web App (https://andri.dk/blog/2020/10/adding-web-apps-to-the-linux-desktop)

The app installs just fine, and can be started from the commandline in the app-vm, but fails to start via the main Qubes application menu system.

"journalctl" in the appvm show me this error:

Mar 24 12:29:12 TeamsPWA qubes.StartApp+chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Default-dom0[1126]: Traceback (most recent call last):
Mar 24 12:29:12 TeamsPWA qubes.StartApp+chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Default-dom0[1126]:   File "/etc/qubes-rpc/qubes.StartApp", line 39, in <module>
Mar 24 12:29:12 TeamsPWA qubes.StartApp+chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Default-dom0[1126]:     main(sys.argv)
Mar 24 12:29:12 TeamsPWA qubes.StartApp+chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Default-dom0[1126]:   File "/etc/qubes-rpc/qubes.StartApp", line 15, in main
Mar 24 12:29:12 TeamsPWA qubes.StartApp+chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Default-dom0[1126]:     if qubes_db.read('/qubes-service/app-dispvm.' + arg) is not None:
Mar 24 12:29:12 TeamsPWA qubes.StartApp+chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Default-dom0[1126]:        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 24 12:29:12 TeamsPWA qubes.StartApp+chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Default-dom0[1126]: qubesdb.Error: (0, 'Error')

jarlethorsen avatar Mar 24 '23 11:03 jarlethorsen

It is because of filename .desktop inside of VM. I renamed it and it started to work as it should be.

dalaylapka avatar Aug 03 '23 11:08 dalaylapka

@marmarek is it reasonable to just increase the QubesDB path length limit?

DemiMarie avatar Feb 25 '24 02:02 DemiMarie

See discussion in another duplicate: https://github.com/QubesOS/qubes-issues/issues/7766

As for increasing path length limit, generally this may be a good idea, but not as a fix for this. It's a protocol change and what's worse, we don't have version protocol negotiation in qubesdb. So, it's not a material for a bugfix update.

marmarek avatar Feb 25 '24 03:02 marmarek

@marmarek what about using a collision-resistent hash as the lookup key, with a slightly different path name, if the length is too long?

DemiMarie avatar Feb 25 '24 03:02 DemiMarie

Sounds okay

marmarek avatar Feb 25 '24 03:02 marmarek