Anbox: [Suggestion] Use system launcher instead of Anbox Application Manager

Created on 7 Jun 2018  路  4Comments  路  Source: anbox/anbox

Wouldn't be _more native_ to use the desktop environment's application launcher instead of Anbox Application Manager?
I see that there are already .desktop files for each installed apk under ~/snap/anbox/common/app-data/applications/anbox, so why not symlink those to ~/.local/share/applications? Then create a new Anbox category for category-based application menus and an Anbox app folder for GNOME's overview.

help wanted session manager

Most helpful comment

You're right, we need a better integration with the outer system but sadly snaps don't allow (yet) to provide dynamically created .desktop files to the outer system. Because of this we can't do the symlink automatically from within the snap.

That said, there are multiple things which are possible:

  • Package Android applications as snaps. This is very attractive as people can then distribute Android applications via the snap store as they were regular apps. Each snap then provides exactly one .desktop file to the host system and integrates quite well.
  • Discuss with snapd upstream if dynamic creation of .desktop files and distributing them to the host is acceptable and can be supported.
  • Another approach would be to provide a gnome shell search provider (see https://developer.gnome.org/SearchProvider/) from the Anbox snap. This way we can always populate a good list of applications to the shell. However even this is not possible without manually placing a file in $(datadir)/gnome-shell/search-providers but there is a thread discussion this (see https://forum.snapcraft.io/t/gnome-shell-search-providers-in-snaps/5265)

All 4 comments

You're right, we need a better integration with the outer system but sadly snaps don't allow (yet) to provide dynamically created .desktop files to the outer system. Because of this we can't do the symlink automatically from within the snap.

That said, there are multiple things which are possible:

  • Package Android applications as snaps. This is very attractive as people can then distribute Android applications via the snap store as they were regular apps. Each snap then provides exactly one .desktop file to the host system and integrates quite well.
  • Discuss with snapd upstream if dynamic creation of .desktop files and distributing them to the host is acceptable and can be supported.
  • Another approach would be to provide a gnome shell search provider (see https://developer.gnome.org/SearchProvider/) from the Anbox snap. This way we can always populate a good list of applications to the shell. However even this is not possible without manually placing a file in $(datadir)/gnome-shell/search-providers but there is a thread discussion this (see https://forum.snapcraft.io/t/gnome-shell-search-providers-in-snaps/5265)

As a quick and dirty I had set up a cron entry to symlink from .local/share/applications to ~/snap/anbox/common/app-data/applications/anbox . This worked great in Gnome3 for about a day, but now the ~/snap/anbox/common/app-data/applications/anbox directory is empty. Very odd, and probably an Anbox bug?!?

Hi, has any progress been made in this front?

Personally I think that shipping apps as snaps is a great idea. I don't know much about snap packages development, but as a software developer, a dynamic script to create .desktop files sounds to me pretty simple for most of the big distros, and smaller ones don't have to be necessarily suported for this particular feature if that were to mean a lot of work that you don't want to put into enabling support in them as well.

As a quick and dirty I had set up a cron entry to symlink from .local/share/applications to ~/snap/anbox/common/app-data/applications/anbox . This worked great in Gnome3 for about a day, but now the ~/snap/anbox/common/app-data/applications/anbox directory is empty. Very odd, and probably an Anbox bug?!?

Not sure why a symlink would cause problems, but a bind mount may be more effective. You can add the following to /etc/fstab, replacing with your username:

/home/<YOUR_USERNAME>/snap/anbox/common/app-data/applications/anbox
/home/<YOUR_USERNAME>/.local/share/applications/anbox none defaults,bind 0 0

Then do:

mkdir -p ~/.local/share/applications/anbox
sudo mount ~/.local/share/applications/anbox
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ashakranthi picture ashakranthi  路  4Comments

dsdmsa picture dsdmsa  路  3Comments

GitSoftwareNow picture GitSoftwareNow  路  3Comments

alxlg picture alxlg  路  4Comments

lukedoomer picture lukedoomer  路  3Comments