2

I've recently switched to Ubuntu 19.10 (Kubuntu) and noticed that the Firefox file explorer, when saving or opening files, changed.

In the file explorer, when I type in a character Firefox starts to search the current and all sub-directories for what I've entered. The expected behavior is for it to jump/highlight the element starting with the character.

Now for example, here I switched to the root directory and entered t, as I want to navigate to /tmp, but it starts searching my disk, starting from / for t, instead of just jumping to/highlighting /tmp.

enter image description here

I also use Firefox on Debian, where this behavior does not occur, so I deducted that it has to do with Ubuntu. I haven't noticed this behavior with other applications (i.e. Dolphin, Kate or Gimp)

AEM
  • 1,166
  • 2
  • 11
  • 18
  • Is this a clean Kubuntu or an Ubuntu with something like `kubuntu-desktop` added? Have you looked at https://askubuntu.com/questions/1100261/how-do-i-make-firefox-64-use-the-kde-file-selection-dialog? – DK Bose Apr 20 '20 at 05:50
  • @DKBose A clean Kubuntu. No I haven't found that one before - I'll have a look righ now, thank you! – GarlicCheese Apr 20 '20 at 05:52
  • Things should be much better. The time I wrote that, things were a bit experimental. – DK Bose Apr 20 '20 at 05:55
  • I've just tried the approach with `GTK_USE_PORTAL=1`, which doesn't seem to work for me and I can't find an option to define the framework used for the file selection dialog. – GarlicCheese Apr 20 '20 at 05:57
  • Did you install `xdg-desktop-portal`? – DK Bose Apr 20 '20 at 06:00
  • @DKBose oh damn, sorry. Seems like I did the export wrong, now it works with `export GTK_USE_PORTAL=1`. Thank you a lot! I hope to find a _cleaner_ solution some day though :) If you want to post an answer, I'll gladly accept it! – GarlicCheese Apr 20 '20 at 06:03
  • Well, I don't know what the initial problem was. There are **two** general file choosers. The "KDE" one and the "GNOME" one. Your image shows the GNOME one. You have to inform some GTK applications that you'd like them to use the KDE file chooser or you can do that globally. Glad to see your issue is sorted. *If you want to post an answer yourself describing what the problem was and how you fixed it, please do so. Posting answers to your own questions is encouraged here.* – DK Bose Apr 20 '20 at 06:29

1 Answers1

2

As pointed out by @DKBose, this issue is resolved by running firefox with the following environment variable:

export GTK_USE_PORTAL=1
firefox

This works temporarily, when executed in the terminal and persistence can be achieved by exporting the variable on boot (i.e. by adding the line to the .profile, requiring a logout/login)

echo "export GTK_USE_PORTAL=1" >> ~/.profile