CDEMU-DAEMON(8)

πŸ“¦
version 3.3.1 Β· 2 versions
, in arch rolling, nixos 26.05, nixpkgs unstable, ubuntu stonking

πŸ’Ώ CDEMU-DAEMON(8) β€” aka the cdemud era πŸ’Ώ

okay bestie so first things first: the full name of this page is CDEMU-DAEMON(8), straight out of the System Manager's Manual, and it's all about the CDEmu daemon. And when I say "all about", I mean the whole thing. Sit down, hydrate, we're going through every single flag together 🫢


✨ NAME ✨

cdemud β€” the CDEmu daemon. that's it, that's the name, iconic intro ngl πŸ‘‘


🌸 SYNOPSIS 🌸

cdemu-daemon [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

So this πŸ‘ is πŸ‘ the πŸ‘ CDEmu daemon πŸ‘ β€” the userspace half of the cdemu suite, which is a free, GPL CD/DVD-ROM device emulator for linux. GPL means open source slay, linux means you already know πŸ’…

Here's the vibe: it receives SCSI commands from the kernel module and processes them, passing the requested data back to the kernel. The daemon is the one implementing the actual virtual device β€” and it does this one instance per each device registered by the kernel module. No sharing, one daemon per device, main character energy only.

For the image access bit (think sector reading and such), it uses libMirage, which is an image access library that's also part of the cdemu suite. Team player fr fr.

And then β€” the networking flex β€” the daemon registers itself on D-BUS' system</> or session</> bus (which one depends on the options you pass it, iykyk), where it exposes an interface that clients can use to control it. So clients can just... talk to it. adorable.


πŸ’… OPTIONS πŸ’…

  • --config-file=filename β€” Configuration file to load. The details live down in the Configuration file section, so scroll, bestie πŸ“
  • -n --num-devices=N β€” Number of devices. Tells you exactly how many virtual devices this here daemon instance should register with the kernel module and control. And by default? Just 1 virtual device is created. baby steps ✨
  • -c --ctl-device=path β€” Control device. You're specifying the control device path. The control device is a character device provided by the kernel module, and it's the communication line between the kernel and the userspace part of the CDEmu suite. Default is /dev/vhba_ctl. that's the one, that's the standard πŸŽ€
  • -a --audio-driver=driver β€” Audio driver. Picks which audio driver the virtual devices use for their audio play. And because libao is what's handling audio playback here, any valid libao driver can go in this slot. If you literally pass default as the driver, then libao's default driver gets used. A few cute examples of valid libao drivers: alsa, oss, pulse, or null. For all drivers, the default device is used. And if you don't explicitly specify an audio driver through this option at all? Then null is what you get. default behavior said what it said πŸ’€
  • -b --bus=bus_type β€” Bus type. Valid options are system or session. By default, the session bus is used. (Be aware though: running the CDEmu daemon on the system bus is considered deprecated and is discouraged for security reasons. so like... don't, bestie πŸ™ˆ)
  • -l --logfile=logfile β€” Log file to write logging output into. By default, using a log file is disabled and messages are written to stdout. keeping it simple ✨
  • --default-cdemu-debug-mask=mask β€” Default debug mask for CDEmu devices (at the CDEmu daemon implementation level). The default value is 0.
  • --default-mirage-debug-mask=mask β€” Default debug mask for CDEmu devices (at the libMirage implementation level). The default value is 0.
  • --system-sleep-handler=0|1 β€” Enable or disable the systemd-logind system sleep handler. When it's enabled, the daemon tries to obtain a delaying sleep inhibitor lock from the org.freedesktop.login1.Manager systemd-logind interface at /org/freedesktop/login1 on the system bus, and it registers a handler for the prepare-for-sleep signal. When the system is about to enter suspend/hibernation (as indicated by the received signal), the virtual devices are stopped and the inhibitor lock is released. After the system resumes (again, as indicated by the received signal), the inhibitor lock is re-acquired and the virtual devices are restarted. The whole point of this mechanism is to attempt to mitigate issues with active virtual devices preventing the system from properly suspending/hibernating. Default value is 1, meaning the handler is enabled. And heads up: if sleep handler functionality is disabled at build time, this option has no effect. shrug 🫠
  • -? --help β€” Display the help message. the classic, the legend 🌈

πŸ”₯ EXAMPLES πŸ”₯

Running the daemon on the default bus, with the PulseAudio audio driver and 4 virtual devices:

cdemu-daemon --num-devices=4 --audio-driver=pulse

Running the daemon on the system bus with 2 virtual devices and logging redirected to a file:

cdemu-daemon --num-devices=2 --bus=system --logfile=/tmp/cdemu-daemon.log

🧚 CONFIGURATION FILE 🧚

The daemon's settings can be collected in a configuration file, which you hand over to the daemon via the --config-file option. Inside, the config file has key=value pairs, and they all live inside a single [settings] section. The keys in the configuration file correspond to the long names of the command-line switches. matching game, but make it functional πŸ’–

If an option is specified in both the configuration file and on the command-line, the latter takes precedence. command line stays winning πŸ‘‘

If the specified configuration file does not exist, it is silently ignored. But if the specified configuration file is invalid β€” like, it has invalid syntax, or it doesn't contain a section β€” then an error is raised. no silent treatment for broken files, periodt πŸ’€

🌸 Example

Saving the following configuration to a file and passing it to the daemon via --config-file is equivalent to passing --num-devices=2 --audio-driver=pulse directly to the daemon:

[settings]
num-devices=2
audio-driver=pulse

same energy, different delivery method, we love a flexible queen ✨


πŸ‘‘ AUTHORS πŸ‘‘

  • Rok Mandeljc <rok.mandeljc@gmail.com>
  • CDEmu project's web page: http://cdemu.sourceforge.net
  • CDEmu project's mailing list: cdemu-devel@lists.sourceforge.net

okay that's the whole page, you made it, I'm so proud of you πŸ₯ΉπŸ’œ this was the CDEmu daemon page from the System Manager's Manual β€” Nov 19, 2025, that's the date on the tin, so if you're reading this way later, check for a glow-up. bye bestie, go emulate some discs responsibly πŸŽ€πŸ’Ώβœ¨

πŸ“¦ where this page comes from