Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: qvm-sync-appmenus also parsing /usr/local/share/applications #4152

Closed
t4777sd opened this issue Jul 27, 2018 · 20 comments
Closed

Idea: qvm-sync-appmenus also parsing /usr/local/share/applications #4152

t4777sd opened this issue Jul 27, 2018 · 20 comments
Labels
C: desktop-linux help wanted This issue will probably not get done in a timely fashion without help from community contributors. P: minor Priority: minor. The lowest priority, below "default." r4.0-buster-stable r4.0-centos7-stable r4.0-dom0-stable r4.0-fc26-stable r4.0-fc27-stable r4.0-fc28-stable r4.0-fc29-cur-test r4.0-jessie-stable r4.0-stretch-stable T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.

Comments

@t4777sd
Copy link

t4777sd commented Jul 27, 2018

Qubes OS version:

4.0

Affected component(s):

Application menu syncing

Steps to reproduce the behavior:

  1. Install any locally installed app that a user may want in a particular VM, but not other VMs and they do not want to make it installed in all VMs and make a bunch of clones of VMs (as that creates its own problems)

  2. Desktop file will be placed in /usr/local/share/applications

  3. Sync the app menu and you will see it does not detect the apps

Expected behavior:

It would be nice if desktop files also looked in /usr/local/share/applications. This provides a mechanism to install software locally without making a lot of template clones.

I understand why ~./.local/share/applications is excluded because it appears some apps install to both that and /usr/share/applications so that would require trying to parse out duplicates etc.

However, no packaged apps install into /usr/local/share/applications and that folder is local to the AppVM too.

Motivation for locally installed apps

The primary motivation is because a single change does not warrant a template clone as that creates a bunch of other issues (resource issues, menu cluttering issues, etc).

  1. The appvm wants to run a different version of software than those in other appvms

  2. The application is less trusted so better to keep it entirely contained in the appvm

  3. The software only belongs in one appvm and its not efficient to create a new template just because of that one software

  4. The software is downloaded from the internet, only belongs in oen appvm, and it makes little since to transfer it to the templatevm (as that has no internet to download it) when it can just be kept in that appvm which is the only place it should run.

@t4777sd t4777sd changed the title qvm-sync-appmenus also parsing /usr/local/share/applications Idea: qvm-sync-appmenus also parsing /usr/local/share/applications Jul 27, 2018
@marmarek
Copy link
Member

I understand why ~./.local/share/applications is excluded because it appears some apps install to both that and /usr/share/applications so that would require trying to parse out duplicates etc.

Actually handling duplicates shouldn't be a problem - the current code should do that well.

As for the general idea, I like it and in fact it shouldn't be that hard to implement. Mostly dom0 part of qvm-sync-appmenus (and actual .desktop files generating code) consider multiple template directories: one for template and in addition one for VM-private applications. The code lives here:
https://github.com/QubesOS/qubes-desktop-linux-common/tree/master/qubesappmenus

@andrewdavidwong
Copy link
Member

Why isn't this a use case for bind-dirs?

@andrewdavidwong andrewdavidwong added T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. C: desktop-linux help wanted This issue will probably not get done in a timely fashion without help from community contributors. P: minor Priority: minor. The lowest priority, below "default." labels Jul 28, 2018
@andrewdavidwong andrewdavidwong added this to the Far in the future milestone Jul 28, 2018
@t4777sd
Copy link
Author

t4777sd commented Jul 28, 2018

Do you mean make /usr/share/applications a binded dir? The issue with that is then it would no longer update when the TemplateVM installs new software.

@marmarek
Copy link
Member

Exactly as @t4777sd said. Plus, dom0 right now downloads application list only from TemplateVMs (and StandaloneVMs). It would be fine for substituting existing desktop files, but not for adding new ones.

@andrewdavidwong
Copy link
Member

andrewdavidwong commented Jul 28, 2018

Ok, but what about symlinking or copying the needed files at VM startup with /rw/config/rc.local?

Edit:

Oh, I guess this means that the above wouldn't work:

Plus, dom0 right now downloads application list only from TemplateVMs (and StandaloneVMs). It would be fine for substituting existing desktop files, but not for adding new ones.

@t4777sd
Copy link
Author

t4777sd commented Jul 31, 2018

Another related issue to this one is that icons are not read when they exists on the private storage. As a result, it receives a default padlock icon. Maybe or maybe not related to this, but in the default install nautilus does not have an icon image. My guess is that it is related.

marmarek added a commit to marmarek/qubes-desktop-linux-common that referenced this issue Oct 9, 2018
Add support for multiple appmenus templates dir. Specifically,
TemplateBasedVM can have own appmenus templates (for example extracted
from ~/.local/share/applications), which extend/override those from
the template. Technically, each VM have now a list of appmenus template
directories (not a single dir), which are searched in relevance order
(up in 'template' hierarhy).

This is especially useful if one install and application in
TemplateBasedVM for example in user home or /usr/local. This makes it
easier to add such application to the menu.

For this change to work properly, there is a need for change in
qubes.GetAppmenus service on the VM side, to not report applications
installed on /, if changes in / are not persistent there (i.e.
TemplateBasedVM). Otherwise applications installed in templates will be
retrieved multiple times, wasting time and disk space. But updating VM
later should clean this up.

Fixes QubesOS/qubes-issues#4152
marmarek added a commit to marmarek/qubes-desktop-linux-common that referenced this issue Oct 9, 2018
@qubesos-bot
Copy link

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.0 testing repository for the CentOS centos7 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-core-agent_4.0.37-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.37-1.fc26) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-desktop-linux-common-4.0.16-1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-desktop-linux-common_4.0.16-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component desktop-linux-common (including package qubes-desktop-linux-common-4.0.16-1.fc26) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-desktop-linux-common_4.0.16-1+deb9u1 has been pushed to the r4.0 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component desktop-linux-common (including package qubes-desktop-linux-common-4.0.16-1.fc26) has been pushed to the r4.0 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-desktop-linux-common-4.0.16-1.fc25 has been pushed to the r4.0 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package desktop-linux-common has been pushed to the r4.0 stable repository for the Fedora centos7 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: desktop-linux help wanted This issue will probably not get done in a timely fashion without help from community contributors. P: minor Priority: minor. The lowest priority, below "default." r4.0-buster-stable r4.0-centos7-stable r4.0-dom0-stable r4.0-fc26-stable r4.0-fc27-stable r4.0-fc28-stable r4.0-fc29-cur-test r4.0-jessie-stable r4.0-stretch-stable T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

No branches or pull requests

4 participants