You are not logged in.

#1 2023-12-03 16:44:06

andav
Member
Registered: 2006-12-04
Posts: 117

how to make GNOME File-Picker remember last used folder?

what i want:
when the File Picker is open (for example when i want to upload photos in gmail), it will be opened in the last path (folder) i used File Picker for.

what is happening now:
no matter where i go in File Picker and chose a file, when i get back into File Picker again, it is *always* opened in the Home folder.

in the past (couple of months ago) it remembered the last visited folder but for couple of months now this behavior has changed.

Last edited by andav (2023-12-03 16:53:06)

Offline

#2 2023-12-03 17:33:52

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,763
Website

Re: how to make GNOME File-Picker remember last used folder?

Try

gsettings set org.gtk.Settings.FileChooser startup-mode recent

Offline

#3 2023-12-03 17:45:21

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

Head_on_a_Stick wrote:

Try

gsettings set org.gtk.Settings.FileChooser startup-mode recent

after this command, problem still exist.

Offline

#4 2023-12-03 19:08:18

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,763
Website

Re: how to make GNOME File-Picker remember last used folder?

How about

gsettings set org.gnome.desktop.privacy remember-recent-files true

And perhaps also

gsettings set org.gnome.desktop.privacy remember-app-usage true

Offline

#5 2023-12-03 19:12:42

yochananmarqos
Member
Registered: 2020-02-05
Posts: 198

Re: how to make GNOME File-Picker remember last used folder?

@Head_on_a_Stick: Those settings all seem to be default.

@andav: I suggest running the commands @Head_on_a_Stick mentioned using 'get' instead of 'set' to see what the current values are instead of blindly setting them.

Offline

#6 2023-12-03 19:15:02

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,763
Website

Re: how to make GNOME File-Picker remember last used folder?

yochananmarqos wrote:

Those settings all seem to be default.

OP wrote:

in the past (couple of months ago) it remembered the last visited folder but for couple of months now this behavior has changed.

^ That suggests the defaults have been changed. I suspect PEBKAC :-)

Offline

#7 2023-12-03 21:23:07

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

Head_on_a_Stick wrote:

How about

gsettings set org.gnome.desktop.privacy remember-recent-files true

And perhaps also

gsettings set org.gnome.desktop.privacy remember-app-usage true

