Thunar not saving sidebar "places" bookmarks after exit

Bug #1280641 reported by Mike Yontz on 2014-02-15
24
This bug affects 6 people
Affects Status Importance Assigned to Milestone
thunar
Fix Released
Medium
thunar (Ubuntu)
Medium
Alistair Buxton

Bug Description

Xubuntu 14.04 daily build....

After dragging and dropping folders (documents, music, video etc) to the thunar sidebar to save as bookmarks, they remain in the sidebar as they are suppose to until Thunar is closed and re-opened then they are gone again. Also using"file-->send to" option produces the same result. Bookmarks are no longer saved in sidebar...places once thunar is closed and re-opened.

DistroRelease: Xubuntu Trusty Tahr (development branch) (daily build)
Release: 14.04 Kernel - 3.13.0-8-generic

Date: Sat Feb 15 12:15 pm 2014
Package: Thunar 1.6.3-1ubuntu3
Architecture: i386

Related branches

Created attachment 5310
patch

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.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in thunar (Ubuntu):
status: New → Confirmed
PTra (ptram1) wrote :

Can confirm. probably has to do with these changes:

thunar (1.6.3-1ubuntu3) trusty; urgency=medium

  * Add git-xfdesktop-4.11.patch. LP: #1277149
  * Add gtk3-bookmarks.patch, use new gtk3 bookmark location
 -- Jackson Doak <email address hidden> Fri, 07 Feb 2014 16:54:48 +1100

PTra (ptram1) wrote :

A temporary workaround (or like Thunar used to do this before; and this method still works):

create a ".gtk-bookmarks" text file in your home directory and add the shortcuts manually in the format:

file://PATH_TO_YOUR_FOLDER

example:

file:///home/username/Documents/
file:///home/username/Pictures/

and so on.

save and reopen thunar, bookmarks should be in the side panel again.

Mike Yontz (swftech) wrote :

Awesome tip PTra, the workaround worked perfectly until this bug is fixed. :D

Thanks!

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu Package testing tracker.

A list of all reports related to this bug can be found here:
http://packages.qa.ubuntu.com/qatracker/reports/bugs/1280641

tags: added: package-qa-testing

It's a usability issue that doesn't limit the functionality of a core package.

Changed in thunar (Ubuntu):
importance: Undecided → Medium
Changed in thunar (Ubuntu):
assignee: nobody → Alistair Buxton (a-j-buxton)
status: Confirmed → In Progress
Alistair Buxton (a-j-buxton) wrote :

A better workaround is to create directory ~/.config/gtk-3.0

This is where bookmarks are supposed to be saved now, but if it doesn't exist it will fail.

Created attachment 5384
Updated patch

Updated patch ensures the config directory exists before writing bookmarks.

Alistair Buxton (a-j-buxton) wrote :

I have refreshed the upstream patch.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thunar - 1.6.3-1ubuntu4

---------------
thunar (1.6.3-1ubuntu4) trusty; urgency=medium

  * Update gtk3-bookmarks.patch. LP: #1280641
    Thanks Alistair Buxton
 -- Jackson Doak <email address hidden> Thu, 13 Mar 2014 07:53:06 +1100

Changed in thunar (Ubuntu):
status: In Progress → Fix Released
In , Xfce4 (xfce4) wrote :

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:

cd ~/.config/gtk-3.0
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).

In , Xfce4 (xfce4) wrote :

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.

Changed in thunar:
importance: Unknown → Medium
status: Unknown → Confirmed

Pushed to master. Slightly reworded the commit message and fixed the coding style (missing spaces before function call parentheses).

commit 6a63d7bd8ff0d937cb30f112c3fd080a5a107053
Author: Alistair Buxton <email address hidden>
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
    and 3.

Changed in thunar:
status: Confirmed → Fix Released
Tigerboy (tigersands) wrote :

Strike #18 it's only on one workstation which is having other issues.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.