qBittorrent associates itself to all file formats

qBittorrent (qbittorrent 4.3.3-1 installed from the community repo) is associating itself to all file types. I had reported this issue to qBittorrent’s GitHub but it seems that it’s happening only to me.

In the file association MIME type for the launcher, the only type is listed as application/x-bittorrent but it’s showing up for every filetype when in the File Associations settings and also using “open with” in Dolphin.

Please help me out.

inxi -Fazy
System:
  Kernel: 5.11.6-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.11-x86_64 
  root=UUID=fe64fafd-1c2a-4b55-846f-c264196ff166 rw nomce "acpi_osi=Windows 
  2018" quiet resume=UUID=4517ac81-4ac6-42a0-8e7a-a5870b5f98df 
  Desktop: KDE Plasma 5.21.3 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 
  dm: GDM 3.38.2.1, SDDM Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: HP product: HP Pavilion Laptop 14-bf1xx 
  v: Type1ProductConfigId serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: HP model: 83CE v: 59.38 serial: <filter> UEFI: Insyde v: F.31 
  date: 10/30/2017 
Battery:
  ID-1: BAT1 charge: 42.3 Wh (100.0%) condition: 42.3/42.3 Wh (100.0%) 
  volts: 13.2 min: 11.6 model: Hewlett-Packard PABAS0241231 type: Li-ion 
  serial: <filter> status: Full 
