This question is regarding a debian-8 standalone VM, but I guess it would be the same for template VMs.
I have installed [Nix](http://nixos.org/nix/) package manager. With it, I have installed latest firefox release. Then, I wanted the shortcut icon to nix installed firefox to appear in dom0 desktop. Reading [Managing shortcuts to applications in AppVMs](https://www.qubes-os.org/doc/managing-appvm-shortcuts/) and with some investigation I have achieve it. Here are the steps I have followed:
- I created a symlink to `/home/user/.nix-profile/share/applications/firefox.desktop` in `/user/share/applications`
- I run `qvm-sync-appmenus MyVM` from dom0
- I added new available shortcut
Then, I see I could do that for every GUI application I install from nix. But, is there any way to make `qvm-sync-appmenus` also read from `/home/user/.nix-profile/share/applications/`? Or should I investigate from the Nix side how to automatically create symlinks to `/usr/share/applications`?
Thanks
I would do the following:
> should I investigate from the Nix side how to automatically create symlinks to `/usr/share/applications`?
in the other case you would have to modify `qvm-sync-appmenus`, which is implemented in python.
However, I think for a single VM it is easier to go with the symlink solution.
Thaks for your answer. I'm trying with it, but without luck for now :) :
http://unix.stackexchange.com/questions/310666/nix-desktop-files
It seems that freedesktop Desktop Menu Specification defines an environment variable which should contain a path with all directories with .desktop files:
https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html#paths
$XDG_DATA_DIRS/applications/
This directory contains a .desktop file for each possible menu item. Each directory in the $XDG_DATA_DIRS search path should be used (i.e. desktop entries are collected from all of them, not just the first one that exists). When two desktop entries have the same name, the one appearing earlier in the path is used.
The <DefaultAppDirs> element in a menu file indicates that this default list of desktop entry locations should be scanned at that point. If a menu file does not contain <DefaultAppDirs>, then these locations are not scanned.
I have looked at `qvm-sync-appmenus` and I don't see it reading that variable. Can anyone confirm this point?
Thanks
> If it doesn't, supporting XDG_DATA_DIRS would not help with Nix.
But couldn't I set it manually? Then Qubes should read from it that change is introduced.