How to Hide Your App Icon in Ubuntu 24.04 | 22.04

Last updated: May 24, 2024 — Leave a comment

Got an application, but you want to make it in-visible from start menu, app grid, app launcher and dock? Here’s how to do the trick in Ubuntu 24.04, Ubuntu 22.04, Ubuntu 20.04, though it should also work in most other Linux.

It’s easy to do the trick by adding a rule into the ‘.desktop’ file for that application. It’s:

  • NoDisplay=true – hide app icon from app launcher, but still visible from associated files’ “Open With” dialog.
  • Hidden=true – complete hide the app, unless launching from command line.

For GNOME, the default desktop environment for Ubuntu, there’s also an extension can do the job by adding option to app icon’s right-click menu.

Method 1: Hide App Icon by Configuring the .desktop Shortcut file

1. Locate the .desktop shortcut file

First, you have to find out where and the file-name of the shortcut file for your application.

  • To do so, press Ctrl+Alt+T on keyboard to open terminal. When terminal opens, run command to install plocate (or mlocate for Ubuntu 20.04):
    sudo apt install plocate && sudo updatedb
  • Then, run command to locate the shortcut file for your app (mpv for example):
    locate "*mpv*desktop"

    In this command, it will output any file-name that contains “mpv” (change the keyword depends on your app name) in between, and ends with ‘desktop’.

The command may output multiple files, choose one according to file PATH:

  • for native .deb apps, the shortcut files are usually installed to:
    • /usr/share/applications
    • /usr/local/share/applications
    • or .local/share/applications
  • for Snap apps, looking for /var/lib/snapd/desktop/applications directory.
  • for Flatpak apps, they are usually installed to:
    • /var/lib/flatpak/exports/share/applications/
    • or .local/share/flatpak/exports/share/applications/

2. One command to hide the app icon

Once you found out the app shortcut file, hide it simply by running command:

sudo desktop-file-edit --set-key=NoDisplay --set-value=true /usr/share/applications/mpv.desktop

In last command:

  • replace NoDisplay with Hidden to also hide it from ‘Open With’ dialog.
  • replace “/usr/share/applications/mpv.desktop” according to last step.
  • skip sudo for the shortcut located in .local/ sub-directories.

Besides using desktop-file-edit command, you may edit the shortcut file using your favorite text editor, for example, run:

sudo gedit /usr/share/applications/mpv.desktop

Replace gedit with gnome-text-editor for 24.04. Then, add either NoDisplay=true or Hidden=true under “[Desktop Entry]”.

The app icon should disappear a few seconds later. If NOT, try refreshing the database by running command sudo update-desktop-database.

Step 2: Use Extension to Hide App Icon (GNOME Only)

For Ubuntu 22.04, Ubuntu 24.04, and other Linux with GNOME 42 and higher, there’s an extension to make the process easier.

1. First, search for and install “Extension Manager” from either Ubuntu Software or App Center.

Install Extension Manager in Ubuntu Software/App Center

2. Then, launch “Extension Manager”. Navigate to “Browse” tab, then search & install “App Hider” extension.

Other Linux can go to extension web page, and use ON/OFF switch to install it.

3. After installation, right-click on desired app icon in the “Show Applications” screen and select “hide”.

Right-click app icon to hide

For choice, user can launch “Gnome Extensions” or “Extensions Manager” to open the Preferences dialog. There, it lists all hidden apps as well as un-hide options.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: Buymeacoffee | https://ko-fi.com/ubuntuhandbook1 |

No Comments

Be the first to start the conversation.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*