Page MenuHomePhabricator

Add /media to pinned places in dolphin
Closed, WontfixPublic

Details

Impact
Normal

Event Timeline

Patrick edited projects, added Whonix 16; removed Whonix 14.Jul 23 2017, 5:52 PM

This should be simple. Dolphin "Places" are this file:

~/.local/share/user-places.xbel

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>
<title>media</title>

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.

https://github.com/Whonix?utf8=%E2%9C%93&q=kde&type=&language=

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:

https://marc.info/?l=kde&m=141130406809446&w=2

Related:

https://www.whonix.org/wiki/Dev/KDE

JasonJAyalaP updated the task description. (Show Details)Sep 6 2017, 9:20 PM
HulaHoop added a subscriber: HulaHoop.EditedSep 7 2017, 5:30 AM
  • 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.

If it makes life easier please go ahead. I originally chose mount to avoid unforseen permissions problems with root but I guess its not a thing?

Implementation advice:

  • 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