3

I created a desktop launcher, to open Nautilus as root.

It does not show up in the activities search or in All applications.

How can I fix this?

[Desktop Entry]
Name=Files (Admin)
Comment=Access and organize files as root
Exec=gksudo nautilus %U
Icon=system-file-manager
Terminal=false
Type=Application
StartupNotify=true
OnlyShowIn=GNOME;Unity;
Categories=GNOME;GTK;Utility;Core;
MimeType=inode/directory;application/x-gnome-saved-search;
Keywords=folder;manager;explore;disk;filesystem;root;admin;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=3.2.1
X-Ubuntu-Gettext-Domain=nautilus
david6
  • 14,499
  • Did you copy it into ~/.local/share/applications? – david6 Jan 24 '15 at 23:03
  • Did you review: https://askubuntu.com/questions/13758/how-can-i-edit-create-new-launcher-items-in-unity-by-hand ? Why are you NOT using eog.desktop* as a template?* – david6 Jan 24 '15 at 23:12
  • No I put it in /usr/share/applications – RISC OS 3 Jan 25 '15 at 06:06
  • Not recommended. Did you change ownership? I tested from .local and it WORKS, under 14.04. – david6 Jan 25 '15 at 06:14
  • Where do I find "eog.desktop"? Also when I create ~/.local/share/applications/nautilus-admin.desktop and save it in gedit it becomes nautilus-admin.desktop.desktop. How can I stop the second desktop from being added? Do I need to reboot to get it to work? I have found out how to stop the extra .desktop being added. I have the file there but gnome shell doesn't show it when I search – RISC OS 3 Jan 25 '15 at 06:34
  • Read my response to: https://askubuntu.com/questions/13758/how-can-i-edit-create-new-launcher-items-in-unity-by-hand This method works for me. – david6 Jan 25 '15 at 06:52
  • Hi. I did what you said in your response but it still doesn't show up – RISC OS 3 Jan 25 '15 at 07:37
  • Ok... now I have a launcher that opens nautilus but not if I use gksudo, then it doesnt show up in gnome when I search for apps – RISC OS 3 Jan 25 '15 at 07:51

3 Answers3

4

Usually this is Due to a Wrong or Missing Exec Command Path... So Triple Check the Exec Command and Eventually Set the Absolute Path to the Binary.

  • it was useful for me but I want to add another surplus. If you deal with aliases (for instance in~/.bash_aliases) you must use the command introduced by Radu Radeanu : Exec=bash -ic "alias_name" instead of a simple Exec=alias_name in the .desktop file. – AvyWam Apr 28 '23 at 22:52
0

This works like a charm :-)

sudo cp ~/.local/share/applications/name.desktop /usr/share/applications/
0

I encountered this with an AppImage after swapping out the old image with the newly downloaded image. The issue was I hadn't marked the new image as executable yet.

chmod +x /path/to/new/appimage

After making the new image executable it was picked up after I logged back in.