Victor Ivanov wrote:
On 10/06/2020 07:59, Dale wrote:
It tells me I don't have permission to access but it also mounts it
This KDE bug re Device Notifier has been present for a long time and
it's seriously infuriating. Mounting from Dolphin, on the other hand,
seems to work just fine, though it too doesn't miss the opportunity to
complain about privileges.

It's not a Gentoo specific issue, as I've experienced this on other
distros too. I believe there was an upstream bug report that kept
getting resolved and reopened.

On 10/06/2020 07:59, Dale wrote:
I type in the password but it mounts it to the wrong place.
This is normal. By default, volumes mounted from userspace will be
mounted under "/run/media/<uid>/<volume name>". This makes sense and is
entirely due to user privileges. Mounting under other directories would
require escalation of privileges. But most basic UI features are
designed for the most common scenario.

On 10/06/2020 07:59, Dale wrote:
How do I tell the Device Notifier that I want it mounted somewhere
else?
From KDE you can't and there's no KDE-specific tool to allow you to do
that. But you can add the UUID of the filesystem to /etc/fstab and KDE
will then mount it under that location. However, make sure that the UUID
is that of the open volume, not the encrypted container.

For example, if you manually open the encrypted volume via the command
line, e.g.:

  # cryptsetup open /dev/sdz1 crypto_volume_name

This will ask you for the encryption password and, if correct, will
create a new block device "/dev/mapper/crypto_volume_name".

You can then get the UUID of "/dev/mapper/crypto_volume_name" with:

  # blkid /dev/crypto_volume_name

At this point you can close your LUKS container via:

  # cryptsetup close crypto_volume_name

You can bypass steps 1 and 3 above by mounting via the KDE as usual,
which will automatically create the block device
"/dev/mapper/luks_abcdef1234". You can then get its UUID via step 2 and
replace step 3 by ejecting the mounted volume.

Finally, add this UUID to /etc/fstab in the usual way:

UUID=<uuid from step2> /dst/mount/dir <fstype> [mount_options],user 0 0

Note "user" under mount options. This is critical to making it work
seamlessly from KDE, otherwise it will require escalation of privileges
to mount the volume.

Once you do the above, the volume should automatically be mounted under
"/dst/mount/dir" the next time you mount it via Dolphin or Device Notifier.

It still won't get rid of the annoying "You don't have permissions"
error message, but it does work.

Hope this helps.

- Victor



I've got that in dmcrypt and fstab as the wiki says.  That part works.  It's the KDE part that isn't working correctly.  However, I did do one thing different, I put users instead of user.  Plural not singular.  Should users work the same as user?

I wonder, other distros have crypttab file instead of dmcrypt.  I wonder if I created a crypttab file if that would help KDE even if Gentoo ignores it or doesn't know it exists.  It sounds like the Device Notifier is just not set up or designed to do what I want to do.  Given the number of people who do what I'm doing, it looks like KDE would either update the Device Notifier or have a new tool that handles encrypted things. 

Dale

:-)  :-)