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

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?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

"in" GtkFileChooserDialog? (4 comments)

1 answer

+4
−0

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.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

Docs? (3 comments)

Sign up to answer this question »