Created attachment 5310
The file ~/.gtk-bookmarks has moved in recent Gtk2 and Gtk3 bookmarks. It is now stored at ~/.config/gtk-3.0/bookmarks
This patch updates default location to the new one, and adds a fallback which will load the old bookmarks. A watch is set on the new file location, not the legacy location. In this way the new file always overrides the legacy file even if the new file doesn't exist at startup. This should mimic the new gtk behaviour.
Added that in on several computers, works nicely, just what I was looking for.
Created attachment 5384
Updated patch ensures the config directory exists before writing bookmarks.
During xubuntu upgrade it is not obvious why bookmarks stop working.
As some default places are already put in the new bookmark, legacy bookmark is ignored by Thunar and xfce4-places-plugin-1.6.0.
This command corrected my issue:
cp ~/.gtk-bookmarks bookmarks
There is nothing we at Xfce can do about that. It happens because Gtk3 itself creates the new file as soon as you open any file requester. The only thing we can do is make sure Xfce is using the same file as Gtk, but that is already too late for many users.
Gtk does not provide any API to query the correct bookmarks location, and according to the developers, bookmarks are an entirely private API which should not be used by any software (except Nautilus, because apparently that is special).
Thank you Alistair.
> There is nothing we at Xfce can do about that[…]
Sorry I'm not aware about API design and where role/project starts/stops. I just noticed it stops working after an update and I decided to correct it myself today, as following updates didn't seem to fix it automagically.
My feeling is that the migration process should have been handled automatically at some point. As the upgrade worked to upgrade xfce4-places-plugin and thunar, the softwares I'm using which seem to depend this bookmark file.
Especially if the bookmarks file format is exactly the same.
I just posted here because I found this ticket by searching .gtk-bookmarks.
Your first reply helped me to fix my issue. I hope it can help someone else.
Thunar seems also to have lost its "send to" bookmark right click feature… (Shortcuts Pane ?)
That how I created my bookmark at first. But it's probably another issue.
The migration already is handled automatically by Gtk3 and that is the problem. Gtk3 migrated you years ago without you knowing about it. Since then you have had two bookmark files with different contents. The only effect you would see is that file requesters would show different bookmarks to thunar.
There is nothing Xfce can do about this because we have no way of knowing which one you want to delete and which one you want to keep, in order to bring them in sync.
Pushed to master. Slightly reworded the commit message and fixed the coding style (missing spaces before function call parentheses).
Author: Alistair Buxton <email@example.com>
Date: Wed Mar 12 20:20:05 2014 +0000
Add support for the GTK 3 bookmarks file (bug #10627)
The changes ensure that the config directory exists before attempting to
write bookmarks. It falls back to the old location to support both GTK 2