[Bug 204464] sysutils/fusefs-ntfs: No automount with HAL of ntfs-volumes since FreeBSD 10.x

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Feb 3 11:10:28 GMT 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204464

Serge Volkov <sv at ulstu.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sv at ulstu.ru

--- Comment #18 from Serge Volkov <sv at ulstu.ru> ---
I think I understand what Werner Lehmann is writing.

In my project ulbsd.ru, I have been using the following trick for many years
since the FreeBSD 10.x with KDE4. Now I use this trick in FreeBSD 12.0 with
KDE5. And it works for me.

Step 1: I use patch for /usr/src/sbin/mount/mount.c:

--- mount.c.orig        2016-10-15 17:03:43.284479000 +0300
+++ mount.c     2016-04-15 19:38:59.761871000 +0300
@@ -143,7 +143,7 @@
         */
        unsigned int i;
        const char *fs[] = {
-       "cd9660", "mfs", "msdosfs", "nfs",
+       "cd9660", "mfs", "msdosfs", "nfs", "ntfs",
        "nullfs", "smbfs", "udf", "unionfs",
        NULL
        };

cd /usr/src/sbin/mount/
make all install clean

Step 2: Install fusefs-ntfs and create mount_ntfs link:

pkg install -r latest fusefs-ntfs
ln -s /usr/local/share/hal/mount-fuse /sbin/mount_ntfs
chmod 555 /usr/local/share/hal/mount-fuse

Step 3: Add to /boot/loader.conf:

fuse_load="YES"

Step 4: Add to /etc/sysctl.conf:

vfs.usermount=1

Step 5: Add to /etc/devfs.rules:

[localrules=10]
# IDE/SATA Hard disks
add path 'ad[0-9]*' mode 0660 group operator
add path 'ada[0-9]*' mode 0660 group operator
# SCSI/USB Hard disks
add path 'da[0-9]*' mode 0660 group operator

Step 6: Add to /etc/rc.conf:

devfs_system_ruleset="localrules"

Step 7: Change /usr/local/etc/PolicyKit/PolicyKit.conf:

<config version="0.1">
    <match user="root">
        <return result="yes"/>
    </match>
    <define_admin_auth group="operator"/>
    <match action="org.freedesktop.hal.storage.mount-removable">
        <return result="yes"/>
    </match>
    <match action="org.freedesktop.hal.storage.mount-fixed">
        <return result="yes"/>
    </match>
    <match action="org.freedesktop.hal.storage.eject">
        <return result="yes"/>
    </match>
</config>

After that, removable drives with the NTFS file system can be mounted on KDE4/5
in the usual way by root and users from the operator group.

In KDE5 there is a small glitch (not critical) that can be fixed by changing
the string "Exec=..." in file
/usr/local/share/solid/actions/test-predicate-openwindow.desktop:

Exec=/bin/sleep 0.5; [ ! -z "%f" ] && kde-open5 "%f"

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kde-freebsd mailing list