Where does GtkFileChooserDialog store bookmarks?
+2
−0
I have some bookmarked folders in GtkFileChooserDialog. I want to add these to my dotfiles. Where are the bookmarks stored?
1 answer
+4
−0
Works for me
The following users marked this post as Works for me:
User | Comment | Date |
---|---|---|
matthewsnyder | (no comment) | Aug 28, 2023 at 18:40 |
For most users, in $HOME/.config/gtk-3.0/bookmarks
. Otherwise, if you set the XDG_CONFIG_HOME
environment variable (which you can inspect with env
), in $XDG_CONFIG_HOME/gtk-3.0/bookmarks
.
From the source code:
static GFile *
get_bookmarks_file (void)
{
GFile *file;
char *filename;
/* Use gtk-3.0's bookmarks file as the format didn't change.
* Add the 3.0 file format to get_legacy_bookmarks_file() when
* the format does change.
*/
filename = g_build_filename (g_get_user_config_dir (), "gtk-3.0", "bookmarks", NULL);
file = g_file_new_for_path (filename);
g_free (filename);
return file;
}
See that as per g_get_user_config_dir
documentation that returns XDG_CONFIG_HOME if set or what XDG specifies, which is $HOME/.config
.
1 comment thread