About
sysutils/dsbmd is a media mounting daemon written for FreeBSD. It detects and monitors storage devices (like USB sticks, hard disks, CD/DVD drives, card readers, digital cameras (PTP), MTP devices like smartphones, tablets etc.), and identifies their filesystems. Its clients can request DSBMD to execute actions on those devices, like mounting and unmounting. Currently supported filesystems are ISO-9660, FAT, NTFS, UFS, Ext[2,3,4]fs, HFS+, exFAT, Btrfs, and XFS.
Installation
Setup
DSBMD's default configuration works out of the box, and usually doesn't need any modification. Just enable it in /etc/rc.conf and start the daemon:
By default DSBMD mounts storage devices as regular user. This requires the sysctl variable
To make this change permanent, set it in /etc/sysctl.conf:
Members of the wheel and operator group are allowed to connect to DSBMD if not configured otherwise. Since mounting of FUSE filesystems as regular user requires privileges from the operator group, add your username to the group members:
Support for ISO-9660, Ext[2,3,4], FAT, NTFS, MTPFS, PTP, and UFS is available by default. Support for additional filesystems can be selected when building from ports, or can be installed afterwards if needed:
exFAT support (optional)
HFS+ support (optional)
Btrfs and XFS support (optional)
Clients
Clients are programs that connect to DSBMD. They query information and ask DSBMD to execute actions, like mounting a device. Currently there are two standard clients you can use (of course you can also choose nc or telnet, but I do not recommend that ):
Automount
If you want devices to be automatically mounted by DSBMD, install sysutils/dsbmc-cli, and start
as regular user. If you also want to let dsbmc-cli automatically play audio CDs, and DVDs as they are inserted, you can extend the command as follows:
To automatically execute dsbmc-cli at session start, add the preferred command to ~/.xinitrc or to your shell's login file. That's it.
Examples for ~/.xinitrc
For more information see http://freeshell.de/~mk/projects/dsbmd.html
sysutils/dsbmd is a media mounting daemon written for FreeBSD. It detects and monitors storage devices (like USB sticks, hard disks, CD/DVD drives, card readers, digital cameras (PTP), MTP devices like smartphones, tablets etc.), and identifies their filesystems. Its clients can request DSBMD to execute actions on those devices, like mounting and unmounting. Currently supported filesystems are ISO-9660, FAT, NTFS, UFS, Ext[2,3,4]fs, HFS+, exFAT, Btrfs, and XFS.
Installation
# pkg install dsbmd
or # cd /usr/ports/sysutils/dsbmd && make install clean
Setup
DSBMD's default configuration works out of the box, and usually doesn't need any modification. Just enable it in /etc/rc.conf and start the daemon:
Code:
# sysrc dsbmd_enable=YES
# service dsbmd start
vfs.usermount
to be set to 1: # sysctl vfs.usermount=1
To make this change permanent, set it in /etc/sysctl.conf:
# echo "vfs.usermount=1" >> /etc/sysctl.conf
Members of the wheel and operator group are allowed to connect to DSBMD if not configured otherwise. Since mounting of FUSE filesystems as regular user requires privileges from the operator group, add your username to the group members:
# pw groupmod operator -m yourusername
Notes
- If you are running hald, it is recommended to stop and disable it:
Code:# service hald stop # sysrc hald_enable=NO
exFAT support (optional)
# cd /usr/ports/sysutils/fusefs-exfat && make install clean
HFS+ support (optional)
# cd /usr/ports/sysutils/fusefs-hfsfuse && make install clean
Btrfs and XFS support (optional)
# cd /usr/ports/sysutils/fusefs-lkl && make install clean
Clients
Clients are programs that connect to DSBMD. They query information and ask DSBMD to execute actions, like mounting a device. Currently there are two standard clients you can use (of course you can also choose nc or telnet, but I do not recommend that ):
- sysutils/dsbmc is a desktop environment agnostic GTK+ client for DSBMD that runs in the system tray and lets you mount, unmount, open, play, and eject media by clicking the corresponding device icons or by executing actions from their context menu respectively. Its settings menu allows you to set your preferred file manager and media players for DVDs, audio and video CDs.
Installation
# pkg install dsbmc
or# cd /usr/ports/sysutils/dsbmc && make install clean
- sysutils/dsbmc-cli allows you to use all the functions DSBMD provides from the command line. Further, it can be used to realize automounting (see below).
Examples
List all attached devices visible to DSBMD
% dsbmc-cli -l
dev=/dev/da0:volid=NO_NAME:fsname=msdosfs
dev=/dev/da1s1:volid=58fd26c81bf4e5ad:fsname=ufs
dev=/dev/cd0:volid=DVD_VIDEO:fsname=cd9660:type=dvd
dev=/dev/ugen3.2:volid=GT-I9105P:fsname=mtpfs:type=mtp
Mount /dev/da0. The device will be mounted to /media/NO_NAME.
% dsbmc-cli -m /dev/da0
Eject /dev/cd0
% dsbmc-cli -e /dev/cd0
Listen for add events, and automatically play audio CDs and DVDs, where dsbmc-cli replaces %t and %d by device type and device name respectively.
% dsbmc-cli -L add sh -c 'case %t in audiocd) deadbeef cdda://%d;; dvd) vlc dvd://%d;; esac' \;
Installation
# pkg install dsbmc-cli
or# cd /usr/ports/sysutils/dsbmc-cli && make install clean
Automount
If you want devices to be automatically mounted by DSBMD, install sysutils/dsbmc-cli, and start
dsbmc-cli -a
as regular user. If you also want to let dsbmc-cli automatically play audio CDs, and DVDs as they are inserted, you can extend the command as follows:
% dsbmc-cli -a -L add sh -c 'case %t in audiocd) deadbeef cdda://%d;; dvd) vlc dvd://%d;; esac' \;
To automatically execute dsbmc-cli at session start, add the preferred command to ~/.xinitrc or to your shell's login file. That's it.
Examples for ~/.xinitrc
Code:
#!/bin/sh
dsbmc-cli -a&
exec openbox-session
Code:
#!/bin/sh
dsbmc-cli -a -L add sh -c 'case %t in audiocd) deadbeef cdda://%d;; dvd) vlc dvd://%d;; esac' \;&
exec openbox-session
For more information see http://freeshell.de/~mk/projects/dsbmd.html
Last edited: