9

I recently installed Skype on Kubuntu 20.04 via snap and I discovered that it added itself at the end of the list of applications associated with every single file type on the system! Of course, this means that for the many file types recognised by the system that don't currently have an application associated with them or unknown file types, Skype became the default application.

The only practical way I found of undoing this (practical meaning not manually going through every single file type) was to completely uninstall Skype.

Is there a way of preventing an application from doing this? Or at least, is there a simple way of undoing this after the fact?

This example is specific to Skype on snap, but I'd prefer a general answer (i.e., that would apply to any app on snap or in general) if it exists. The only answers I've seen related to similar issues with file-type associations are application-specific, so not helpful in this case.

System:

  • Operating System: Kubuntu 20.04
  • KDE Plasma Version: 5.18.8
  • KDE Frameworks Version: 5.68.0
  • Qt Version: 5.12.8
  • Kernel Version: 5.15.0-46-generic
5
  • 3
    Ugh, that's terrible. Consider filing a bug against Skype, or providing feedback some other way. Applications should not be doing that, and developers should be made aware of this.
    – marcelm
    Sep 7 at 13:12
  • 2
    @marcelm Hah, the Skype devs don't care. They used to install Skype bundled with a browser extension that turned every email address or phone number (not just links, but anything that matched the regex \d{3}-\d{4}, basically) into a Skype link. And that thing was hard to uninstall. Point is, they're not exactly subtle about the fact that their software is only one step above adware on the moral hierarchy. Sep 7 at 13:53
  • 2
    @SilvioMayolo And if no one cares enough to complain, things will never change. If enough people do voice their dismay, at least there's a chance.
    – marcelm
    Sep 7 at 14:49
  • @marcelm are you suggesting something useless to encourage people to feel helpless? consider not using skype, that actually works
    – amara
    Sep 7 at 19:15
  • 1
    @amara I don't know where you're getting that. I'm saying that if enough people complain, something may change, but if no one ever complains, it certainly won't change. (Personally, I don't use Skype, but I appreciate that that is not an option for some people)
    – marcelm
    Sep 8 at 10:00

1 Answer 1

9

I made the same experience and looked for a solution a while ago, so here is what I did and it works pretty well so far. The snap needs to be installed to do this.

First copy the corresponding .desktop-file to your home directory with

cp /var/lib/snapd/desktop/applications/skype_skypeforlinux-share.desktop ~/.local/share/applications/

Now edit ~/.local/share/applications/skype_skypeforlinux-share.desktop and remove the line

MimeType=application/octet-stream;

from the file and save it. As a last step make sure, that the .desktop-file has execute permissions:

chmod +x ~/.local/share/applications/skype_skypeforlinux-share.desktop

Done!

Of course, instead of using terminal commands, you can do the whole thing using your file manager.

Some side notes:

The MimeType-line in .desktop-files tells the system which mime types are supported by an application. This information is used to populate the open-with-lists.

The mime type application/octet-stream seems to be a bit special, since you can open any file as an application/octet-stream. I think that's the reason why the application is added to the open-with-list for any type of file.

.desktop-files with the same name in ~/.local/share/applications take precedence over .desktop-files in the system-wide locations like /usr/share/applications (for deb-packages) and /var/lib/snapd/desktop/applications (for snaps).

A .desktop-file in ~/.local/share/applications will not get overridden by reinstalling or upgrading an application.

If you want to dive deeper into the topic, I'd recommend to take a look at the freedesktop.org/specifications. This whole thing is widely used under Linux, especially under KDE, Gnome and xfce.

3
  • Thank you! That worked like a charm! But because I'm a curious bunny, adding to the answer some further details as to why/how exactly this works would be even better, if you don't mind. For example, I'm guessing files in ~/.local/ override same files in other locations. But what does the MimeType line do exactly? Links to docs/references are also fine.
    – Ratler
    Sep 7 at 21:28
  • 1
    @Ratler Sorry for the delay, I had an accident. But finally, I added some information for you to my answer.
    – mook765
    Sep 13 at 15:05
  • Thank you! I hope you're OK.
    – Ratler
    Sep 19 at 3:01

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.