I have an application that I'd like not to show up when I search for it is Dash. How can I keep the application, but prevent it from being found when I search for it?
-
Have you tried moving the launcher out of /usr/share/applications? – mikewhatever Apr 16 '16 at 15:30
-
when I try to do that, it tells me permission not allowed even though I am admin – Matthias Tom Apr 16 '16 at 17:32
-
You may be an admin, but in Ubutnu (unlike Windows xp), you need to use sudo to do things outside the home dir. For example, `sudo mv /user/share/applications/some-name.desktop /opt`. – mikewhatever Apr 16 '16 at 18:32
-
Wait Mike, can you tell me what that command means and how I should edit it to fit Steam? – Matthias Tom Apr 16 '16 at 19:40
-
See the answer below. – mikewhatever Apr 16 '16 at 20:11
-
No need to do anything with sudo. will post an answer in a minute. – Jacob Vlijm Apr 16 '16 at 20:22
-
*if* the answer solved your problem, as you indicated, would you be so kind to accept the answer (tick the big "V" below the up/down arrows on the left). It is the appropriate way to indicate the answer worked for you. – Jacob Vlijm Apr 17 '16 at 05:11
-
@ARS That command means: `sudo` = `Switch User and DO`, `mv` = `move` that file to `/opt` = a place where the Dash does *not* look for apps. – Apr 17 '16 at 10:12
2 Answers
To move the Steam Launcher out of /usr/share/applications, and place it into /opt, use the following command:
sudo mv /usr/share/applications/steam.desktop /opt/
The launcher should still work if you navigate to /opt and doubleclick it. An update of Steam will probably put a new launcher into /usr/share/applications.
For more info on what mv does, see man mv.
- 32,243
- 10
- 87
- 98
No need to make any changes that need sudo
How to prevent an application to show up in Dash
Copy the corresponding
.desktopfile from/usr/share/applicationsto~/.local/share/applications:cp /usr/share/applications/steam.desktop ~/.local/share/applicationsOpen the local copy with
gedit:gedit ~/.local/share/applications/steam.desktopAdd the following line to the head section of the file (before the line, starting with
Actions=)NoDisplay=trueSave the changes, cLose the file, log out and back in and you're done.
To undo
Simply remove the (local) file ~/.local/share/applications/steam.desktop
Explanation
In general, it is considered bad practice to edit global .desktop files. Not only will changes effect all users, but if you fail, the file will be irreplaceable.
A local copy of the file however will (after log out/in) will overrule the global one. Also possible updated launchers in /usr/share/applications will be overruled without further measures.
The line NoDisplay=true will prevent the application to appear in Dash/the Unity Launcher
- 82,471
- 12
- 195
- 299
-
Okay so I got up until the 3rd step. Where do I put the "Action" thing or whatever? – Matthias Tom Apr 16 '16 at 20:33
-
@ARS The `Actions=` line already exists in the file. You need to add the line `NoDisplay=true` somewhere *before* that line. – Jacob Vlijm Apr 16 '16 at 20:34
-
-
@ARS *if* the answer solved your problem, as you indicated, would you be so kind to accept the answer (tick the big "V" below the up/down arrows on the left). It is the appropriate way to indicate the answer worked for you. – Jacob Vlijm Apr 17 '16 at 05:11