10

Hi everybody I want to start to say thank you for your time!

I have a problem and don't really know what to do to solve the problem. When i download something and I click on the arrow in Firefox to see my downloads and then click on the folder next to the application name it should open the folder where it is saved? (I think something like moz/.tmp) anyway when I click on the folder it opens VSCode. what did i do wrong?

even after "extraction completed successfully" and i click Show the Files it opens VSCode

Running Linux Lite 4.8 x86_64

enter image description here enter image description here enter image description here

DanyCode
  • 271
  • 2
  • 8

4 Answers4

7

!!!!! I don't know if this will work with other Distros then Linux Lite !!!!!

What happens if you install VSCode (can be with other editors to) there is something in the code what says to you system that VSCode can open files and directories. So your system puts VSCode in front of you file Manager (Linux Lite 4.8 == Thunar) what you will see if you go to /usr/share/applications/ then you will find mimeinfo.cache and if you look in to that file you have to look for inode/directory where you can see then inode/directory=code.desktop;Thunar-folder-handler.desktop; this means that code (VSCode) is your default you can change this by going out of that file and in the applications folder you open MIME Type Editor in the Filter search field you look for directory and change Default Application to Open Folder with Thunar .

I know all that is probably more fast or easier in the Terminal but everything I found on the web in the Terminal did not work for me.

enter image description here

DanyCode
  • 271
  • 2
  • 8
2

I had the same problem in Endeavour Linux (Arch based), but the information I found was incomplete or included more steps than were really needed. Summing everything up this is what I did to solve the problem:

  1. I first checked what program was defined by default to open folders. Mine was Visual Studio Code (code.desktop), check yours executing:
    xdg-mime query default inode/directory
    
  2. Find the name of the desktop file of the filemanager you use. I use Nautilus, so to list all the relevant desktop files available in the system I executed:
    ls /usr/share/applications/*autilus*
    
  3. The output of the previous command included /usr/share/applications/org.gnome.Nautilus.desktop, so I set that desktop file to open folders by default executing:
    xdg-mime default org.gnome.Nautilus.desktop inode/directory
    
  4. Just to be sure, check again the program that now is defined to open folders (repeating step 1).
AdminBee
  • 21,637
  • 21
  • 47
  • 71
Mr. Prezbo
  • 21
  • 2
1

Firefox on Linux uses the D-Bus Inter-process Communication (IPC) mechanism to communicate with a file manager, or any other program that has been configured to respond to the request. This interface is documented in File Manager DBus Interface. You will have to find the setting in VSCode's configuration where it exposes this object on the bus, and disable it.

On my computer, the Dolphin file manager handles these requests, and this is configured in

/usr/share/dbus-1/servicesorg.kde.dolphin.Filemanager1.service:

[D-BUS Service]
Name=org.freedesktop.FileManager1
Exec=/usr/bin/dolphin --daemon
Johan Myréen
  • 12,862
  • 1
  • 32
  • 33
1

You can set Thunar as default for opening folders with

xdg-mime default thunar.desktop inode/directory