Bug 494975 - Hidden tmp device defined in /etc/fstab re-appears in places panel after reboot
Summary: Hidden tmp device defined in /etc/fstab re-appears in places panel after reboot
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 24.08.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-10-18 08:01 UTC by Mathias
Modified: 2024-11-12 16:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathias 2024-10-18 08:01:27 UTC
SUMMARY
Dolphin does not remember the hidden status of an encrypted tmp device after reboot. The problem started after the upgrade to Plasma 6.

STEPS TO REPRODUCE
1. Open Dolphin
2. In the places panel, the crypt-tmp device ist shown.
3. Right-click on it, mark as "hide device".
4. Device disappears from places panel.
5. Reboot.
6. Open Dolphin.

OBSERVED RESULT
Crypt-Tmp device that was hidden before is shown again on the places panel.

EXPECTED RESULT
The hide state of the device should be remembered, it should not be shown.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.6.52-gentoo (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-8700 CPU @ 3.20GHz
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630

ADDITIONAL INFORMATION
The crypt-tmp device in my case is a temp partition that is freshly encrypted automatically upon every boot and defined in /etc/fstab (by dmcrypt with a random key).
Before the upgrade to Plasma 6 all worked as expected: I could hide the device and it stayed hidden, also after a reboot.
Probably plasma/dolphin now started to recognize it as a completely new device on every boot.
This is not totally trivial because when visible so close to removable devices in the places panel it can happen to accidentally unmount/eject the tmp device.
Comment 1 TraceyC 2024-11-05 18:21:15 UTC
Can you please share the line defining this folder in your /etc/fstab?
Comment 2 Mathias 2024-11-07 07:40:57 UTC
(In reply to TraceyC from comment #1)
> Can you please share the line defining this folder in your /etc/fstab?

Happily:

/dev/mapper/crypt-tmp   /tmp            ext4            noatime         0 0
Comment 3 TraceyC 2024-11-07 21:25:07 UTC
Thanks for the information
I tried to replicate this on Solus (Plasma 6.2.3 / Dolphin 24.08.2), 
and git-master Plasma / Dolphin 

I was not able to replicate, testing with a non-encrypted nfs mount defined in /etc/fstab
After hiding the mount and rebooting, I do not see it under "Remote"
I have to right click Remote and check "Show All Entries" to see the mount again

I'll leave this open so that someone more versed with how dm-crypt volumes are handled can chime in
Comment 4 Mathias 2024-11-08 07:52:32 UTC
Thanks for looking into this. Just an addition: There are also other encrypted partitions on this system which Dolphin successfully remembers to hide from the pane. The probably only difference between those and the crypt-tmp device where dolphin forgets the 'hidden' state is that the crypt-tmp partition is freshly initiated on every reboot: encrypted with a random key, and then a fresh filesystem installed in it. I do not know how Dolphin identifies devices, but it seems that not by partition name (/dev/mapper/crypt-tmp) or mount point (/tmp), because these stay the same.

The section from /etc/conf.d/dmcrypt:
target=crypt-tmp
source=PARTUUID="XXXXXXXX-01"
key='/dev/urandom'
pre_mount='/sbin/mkfs.ext4 ${dev}'
post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}'