I have used Nix package manager to install Abiword in a Slackware/Salix install with Mate desktop. The application runs fine but it has not appeared in the main Menu. Is this usual for applications installed by Nix?
Asked
Active
Viewed 1,351 times
0
-
Do you have a `.desktop` file somewhere in `~/.nix-profile/` ? For example in `~/.nix-profile/etc/xdg`? (Just a guess, better use `find ~/.nix-profile -name '*.desktop'`) – Daniel Jour Nov 25 '15 at 09:09
-
No, there is no such file on my system. – rnso Nov 25 '15 at 12:46
-
It will be very useful if Nix package manager could have a GUI front-end. This front-end may have synaptic-like (used with Debian etc) package management and also a menu from which all applications installed in Nix package system can be run. – rnso Nov 25 '15 at 13:06
-
What are the values of the `XDG_CONFIG_HOME` and `XDG_CONFIG_DIRS` environment variables? As for the GUI: Nix and NixOS are still relatively young projects. With a further growing user base there probably will be a graphical frontend in the near future. – Daniel Jour Nov 25 '15 at 15:39
-
The command 'export | grep XDG' gives XDG_DATA_DIRS="/usr/local/share/:/usr/share/:/usr/share/gdm/" and XDG_SESSION_COOKIE=".....long number....." – rnso Nov 25 '15 at 15:43
1 Answers
1
I got this working on openSUSE plasma-desktop by adding the following to my bashrc
export XDG_DATA_DIRS=~/.local/share/:~/.nix-profile/share:/usr/share
cp -f ~/.nix-profile/share/applications/*.desktop ~/.local/share/applications/
Then logging out or running kbuildsycoca4
rebuilds the start menu.
When I only set the XDG_DATA_DIRS
, the icons would appear in the start menu. However kdelibs is trying to make those .desktop files executable and add a xdg-open shebang to them, which does not work since .nix-profile is not writeable.
Thus it was also necessary to copy the desktop files to a ~/.local/share/applications/
, which however also needs the XDG_DATA_DIRS set to ~/.nix-profile
, because the application icons still reside there.

knedlsepp
- 6,065
- 3
- 20
- 41