• OpenBSD
  • How to fix ethernally broken GTK 3 or GTK 4-based programs?

Regardless of whether it's on my desktop or one of my multiple laptops, as long as it's running OpenBSD, I am seemingly unable to use the filepicker in both Firefox and Chromium, but it works fine in qutebrowser (which is Qt-based) and Netsurf (which is GTK 2-based).
The filepicker appears almost entirely empty with no way to navigate to anywhere at all other than "recently used", which is also entirely empty.

The other problem that applies across all GTK 3 and GTK 4 programs, but not GTK 2 ones are the very weird keybindings when the focus is on input fields.
So CTRL + A acts like the Home key, CTRL + F acts like the right arrow key, CTRL + B acts like the left arrow key CTRL + Y acts like CTRL + V
I can live just fine without CTRL + B and CTRL + Y, since I never use these anyway, but CTRL + A and CTRL + F are the ones that fuck me up every single time.

  • rvp replied to this.

    Sorry, i can't really help here but i think the real question is rather "How to fix GTK3&4" as those are pretty much broken by design.

    Well, looking into my magic crystal ball: Are you maybe running a theme that wasn't updated in like the last 2-3 days? If you are it might simply be outdated by now due to GTK's rapid pace of breaking backwards compatibility.

      remiliascarlet
      1) Security feature. Firefox (at least) can only save files into /tmp or ~/Downloads
      2) OpenBSD quirk. See here. Either a) recompile w/o that patch, or b) mug-up on EMACS keys.

        nettester the real question is rather "How to fix GTK3&4" as those are pretty much broken by design.

        I agree completely, which is why they suck so much.

        nettester Are you maybe running a theme that wasn't updated in like the last 2-3 days?

        Just the Arc theme that I installed from pkg_add, so I guess not.

        rvp 1) Security feature. Firefox (at least) can only save files into /tmp or ~/Downloads

        And even those won't show up.
        I was talking more about uploading.
        When it comes to downloading, it will always fail.
        But that's OK, we have curl for that.
        Can be used for uploading too in theory, but in practise can only be used if the API is public.

        rvp 2) OpenBSD quirk. See here. Either a) recompile w/o that patch, or b) mug-up on EMACS keys.

        Vim keybindings would be nicer.
        Keeping keybindings default would be nicer.

        • rvp replied to this.

          remiliascarlet I was talking more about uploading.

          Uploading works too. Just did it from /tmp (my default save location) the usual way: click browse file on page; select file in file-chooser; click OK.

          remiliascarlet Keeping keybindings default would be nicer.

          This worked for Firefox.

            rvp Uploading works too. Just did it from /tmp (my default save location) the usual way: click browse file on page; select file in file-chooser; click OK.

            Then how do I set the location to /tmp?
            Firefox's settings page doesn't let me.

            rvp This worked for Firefox.

            I can confirm this as working.

            • rvp replied to this.
            • Jay likes this.

              remiliascarlet Then how do I set the location to /tmp?

              You should always be able to choose /tmp:

              Settings > Downloads > [Save files to] click Browse > select /tmp & click Open

              To go back to using ~/Downloads, edit ~/.mozilla/firefox/XXX/prefs.js and change the location:

              user_pref("browser.download.dir", "~/Downloads");

              This dir. should then show up in the Recent list.
              (I couldn't find any other way to go back to using ~/Downloads)

                rvp You should always be able to choose /tmp:

                Settings > Downloads > [Save files to] click Browse > select /tmp & click Open

                And this is exactly the thing that's impossible to do.

                rvp user_pref("browser.download.dir", "~/Downloads");

                And this didn't work either.

                • rvp replied to this.

                  remiliascarlet Worked for me: OpenBSD-7.4 + FF 124.0.2. I'll see if I can install 7.5 over the weekend. Meantime, look through /usr/local/share/doc/pkg-readmes/firefox. See if that provides any clues. See the section about ~/Downloads already existing, else you need to restart FF. Also the part about messagebus.

                  remiliascarlet And this didn't work either.

                  That XXX there is just a placeholder. Did you substitute the correct dir. in place of it?

                    rvp That XXX there is just a placeholder. Did you substitute the correct dir. in place of it?

                    Yes of course, I'm not a stupid bitch!

                    rvp Meantime, look through /usr/local/share/doc/pkg-readmes/firefox.

                    Turned out that unveil was the problem.
                    Added a couple of directories, and gave the ~/ダウンロード directory read and write permissions, and ~/画像 and ~/動画 directories read permission, now the file picker works as expected.

                    • rvp replied to this.

                      remiliascarlet Yes of course, I'm not a stupid bitch!

                      Could've ended that sentence right there after "Yes of course", I think ...

                      remiliascarlet Added a couple of directories, and gave the ~/ダウンロード directory read and write permissions, and ~/画像 and ~/動画 directories read permission, now the file picker works as expected.

                      ... and, I could've diagnosed this quicker had you told me your Downloads was called ~/ダウンロード rather than ~/Downloads. (BTW, you would need rwc perms to match ~/Downloads.)

                        rvp ... and, I could've diagnosed this quicker had you told me your Downloads was called ~/ダウンロード rather than ~/Downloads. (BTW, you would need rwc perms to match ~/Downloads.)

                        Yeah, I didn't think of saying that.
                        So my apologies for that part.