How to fix an app appearing twice in my application list

I have VLC appearing twice on my app list using Gnome desktop on Ubuntu 20.04.I had VLC installed but the app wouldn’t launch whenever I tried to. I decided to reinstall VLC,then VLC started appearing twice in my application list (one shortcut working fine and not the other).

Following MadcapJake advice on reddit, I typed: xprop WM_CLASS and clicked on the vlc tab.

The result was :
WM_CLASS(STRING) = "vlc", "vlc"

Then I typed: "vlc" StartupWMClass

It resulted in:

VLC media player Vetinari (revision
main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.

filesystem stream error: cannot open file /home/nao/StartupWMClass (No such file or directory)
QObject::~QObject: Timers cannot be stopped from another thread

>Solution :

There was another .desktop file related to VLC but not placed in the common application folder usually located in usr/share/applications
The problematic file was located into var/lib/snapd/desktop/applications

You can find the location of the problematic file by following vanadium answer on this post

Once you know where it is, remove the app (VLC)

sudo apt-get remove --purge vlc

sudo apt-get autoremove

sudo apt-get autoclean

Then you get into the repertory where the file is located by using :

cd /var/lib/snapd/desktop/applications 

(or any other path that your find command prompted you)

then you remove the file and reinstall :

sudo rm vlc_vlc.desktop 

sudo apt-get install vlc

Leave a Reply