This should be simple. Dolphin "Places" are this file:
simply adding the following xml adds /media:
<bookmark href="file:///media"> <title>media</title> <info> <metadata owner="http://freedesktop.org"> <bookmark:icon name="inode-directory"/> </metadata> <metadata owner="http://www.kde.org"> <ID>1504210388/0 (V2)</ID> <IsHidden>false</IsHidden> </metadata> </info> </bookmark>
can be changed to <title>Media and Shares</title> or whatever.
- For KVM, should shared folder helper put shares into /media to match vbox? Is /media a better place than /mnt/ anyway? Being consistent is a positive, in any case.
- This can be part of the shared folder package
- What's the best way to edit/add this file? I propose we simply overwrite the default file with ours, which would be a copy of the default one plus our additions.
- Any other places we should add?
JasonJAyalaP (Jason J. Ayala P.):
JasonJAyalaP added a comment.This should be simple. Dolphin "Places" are this file: ~/.local/share/user-places.xbel
We must not write to that file. Packages are not allowed to write there.
Causes all sorts of issues.
Patrick (Patrick Schleizer):
Patrick added a comment.JasonJAyalaP (Jason J. Ayala P.): > JasonJAyalaP added a comment. > > This should be simple. Dolphin "Places" are this file: > > ~/.local/share/user-places.xbel We must not write to that file. Packages are not allowed to write there. Causes all sorts of issues.
Generally: writing into home is an absolute exception.
It's possible to configure KDE without writing into home folders, but
it's not easy. There are some examples in Whonix.
It could do more than nuke their current settings? We would have to check each time dolphin upgrades to make sure the format is right, of course.
But can't we safely assume that shared folder helper will be used while building, and not by users with a functioning desktop? I don't see how we can make very useful changes without touching ~/.local at least at build.
Packages as per Debian policy must not write into /home or /root. It
causes an interactive dpkg conflict resolution during upgrades. It
causes a lintian warning. It makes the package unfit for inclusion into
Debian. It conflicts with users settings, can leave the file in a messy
state and break the desktop. Hard to upgrade/change without breaking the
desktop on major Debian upgrades. It's a very unprofessional bad solution.
For example https://github.com/Whonix/kde-sounds-off changes sound
settings without writing into home.
T636#13960 is another solution for such a setting.
Other packages implement other settings.
All without touching /home or /root.
@hein might help. (drop the code tags to really highlight) Formulate a
good summarized question, then highlight.
It's not straight forward or documented but often it can be sorted out
by looking at how other distributions sorted it out.
Hard to debug:
- Manually add a favorite.
- Have a look at ./.local/share/user-places.xbel to see how it's done (but this must not be the solution we implement.
- Environment variable XDG something. (Probably got that in package anon-apps-config.)
- File: user-places.xbel
- As a general advice, I was told, if the local file is ./.local/share/user-places.xbel then the file in the XDG folder should use the same structure, i.e...
- We might be getting away dropping that file here:
/usr/share/anon-apps-config/ / https://github.com/Whonix/anon-apps-config/tree/master/usr/share/anon-apps-config/share