Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

75%
+4 −0
Q&A Where does GtkFileChooserDialog store bookmarks?

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...

posted 9mo ago by Quasímodo‭  ·  edited 9mo ago by Quasímodo‭

Answer
#2: Post edited by user avatar Quasímodo‭ · 2023-08-28T18:32:58Z (9 months ago)
Expand answer with more details
  • For normal users, in `$HOME/.config/gtk-3.0/bookmarks`. Otherwise in `$XDG_CONFIG_HOME/gtk-3.0/bookmarks`.
  • Source: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbookmarksmanager.c#L82
  • 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](https://gitlab.gnome.org/GNOME/gtk/-/raw/main/gtk/gtkbookmarksmanager.c):
  • ```
  • 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`](https://docs.gtk.org/glib/func.get_user_config_dir.html) documentation that returns XDG_CONFIG_HOME if set or what XDG specifies, [which is `$HOME/.config`](https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html#variables).
#1: Initial revision by user avatar Quasímodo‭ · 2023-08-28T16:20:54Z (9 months ago)
For normal users, in `$HOME/.config/gtk-3.0/bookmarks`. Otherwise in `$XDG_CONFIG_HOME/gtk-3.0/bookmarks`.


Source: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbookmarksmanager.c#L82