Solved CD/DVD mounting in Plasma6

What do I need to do to make my CD/DVD drive appear in Dolphin's Devices list and the Disks & Devices notification-icon menu when I insert a disk? I have already made sure that my user is in a group that has read/write access to /dev/cd*, but I am still stuck mounting optical media from the command line rather than having it show up the way USB drives do.
 
Please see

for /etc/devfs.rules and /usr/local/etc/PolicyKit/PolicyKit.conf configs.

Changes to that post:
kde4 line is obviously outdated.
hald is not needed, you’ll need sysutils/automount, sysutils/bsdisk and devel/kf6-solid
add vfs.usermount=1 to /etc/sysctl.conf

My /etc/devfs.rules
Code:
[devfsrules_common=7]
add path 'ad[0-9]\*'    mode 666
add path 'ada[0-9]\*'    mode 666
add path 'da[0-9]\*'    mode 666
add path 'acd[0-9]\*'    mode 666
add path 'cd[0-9]\*'    mode 666
add path 'mmcsd[0-9]\*'    mode 666
add path 'pass[0-9]\*'    mode 666
add path 'xpt[0-9]\*'    mode 666
add path 'ugen[0-9]\*'    mode 666
add path 'usbctl'    mode 666
add path 'usb/\*'    mode 666
add path 'lpt[0-9]\*'    mode 666
add path 'ulpt[0-9]\*'    mode 666
add path 'unlpt[0-9]\*'    mode 666
add path 'fd[0-9]\*'    mode 666
add path 'uscan[0-9]\*'    mode 666
add path 'video[0-9]\*'    mode 666
add path 'tuner[0-9]*'  mode 666
add path 'dvb/\*'    mode 666
add path 'cx88*'     mode 0660
add path 'cx23885*'     mode 0660 # CX23885-family stream configuration device
add path 'iicdev*'     mode 0660
add path 'uvisor[0-9]*' mode 0660

TBH, most of those rules are not needed, but that file was made long, long time ago and just went from one version to new version for years now.
 
Thanks! That pointed me to a solution. I didn't have to edit /etc/devfs.rules as I already had
Code:
[localrules=10]
add path 'cd*' mode 660 group operator
add path 'pass*' mode 660 group operator
add path 'xpt*' mode 660 group operator
from searching other forum posts in an unsuccessful attempt to get cdrecord to run happily without suid root, and I already had
Code:
devfs_system_ruleset="localrules"
in /etc/rc.conf from that as well.

So it was specifically the polkit change I needed.

My existing polkit configuration, from when I read forum posts to enable USB mounting, uses different filenames and syntax. I had:
/usr/local/etc/polkit-1/rules.d/10-mount.rules
Code:
// Allow udisks2 to mount devices without authentication
// for users in the "wheel" group.
polkit.addRule(function(action, subject) {
    if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
         action.id == "org.freedesktop.udisks2.filesystem-mount") &&
        subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});

So I simply added to the same file:
Code:
// Allow non-USB removable media mounting by users in operator group
polkit.addRule(function(action, subject) {
    if ((action.id == "org.freedesktop.hal.storage.mount-removable" ||
         action.id == "org.freedesktop.hal.storage.unmount-other") &&
        subject.isInGroup("operator")) {
        return polkit.Result.YES;
    }
});

And rebooted, after which I could see my CD drive in a new "Removable Devices" list.
 
On the off chance anybody involved in stabilizing the next version of FreeBSD sees this thread, I'll remark that from the perspective of a long-time Linux user who switched to FreeBSD a little less than a year ago, the #1 usability issue for beginning desktop users of FreeBSD 14.x is that simply following the instructions in the FreeBSD Handbook on how to install a desktop environment will not give you "sane defaults" where at least users with elevated permissions (eg. operator, wheel) are trusted to freely manipulate CD-ROMs and thumb drives, etc.

At least for KDE, setting this up commonly-desired behavior requires editing a config file that is not only not mentioned in the desktop-setup section of the Handbook but not mentioned anywhere in the Handbook. I and most people reading this forum are techie enough that "google for arcane values to put in a config file" is a normal workflow for us, but this is not "user friendly". FreeBSD isn't trying to be Linux Mint, and it's fine if behaviors nearly every desktop user wants are "some assembly required", but it should be in the Handbook where anyone who knows read a table of contents can find it.
 
On the off chance anybody involved in stabilizing the next version of FreeBSD sees this thread
Ports have nothing to do with the version of FreeBSD.
from the perspective of a long-time Linux user
On most, if not all, Linux distributions third party software is linked to the version of the distribution. Distro v1.0 might have applicationA 2.0 and applicationB 1.4, The next release "Distro v2.0" might have applicationA 3.0 and applicationB 1.5. On FreeBSD all (supported) versions for all supported architectures use exactly the same ports tree for their third party software. So FreeBSD X has applicationA 2.0, and FreeBSD X+1 has the exact same applicationA 2.0 version.

FreeBSD 13, FreeBSD 14 and FreeBSD 15 all share the same ports tree, thus have the same version of Gnome, XFCE, KDE, etc.
 
On the off chance anybody involved in stabilizing the next version of FreeBSD sees this thread, I'll remark that from the perspective of a long-time Linux user who switched to FreeBSD a little less than a year ago, the #1 usability issue for beginning desktop users of FreeBSD 14.x is that simply following the instructions in the FreeBSD Handbook on how to install a desktop environment will not give you "sane defaults" where at least users with elevated permissions (eg. operator, wheel) are trusted to freely manipulate CD-ROMs and thumb drives, etc.

At least for KDE, setting this up commonly-desired behavior requires editing a config file that is not only not mentioned in the desktop-setup section of the Handbook but not mentioned anywhere in the Handbook. I and most people reading this forum are techie enough that "google for arcane values to put in a config file" is a normal workflow for us, but this is not "user friendly". FreeBSD isn't trying to be Linux Mint, and it's fine if behaviors nearly every desktop user wants are "some assembly required", but it should be in the Handbook where anyone who knows read a table of contents can find it.
I always point new users to the vermaden blog. Some ~8 years ago best place to learn was from Allison Nicole Reid site Cooltrainer (still worth reading, although it ends with v11), but nowadays there is no better place to learn than FreeBSD Desktop
 
Ports have nothing to do with the version of FreeBSD.

On most, if not all, Linux distributions third party software is linked to the version of the distribution. Distro v1.0 might have applicationA 2.0 and applicationB 1.4, The next release "Distro v2.0" might have applicationA 3.0 and applicationB 1.5. On FreeBSD all (supported) versions for all supported architectures use exactly the same ports tree for their third party software. So FreeBSD X has applicationA 2.0, and FreeBSD X+1 has the exact same applicationA 2.0 version.

FreeBSD 13, FreeBSD 14 and FreeBSD 15 all share the same ports tree, thus have the same version of Gnome, XFCE, KDE, etc.
Exception being graphics/drm-kmod. That one is definitely tied to the version of FreeBSD. I compile mine to avoid issues with pkg.
 
Back
Top