CPU:
  Info: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP 
  arch: Kaby Lake note: check family: 6 model-id: 8E (142) stepping: A (10) 
  microcode: E0 cache: L2: 8 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 32012 
  Speed: 900 MHz min/max: 400/1800 MHz Core speeds (MHz): 1: 900 2: 900 3: 842 
  4: 800 5: 800 6: 800 7: 800 8: 800 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX unsupported 
  Type: l1tf mitigation: PTE Inversion 
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: conditional, RSB filling 
  Type: srbds mitigation: Microcode 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Hewlett-Packard driver: i915 
  v: kernel bus-ID: 00:02.0 chip-ID: 8086:5917 class-ID: 0300 
  Device-2: NVIDIA GM108M [GeForce 940MX] vendor: Hewlett-Packard 
  driver: nvidia v: 460.56 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 
  chip-ID: 10de:134d class-ID: 0302 
  Device-3: Chicony HP Wide Vision HD Camera type: USB driver: uvcvideo 
  bus-ID: 1-5:14 chip-ID: 04f2:b5d6 class-ID: 0e02 
  Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: 
  loaded: modesetting,nvidia display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 115 s-size: 424x238mm (16.7x9.4") 
  s-diag: 486mm (19.1") 
  Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 158 size: 309x173mm (12.2x6.8") 
  diag: 354mm (13.9") 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.3.4 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard 
  driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 
  chip-ID: 8086:9d71 class-ID: 0403 
  Sound Server-1: ALSA v: k5.11.6-1-MANJARO running: yes 
  Sound Server-2: sndio v: N/A running: no 
  Sound Server-3: JACK v: 0.125.0 running: no 
  Sound Server-4: PulseAudio v: 14.2 running: no 
  Sound Server-5: PipeWire v: 0.3.23 running: yes 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Hewlett-Packard driver: r8168 v: 8.048.03-NAPI modules: r8169 
  port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200 
  IF: eno1 state: down mac: <filter> 
  Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel port: 3000 
  bus-ID: 03:00.0 chip-ID: 8086:095a class-ID: 0280 
  IF: wlo1 state: up mac: <filter> 
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
  bus-ID: 1-4:3 chip-ID: 8087:0a2a class-ID: e001 
  Report: This feature requires one of these tools: hciconfig/bt-adapter 
Drives:
  Local Storage: total: 1.03 TiB used: 602.93 GiB (57.4%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM035-1RK172 
  size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 5400 rpm serial: <filter> rev: RSM7 scheme: GPT 
  ID-2: /dev/sdb maj-min: 8:16 vendor: SanDisk model: SD8SN8U-128G-1006 
  size: 119.24 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: SSD serial: <filter> rev: 0006 scheme: GPT 
Partition:
  ID-1: / raw-size: 50 GiB size: 48.72 GiB (97.43%) used: 28.74 GiB (59.0%) 
  fs: ext4 dev: /dev/sdb5 maj-min: 8:21 
  ID-2: /boot/efi raw-size: 277 MiB size: 276.4 MiB (99.80%) 
  used: 280 KiB (0.1%) fs: vfat dev: /dev/sdb1 maj-min: 8:17 
  ID-3: /home raw-size: 60.87 GiB size: 59.67 GiB (98.02%) 
  used: 49.92 GiB (83.7%) fs: ext4 dev: /dev/sdb2 maj-min: 8:18 
Swap:
  Kernel: swappiness: 5 (default 60) cache-pressure: 50 (default 100) 
  ID-1: swap-1 type: partition size: 8.1 GiB used: 3.57 GiB (44.0%) 
  priority: -2 dev: /dev/sdb3 maj-min: 8:19 
Sensors:
  System Temperatures: cpu: 41.0 C mobo: 29.8 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 337 Uptime: 2d 9h 39m wakeups: 29 Memory: 7.69 GiB 
  used: 5.66 GiB (73.6%) Init: systemd v: 247 tool: systemctl Compilers: 
  gcc: 10.2.0 clang: 11.1.0 Packages: 2109 pacman: 2108 lib: 469 flatpak: 1 
  Shell: fish v: 3.1.2 running-in: tmux: inxi: 3.3.03 

Maybe you can try to cleanup the file association in KDE Settings → Applications → Files Association? expand categories, click on the first one and with down arrow key review each one and when you see qbittorrent on right panel you remove it. Just a suggestion, it can be pretty time consuming.
Also maybe simply try to set the default association in Dolphin for all these files you see qbittorrent in right click menu, select open with another… chose the application and tick the box Remember file association.

I know I had the issue before, and I think I did a little bit of both methods, and if I look at it now I don’t see qbittorrent anywhere in right click menus except for torrent files.

I may have also reset KDE at some point, deleting the major user config files, so it may be it something along those lines, for an unrelated problem:

cd ~/.config
mv *rc plasma-old/
mv kdeglobals plasma-old/

I don’t think either of these solutions is proportionate for such a minor bug.

Then just try renaming ~/.config/mimeapps.list first…
From the menu, type associations to bring up the GUI.

1 Like

I’ve used qBittorrent for years and have never observed this behavior at all.

Ben looks like he has your solution, though.

Cheers.

@LoBrau Yes, it’s indeed very weird.

@Ben That seems to have fixed the issue. I had to manually adjust some defaults, but it only took minutes. Thanks!

1 Like

Cool. Mark it Solved :wink:

I did.

1 Like

just happened to me,
qibittorrent is everywhere.
usually i use magnet links but today i clicked on a torrent file and chose open with…

i don’t fully understand @Ben solution
in ~/.config/mimeapps.list i only have these lines:

[Added Associations]
application/octet-stream=org.qbittorrent.qBittorrent.desktop;

can i just delete these line?
if not, what do i rename this file to(mimeapps.list.bak)?
and i assume it would get recreated if needed?

and what does this means:

does this refers to @omano solution?

It simply means you can type ‘associations’ in krunner or application launcher to get the GUI settings for file associations.

From there you can type in the search window ‘torrent’.
In mine, the list narrows down to “application>x-bittorrent” and in the General pane opposite, I see

'Application Preference Order'.
qBittorrent
KTorrent
KGet

Magnet links aren’t shown here - I previously decided to keep qBittorrent for my private stuff, and try other apps for magnet…

So for this, you can go to a terminal. Using ‘xdg-utils’ package you can type:

╰─ xdg-mime --help                                                                                        
   xdg-mime -- command line tool for querying information about
   file type handling and adding descriptions for new file types

Synopsis

   xdg-mime query { filetype | default } ...

   xdg-mime default application mimetype(s)

   xdg-mime install [--mode mode] [--novendor] mimetypes-file

   xdg-mime uninstall [--mode mode] mimetypes-file

   xdg-mime { --help | --manual | --version }

Use 'man xdg-mime' or 'xdg-mime --manual' for additional info.
1 Like

His issue is that qbitorrent is listed for most file type as possible application, like right click text files, you see qbittorrent there, right click an image, you see qbittorent there too…

I don’t know why it does that as qbittorrent is in theory only associated for application>x-bittorrent, but it happens, probably because no default application is selected/memorized for these specific file types, or maybe some other bug in KDE.

1 Like

Yes, that’s very strange.

that’s my issue,most of my files that are obviously not related to a torrent client,tries to open with qbitorrent.
qbitorrent also has put himself in all the applications as the first option in “file association”.

so what do i do with that ~/.config/mimeapps.list file;
-can i just delete it since i only have there qbittorent related associations and the system will recreate it if needed?
-or just delete it’s content?(should i then leave the [Added Associations] line only?)
-or rename it?

I’d like to see the output from your terminal:

  1. Copy the output.
  2. Hit ‘Hide details’ cog
  3. type three backticks ```
4. Paste
  1. type three backticks ```
cat ~/.config/mimeapps.list
[Added Associations]
application/json=visual-studio-code.desktop;
application/pdf=qpdfview.desktop;okularApplication_pdf.desktop;wps-office-pdf.desktop;llpp.desktop
;firefox.desktop;gimp.desktop;google-chrome.desktop;
application/x-bittorrent=org.qbittorrent.qBittorrent.desktop;
audio/mpeg=audacious.desktop;Player.desktop;QMLPlayer.desktop;easytag.desktop;guayadeque.desktop;d
eadbeef.desktop;vlc.desktop;org.musicbrainz.Picard.desktop;mpv.desktop;soundconverter.desktop;
audio/x-mpegurl=audacious.desktop;mpv.desktop;guayadeque.desktop;visual-studio-code.desktop;org.kd
e.kate.desktop;deadbeef.desktop;okularApplication_txt.desktop;gvim.desktop;vim.desktop;
image/jpeg=qimgv.desktop;org.kde.gwenview.desktop;phatch-inspector.desktop;google-chrome.desktop;o
kularApplication_kimgio.desktop;qView.desktop;gimp.desktop;shotwell-viewer.desktop;darktable.deskt
op;phatch.desktop;org.kde.kphotoalbum.open-raw.desktop;org.kde.showfoto.desktop;
image/png=qimgv.desktop;org.kde.gwenview.desktop;google-chrome.desktop;shotwell-viewer.desktop;feh
.desktop;org.kde.showfoto.desktop;gimp.desktop;qView.desktop;llpp.desktop;darktable.desktop;phatch
.desktop;ida.desktop;okularApplication_kimgio.desktop;
image/svg+xml=qimgv.desktop;qView.desktop;gimp.desktop;visual-studio-code.desktop;org.gnome.meld.d
esktop;org.kde.kate.desktop;okularApplication_txt.desktop;kfmclient_html.desktop;brave-browser.des
ktop;webapp-ManjaroForum4233.desktop;webapp-Facebook0708.desktop;google-chrome.desktop;firefox.des
ktop;gvim.desktop;vim.desktop;
inode/directory=org.kde.dolphin.desktop;audacious.desktop;org.kde.gwenview.desktop;visual-studio-c
ode.desktop;org.kde.filelight.desktop;filebot.desktop;thunar.desktop;easytag.desktop;
text/plain=visual-studio-code.desktop;org.gnome.meld.desktop;org.kde.kate.desktop;okularApplicatio
n_txt.desktop;
video/mp4=mpv.desktop;Player.desktop;vlc.desktop;QMLPlayer.desktop;
video/x-matroska=mpv.desktop;QMLPlayer.desktop;Player.desktop;vlc.desktop;
video/x-msvideo=mpv.desktop;Player.desktop;vlc.desktop;
x-scheme-handler/http=firefox.desktop;brave-browser.desktop;google-chrome.desktop;
x-scheme-handler/https=firefox.desktop;brave-browser.desktop;google-chrome.desktop;
x-scheme-handler/mailto=mailspring.desktop;

[Default Applications]
application/json=visual-studio-code.desktop;
application/pdf=qpdfview.desktop;
audio/mpeg=audacious.desktop;
audio/x-mpegurl=audacious.desktop;
image/jpeg=qimgv.desktop;
image/png=qimgv.desktop;
image/svg+xml=qimgv.desktop;
inode/directory=org.kde.dolphin.desktop;
text/html=vivaldi-stable.desktop
text/plain=visual-studio-code.desktop;
video/mp4=mpv.desktop;
video/x-matroska=mpv.desktop;
video/x-msvideo=mpv.desktop;
x-scheme-handler/bitwarden=Electron.desktop
x-scheme-handler/etcher=balena-etcher-electron.desktop
x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop;
x-scheme-handler/magnet=org.qbittorrent.qBittorrent.desktop
x-scheme-handler/mailspring=mailspring.desktop
x-scheme-handler/mailto=mailspring.desktop;

[Removed Associations]
audio/x-mpegurl=vlc.desktop;soundconverter.desktop;QMLPlayer.desktop;Player.desktop;org.gnome.meld
.desktop;
image/jpeg=ida.desktop;feh.desktop;llpp.desktop;
image/png=phatch-inspector.desktop;
inode/directory=kfmclient_dir.desktop;kvantummanager.desktop;
video/x-msvideo=QMLPlayer.desktop;
cat ~/.config/mimeapps.list | grep torrent
application/x-bittorrent=org.qbittorrent.qBittorrent.desktop;
x-scheme-handler/magnet=org.qbittorrent.qBittorrent.desktop

No need to delete, just browse to it, select it, and duplicate it and rename ‘mimeapps.list.old’

THEN you start by deleting the ‘Added’ section.
Then you try deleting the whole damn thing :stuck_out_tongue:

1 Like

cat ~/.config/mimeapps.list

[Added Associations]
application/octet-stream=org.qbittorrent.qBittorrent.desktop;

cat ~/.config/mimeapps.list | grep torrent

application/octet-stream=org.qbittorrent.qBittorrent.desktop;

so i still have to go to “file association” and go through all the apps like @omano said?

I’m curious why yours has a different syntax.

I have

application/x-bittorrent=org.qbittorrent.qBittorrent.desktop;
x-scheme-handler/magnet=org.qbittorrent.qBittorrent.desktop

You have something different:
application/octet-stream=org.qbittorrent.qBittorrent.desktop;

Try replacing it. It’s not for octet-stream… I have zero entries for octet-stream.

Maybe just try renaming mimeapps.list first and log out/in and see how that goes.

1 Like

This is wrong, octet-stream is like when a server streams an executable or document file to your browser to download. I don’t even have a bittorrent app listed there in this mimeapps.list file. However it is qbittorrent which is my default app for torrent files. I think this file is only for user own override from the default.

Maybe try to set a default proper app for some file types first from Dolphin. See if it fixes these file types regarding qbittorrent being available as a compatible app.

See if by going to the 'File Association" route in KDE Settings, if qbittorrent is listed there for most file types. Then you may have no other way than removing the entries everywhere from here. I remember going there long time ago and I may have done only that from here, but now I’m searching when writing this, and found this thread https://www.reddit.com/r/kde/comments/j6mi20/how_do_i_changereset_default_file_associations_in/g7zkdbw/ where the guy says “the file association for every extension that I haven’t opened previously defaults to qbittorrent.” So it might be a problem in KDE, and you may simply fix it with my other method, open each of these file types in Dolphin → right click → Open with… and select proper app for each file type you have issues with (for most text files you don’t have specific app, use Kate for example).
Or simply do what the guy did, he puts Kate first in the octet-stream mime type (or even delete bittorrent there it shouldn’t be required here for this file type). Maybe this issue is all related to this mime type which may be used as a ‘default’ for other mime type which don’t have proper application setup for them. That could make sense. But what doesn’t really make sense is qbittorrent being set as default octet-stream application.

2 Likes

thanks omano
i saw that reddit post but thought i’d ask here first.
i think i’ll go the hard way and rename the mimeapps.list file and remove qbittorent from all the apps in file association.

i wonder if it would be easier to uninstall qbittorrent and reinstall it and if the file associations will disappear after the uninstall.