0

I am trying to make a .desktop file on my desktop which opens a window of the file manager of the desktop env I'm currently in (Nautilus for Ubuntu, PCManFM for LXDE) but my file doesn't seem to work:

[Desktop Entry]
Type=Application
X-Profiles=p0;p1;
Terminal=false
StartupNotify=false

[X-Action-Profile p0]
OnlyShowIn=LXDE;
Name=PCmanFM
Icon=pcmanfm
Exec=pcmanfm ~

[X-Action-Profile p1]
OnlyShowIn=Unity;
Name=Nautilus
Icon=nautilus
Exec=nautilus ~

Is the use of X-Profilekey deprecated?
Do I need to supply a default Exec out of the profiles paragraphs?
I know from there that I can make it a right-click quicklist, but I want it to only open a window of the current file-manager.

2

X-Action-Profile is not part of the Desktop Entry Specification but seems to be an extension by PCManFM. It doesn't work with most other programs.

Using

sh -c 'xdg-open "$HOME"'

as command for Exec should work.

For the icon the Icon Naming Specification defines system-file-manager as standard icon name so that should work with most icon themes

  • thanks! about theIcon field, is there some way to have the adequate icon in each DE? – joH1 Apr 23 '16 at 16:14
  • The Icon Naming Specification defines system-file-manager as standard icon name so that should work with most icon themes. – Florian Diesch Apr 23 '16 at 16:52
  • Yeah, that worked great! Just add that to your answer and it will be complete. thanks! – joH1 Apr 24 '16 at 10:22
  • @Moonstroke: Added. – Florian Diesch Apr 24 '16 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.