1 |
On 10/06/2020 07:59, Dale wrote: |
2 |
> It tells me I don't have permission to access but it also mounts it |
3 |
|
4 |
This KDE bug re Device Notifier has been present for a long time and |
5 |
it's seriously infuriating. Mounting from Dolphin, on the other hand, |
6 |
seems to work just fine, though it too doesn't miss the opportunity to |
7 |
complain about privileges. |
8 |
|
9 |
It's not a Gentoo specific issue, as I've experienced this on other |
10 |
distros too. I believe there was an upstream bug report that kept |
11 |
getting resolved and reopened. |
12 |
|
13 |
On 10/06/2020 07:59, Dale wrote: |
14 |
> I type in the password but it mounts it to the wrong place. |
15 |
This is normal. By default, volumes mounted from userspace will be |
16 |
mounted under "/run/media/<uid>/<volume name>". This makes sense and is |
17 |
entirely due to user privileges. Mounting under other directories would |
18 |
require escalation of privileges. But most basic UI features are |
19 |
designed for the most common scenario. |
20 |
|
21 |
On 10/06/2020 07:59, Dale wrote: |
22 |
> How do I tell the Device Notifier that I want it mounted somewhere |
23 |
> else? |
24 |
From KDE you can't and there's no KDE-specific tool to allow you to do |
25 |
that. But you can add the UUID of the filesystem to /etc/fstab and KDE |
26 |
will then mount it under that location. However, make sure that the UUID |
27 |
is that of the open volume, not the encrypted container. |
28 |
|
29 |
For example, if you manually open the encrypted volume via the command |
30 |
line, e.g.: |
31 |
|
32 |
# cryptsetup open /dev/sdz1 crypto_volume_name |
33 |
|
34 |
This will ask you for the encryption password and, if correct, will |
35 |
create a new block device "/dev/mapper/crypto_volume_name". |
36 |
|
37 |
You can then get the UUID of "/dev/mapper/crypto_volume_name" with: |
38 |
|
39 |
# blkid /dev/crypto_volume_name |
40 |
|
41 |
At this point you can close your LUKS container via: |
42 |
|
43 |
# cryptsetup close crypto_volume_name |
44 |
|
45 |
You can bypass steps 1 and 3 above by mounting via the KDE as usual, |
46 |
which will automatically create the block device |
47 |
"/dev/mapper/luks_abcdef1234". You can then get its UUID via step 2 and |
48 |
replace step 3 by ejecting the mounted volume. |
49 |
|
50 |
Finally, add this UUID to /etc/fstab in the usual way: |
51 |
|
52 |
UUID=<uuid from step2> /dst/mount/dir <fstype> [mount_options],user 0 0 |
53 |
|
54 |
Note "user" under mount options. This is critical to making it work |
55 |
seamlessly from KDE, otherwise it will require escalation of privileges |
56 |
to mount the volume. |
57 |
|
58 |
Once you do the above, the volume should automatically be mounted under |
59 |
"/dst/mount/dir" the next time you mount it via Dolphin or Device Notifier. |
60 |
|
61 |
It still won't get rid of the annoying "You don't have permissions" |
62 |
error message, but it does work. |
63 |
|
64 |
Hope this helps. |
65 |
|
66 |
- Victor |