Registered Member
|
Hi all!
I've written a small app for managing drives (mounting, unmounting, retrieving drives data e.t.c) and I want to manage "Places" panel from my app: adding and deleting entries. I've searched google, but nothing helpful found. Only about manual panel managing. But I think ( and sure) it can be managed programmatically. May be via dbus commands, or via config files. I tried to search for configs in order to edit them, but can't find any files that reflects panel changes. Though Dolphin saves some data on every exit:
Can anyone point me out, where I have to start from? Thanks. |
Manager
|
|
Registered Member
|
Thanks for reply!
I've played a bit with these two files (bookmarks.xml and bookmarks.xml.bak). Looks like its impossible to modify panel's content by editing these files. I modified panel's entry name (in both bookmarks.xml and bookmarks.xml.bak) and saved changed files. Dolphin was not started when I did this changes. After that I started Dolphin and saw the old entry name. Somehow bookmarks.xml and bookmarks.xml.bak was restored to previous state, though Dolphin does not running when I modified these files. Looks like some another program monitors these files and restores them. May be it is some daemon? After that I closed Dolphin and modified bookmarks once more. This time I blocked these files by chattr +i in order to prevent their restoring. And started Dolphin again. Dolphin still showed the old entry name. Only at the second attempt (Dolphin was restarted once more) new entry name appeared. Strange behaviour. Looks like Dolphin does not read these files and gets places entries from some other config, and these bookmarks are just reflection of previous panel state. |
Manager
|
might actually be derived from ~/.local/share/user-places.xbel, found this in the following posts:
http://linuxexchange.org/questions/2726 ... for-places & http://www.linuxquestions.org/questions ... 175453324/ |
Registered Member
|
Yes, it is derived from user-places.xbel. I think I found who rewrites these configs: it is dbus.
I stopped dbus and closed dolphin, edited and saved user-places.xbel. After that I started dolphin - it accepted my changes. I tried to reopen dolphin few times - all looked fine. Until I started dbus again. Configs was restored to old state immediately after dbus start. Seems it impossible to manage bookmarks via user-places.xbel or bookmarks.xml. Probably it could be done via dbus. |
Administrator
|
You could use lsof to determine what process is changing the file - or dbus-monitor to see what actions Dolphin takes.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Moderator
|
You could also look at Dolphin's source code (kde-baseapps/dolphin/src/panels/places/) to check it modifies "Places" entries. I haven't written that code myself, and I'm rather unfamiliar with it, so I can't give you any better advice, sorry about that.
|
Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]