thanks again but problem still exist after those commands.
after those commands, when i get into file picker i now get into Recent folder (that's her name).
in the Recent folder there are all those files i picked before but i want to be in the folder that i picked the files from...

Last edited by andav (2023-12-03 21:25:50)

Offline

#8 2023-12-03 21:24:41

yochananmarqos
Member
Registered: 2020-02-05
Posts: 198

Re: how to make GNOME File-Picker remember last used folder?

@andav: Thanks for completely ignoring my reply. I'll exit stage left..

Offline

#9 2023-12-03 21:27:35

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

yochananmarqos wrote:

@andav: Thanks for completely ignoring my reply. I'll exit stage left..

sorry.
i tried the first one with your suggestion first.
i got 'false' for:
gsettings get org.gnome.desktop.privacy remember-recent-files

then i set it to true.
for the second command i didn't check and just set it to true...

Last edited by andav (2023-12-03 21:27:46)

Offline

#10 2023-12-03 21:48:46

seth
Member
Registered: 2012-09-03
Posts: 51,802

Re: how to make GNOME File-Picker remember last used folder?

The location is primarily under the control of the specific application that launches the picker - that's not the same as the recently used files.
Also, since this seems to have recently changed for you: gtk3 => gtk4?

Offline

#11 2023-12-04 00:03:19

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

seth wrote:

The location is primarily under the control of the specific application that launches the picker - that's not the same as the recently used files.
Also, since this seems to have recently changed for you: gtk3 => gtk4?

it seems that i have both gtk3 and gtk4 installed.
and also after you said this:

seth wrote:

The location is primarily under the control of the specific application that launches the picker - that's not the same as the recently used files.

i tried firefox (i use google chrome regularly) and there, there is no problem at all.
it seems to get back into the last folder i used.
so the problem is with google chrome.

Last edited by andav (2023-12-04 00:17:59)

Offline

#12 2023-12-04 07:21:14

seth
Member
Registered: 2012-09-03
Posts: 51,802

Re: how to make GNOME File-Picker remember last used folder?

it seems that i have both gtk3 and gtk4 installed.

https://wiki.archlinux.org/title/Chromi … nd_support

chrome from the repos or a flatschpak?

Offline

#13 2023-12-04 12:23:20

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

seth wrote:

it seems that i have both gtk3 and gtk4 installed.
https://wiki.archlinux.org/title/Chromi … nd_support

i'm on xorg.


chrome from the repos or a flatschpak?


google-chrome from AUR

Offline

#14 2023-12-04 12:28:59

seth
Member
Registered: 2012-09-03
Posts: 51,802

Re: how to make GNOME File-Picker remember last used folder?

The link shows how to use gtk4…

pacman -Qs portal

Offline

#15 2023-12-04 12:51:11

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

[EDIT bolow]

pacman -Qs portal
local/libportal 0.7.1-2
    GIO-style async APIs for most Flatpak portals
local/libportal-gtk3 0.7.1-2
    GIO-style async APIs for most Flatpak portals - GTK 3 backend
local/libportal-gtk4 0.7.1-2
    GIO-style async APIs for most Flatpak portals - GTK 4 backend
local/xdg-desktop-portal 1.18.2-1
    Desktop integration portals for sandboxed apps
local/xdg-desktop-portal-gtk 1.15.1-1
    A backend implementation for xdg-desktop-portal using GTK

[EDIT]
where do i need to put:

--gtk-version=4

do i need to put it in the chrome.desktop file?
if yes, where in this file?

Last edited by andav (2023-12-04 12:56:26)

Offline

#16 2023-12-04 12:54:34

seth
Member
Registered: 2012-09-03
Posts: 51,802

Re: how to make GNOME File-Picker remember last used folder?

What if you get rid of all the portal stuff (certainly the implementation/s, libportal itself is probably some hard dependency somewhere)

Offline

#17 2023-12-04 13:03:48

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

i can't remove xdg-desktop-portal because it is a dependency for xdg-desktop-portal-gtk, which i need for something else (i cant remeber what was the problem without this package installed).
also i can't uninstall libportal and libportal-gtk4 because they are dependencies for nautilus.
libportal-gtk3 is a dependency for file-roller.

Last edited by andav (2023-12-04 13:07:13)

Offline

#18 2023-12-04 13:06:05

seth
Member
Registered: 2012-09-03
Posts: 51,802

Re: how to make GNOME File-Picker remember last used folder?

xdg-desktop-portal-gnome doesn't even show up in your previous post and is on the record for being complete fubar and nobody "needs" any portal for anything.
You could just remove it, see whether that has any impact on the situatuion and then at least know whether or not it's the cause and to be focused on.

Offline

#19 2023-12-04 13:07:53

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

seth wrote:

xdg-desktop-portal-gnome doesn't even show up in your previous post and is on the record for being complete fubar and nobody "needs" any portal for anything.
You could just remove it, see whether that has any impact on the situatuion and then at least know whether or not it's the cause and to be focused on.

yes i was wrong.
i edited it to gtk...

Offline

#20 2023-12-04 13:22:32

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

well there is a progress but also a step back and now i know why i installed xdg-desktop-portal-gtk.
the progress:
after uninstalling xdg-desktop-portal-gtk the problem with the File Picker is SOLVED.

the step back:
without this package the dark theme of gnome is not complete.
some gnome applications revert back into light theme, for example:
nautilus and gnome settings.

also:
where do i need to put:

--gtk-version=4

do i need to put it in the chrome.desktop file?
if yes, where in this file?

Last edited by andav (2023-12-04 13:35:14)

Offline

#21 2023-12-04 14:37:47

seth
Member
Registered: 2012-09-03
Posts: 51,802

Re: how to make GNOME File-Picker remember last used folder?

chromium takes flags  from ~/.config/chromium-flags.conf - no idea abotu google-chrome, though.

https://wiki.archlinux.org/title/GTK#Dark_theme_variant doesn't cut it for dark themes?
It seems completely insane that you've to configure a theme through xdg-portal

Offline

#22 2023-12-04 15:26:29

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

from the link you send i tried:

gsettings set org.gnome.desktop.interface color-scheme prefer-dark

and nothing has changed
i don't know where to put:

gtk-application-prefer-dark-theme = true

for gtk-3 apps.

Offline

#23 2023-12-04 15:35:22

seth
Member
Registered: 2012-09-03
Posts: 51,802

Re: how to make GNOME File-Picker remember last used folder?

$XDG_CONFIG_HOME/gtk-3.0/settings.ini - it's a couple of lines above.
But I'd not hold my breath, because those are most likely gtk4 applications.

There's also an environment variable, https://wiki.archlinux.org/title/GTK#GTK_3_and_GTK4

Offline

#24 2023-12-04 16:08:23

andav
Member
Registered: 2006-12-04
Posts: 117

Re: how to make GNOME File-Picker remember last used folder?

when i do:

nvim $XDG_CONFIG_HOME/gtk-3.0/settings.ini 

i get empty file...

i have:

~/.config/gtk-3.0/

folder but there is no

settings.ini

in there.

for the environment variable, if i understand correctly i could also install from AUR:

 libadwaita-without-adwaita-git

which replace libadwaita.
but after reboot gnome looks more ugly (i don't know how to describe it better) and the nautilus and gnome settings are still in light theme, so i revert back to libadwaita.

by the way thank you (and others here) very much for your help and patience :-)

Last edited by andav (2023-12-04 16:09:45)

Offline

#25 2023-12-04 19:36:16

seth
Member
Registered: 2012-09-03
Posts: 51,802

Re: how to make GNOME File-Picker remember last used folder?

You'd have to add that file (and the "[Settings]" group)

The environment has absolutely nothing to do w/ the alternative adwaita package, the latter is only relevant if you want to use something else than adwaita w/ gtk4.
Keep the regular libadwaita and try to export GTK_THEME=Adwaita:dark for the destined process.

Offline

Board footer

Powered by FluxBB