Kupfer doesn't save learned rankings between user sessions

Bug #1239911 reported by Sb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kupfer
Fix Committed
Undecided
Karol Będkowski

Bug Description

Hi,

I'm using kupfer-git on Arch 32bit with the Mate desktop. Kupfer does a great job of learning my habits and predicting what I'm trying to launch. However, it does not retain this knowledge for future user sessions. When I use the Kupfer "quit" menu, it does save the habits and remembers them the next time I start Kupfer. However, when the Mate session is ended through the regular Mate "logout" menu, it appears that Kupfer gets killed and does not remember anything. I presume this would be the same on other desktop environments as well. Is there any fix or workaround for this?

Steps to reproduce:
1. Create "test1.txt" and "test2.txt"
2. Search for "tes" with Kupfer. "test1.txt" will be first on the list.
3. Select "text2.txt" from the dropdown menu.
4. Again search for "tes", this time "text2.txt" will be the first on the list.
5. Logout out of the user session with the window manager's logout button (not using Kupfer).
6. Log back in and search for "tes".
7. "text1.txt" will again be first on the list. (Should be "text2.txt")

Thanks a lot for giving us Kupfer!

Changed in kupfer:
assignee: nobody → Karol Będkowski (karol-bedkowski)
status: New → Confirmed
Revision history for this message
Karol Będkowski (karol-bedkowski) wrote :

Attached patch add support for Mate Session Manager.

Changed in kupfer:
status: Confirmed → Fix Committed
Revision history for this message
Sb (sb56637) wrote :

Thanks a lot Karol for the fast fix! I hope to try it out very soon, and I'll let you know.

Is there a way to simply make Kupfer autosave its knowledge base on a regular time interval?

Thanks again.

Revision history for this message
Sb (sb56637) wrote :

Hi Karol,

I applied the patch, but unfortunately it doesn't seem to work. Kupfer still doesn't save its intelligence between sessions. Is there anything I can do to help debug this?

Thanks a lot!

Revision history for this message
Karol Będkowski (karol-bedkowski) wrote :

Hi,
After running in debug mode you should get:
:~/kupfer.dev$ python kupfer.py --debug 2>&1 | grep Session
D [kupfer.ui.session] SessionClient: D-Bus name org.gnome.SessionManager not found
D [kupfer.ui.session] SessionClient: Try to connect to xfce
D [kupfer.ui.session] SessionClient: D-Bus name org.xfce.SessionManager not found
D [kupfer.ui.session] SessionClient: Try to connect to mate
D [kupfer.ui.session] SessionClient: Successfully connected to mate Session Manager

Please check.

Also you may run kupfer on screen or| tmux and watch messages after logout.

I'll try to find other method to force saving catalog but it takes a while.

Revision history for this message
Sb (sb56637) wrote : Re: [Bug 1239911] Re: Kupfer doesn't save learned rankings between user sessions

Hi Karol,

Thanks for the help. I can confirm that the debug messages say:
"[kupfer.ui.session] SessionClient: Successfully connected to mate
Session Manager"

With debug monitoring on a screen session, I have this during a logout
of Mate:
============================
(atril:3058): GLib-GObject-WARNING **: gsignal.c:2593: instance
`0x12098f0' has no handler with id `1006'

(atril:3058): GLib-GObject-WARNING **: gsignal.c:2593: instance
`0x12098f0' has no handler with id `1007'
D [kupfer.plugin.clipboard] ClipboardSource: Loaded 5 items
D [kupfer.plugin.deepdirectories] DeepDirSource: Loaded 21043 items
D [kupfer.plugin.firefox] BookmarksSource: Reading history from
/home/myself/.mozilla/firefox/9shb6xj3.default/places.sqlite
D [kupfer.plugin.documents] PlacesSource:D [kupfer.plugin.applications]
AppSource: Loaded 0 items
  Loaded 46 items
D [kupfer.plugin.firefox] BookmarksSource: Parsing
/home/myself/.mozilla/firefox/9shb6xj3.default/bookmarkbackups/bookmarks-2013-10-18.json
D [kupfer.plugin.firefox] BookmarksSource: Loaded 33 items
[kupfer.icons]: Icon theme changed, clearing cache
kupfer.py: Fatal IO error 11 (Resource temporarily unavailable) on X
server :0.0.
=============================

Revision history for this message
Sb (sb56637) wrote :

I found that Kupfer already does have an automatic save interval defined in data.py, "DATA_SAVE_INTERVAL_S = 3600". Is there any disadvantage to setting this to a really low number, like every 10 seconds? Or is there possible a way to make it run this data save command every time a change is made to the mnemonics?

Obviously a proper save initiated by the session manager would also be nice to have still.

Thanks a lot!

Revision history for this message
Karol Będkowski (karol-bedkowski) wrote :

Ok.
I see the problem - Mate Session Manager doesn't works as I thought.

Please check attached patch (you should unapply previous).

Revision history for this message
Sb (sb56637) wrote :

Thanks very much Karol, works great now! I also ended up changing the DATA_SAVE_INTERVAL_S to 300.

I really appreciate all you are doing to make Kupfer better! It's a real lifesaver.

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

Other bug subscribers

Remote bug watches

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