CDEMU(1)

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

πŸ‘‘ cdemu(1) β€” General Commands Manual πŸ‘‘

okay bestie, you're looking at the cdemu(1) page, and honestly? it's a whole vibe. let's get into it πŸ’…


✨ NAME ✨

cdemu β€” a simple command-line CDEmu client πŸ¦‹


✨ SYNOPSIS ✨

cdemu [options] <command> <command parameters>

✨ DESCRIPTION ✨

so this is cdemu, a command-line client for controlling the CDEmu daemon ✨ it's part of the cdemu suite, a free, GPL CD/DVD-ROM device emulator for linux 🐧

it gives you a way to do the key tasks related to controlling the CDEmu daemon, like loading and unloading devices, showing devices' status, and retrieving/setting devices' debug masks πŸ’–

when connecting to the daemon, the cdemu client can use either the session or the system bus. by hard-coded default, it uses the session bus 🌸 the default bus to be used can be specified via /etc/cdemu-client.conf or the ~/.cdemu-client file β€” for more info, please read the README file πŸ“– the default can be overridden using the --bus option πŸ‘‘


πŸ” ENCRYPTED IMAGES SUPPORT πŸ”

CDEmu daemon offers support for encrypted images 🧚 when a password is required to load an image, cdemu-client will prompt for it and then send it to the daemon.

NOTE, HOWEVER, THAT THE PASSWORD IS SENT OVER D-BUS IN A PLAIN STRING FORM, WITHOUT ANY PROTECTION. 😭 like, no encryption, nothing. bestie, be aware.

the password prompt mechanism is implemented like this, step by step πŸ’œ:

  1. If the CDEMU_ASKPASS environment variable is set, the password is obtained by running a sub-process with the command specified in the said environment variable.
  2. Otherwise, if the client is ran from a console (standard input is available), the console is used to prompt for the password.
  3. If the console is unavailable, the command from the SSH_ASKPASS environment variable is used, if the said variable is set.
  4. Otherwise, the password cannot be obtained and an error is raised πŸ’€

πŸŽ€ OPTIONAL INTEGRATION WITH ZENITY πŸŽ€

optional integration with zenity can be turned on by setting the CDEMU_USE_ZENITY environment variable to a value different from 0 ✨

in this mode, the cdemu client uses a zenity-provided password input dialog to prompt the user for a password when trying to load an encrypted image πŸ™ˆ this effectively bypasses the mechanism outlined in the previous section (i.e., the zenity dialog is always used to prompt for password, regardless of other environment variables and availability of standard input) πŸ’…

similarly, a zenity-provided error dialog is used to report errors, in addition to them being printed to the stderr stream πŸ“’ note that the error dialog effectively blocks the execution of the program until the user acknowledges and closes the dialog 🫢

this mode is primarily intended for use cases where the cdemu client is used to implement actions that run without an attached console, but may require user input (password) and may need to report error messages 🌈 an example of such a scenario is implementation of a "Load with CDEmu client" action for desktop environments and their file browsers πŸ¦‹


✨ OPTIONS ✨

  • -h, --help β€” displays the help message πŸ’– if a command is specified, the help message with synopsis and description for that command is displayed.
  • -v, --version β€” prints version info and exits πŸ‘‹
  • -b, --bus β€” sets the D-BUS bus type to use for connection πŸ”Œ valid values are session and system. if no bus is specified, the session bus is used by default.

🌟 COMMANDS 🌟

load [options] <device> <filename> [...]

loads the device πŸ“€ device is the number of the desired device, or any. if any is used, then the client will attempt to load the image into the first empty device it finds (provided there is one available) 🌸 filename is the image filename. for multi-file images, multiple filenames can be provided πŸ’«

the following options can be passed to the load command:

  • --replace (or --unload) β€” allows the specified device to be unloaded, thereby effectively replacing the image in an already-loaded device πŸ”„ when device is set to any, the client first iterates over all devices and attempts to find an empty device. if no empty device is available, it iterates over devices again, and attempts to load the image in the first device that it manages to unload πŸ‘‘ in practice, this will most often be the first device, unless some explicit locking prevents the device from being unloaded.
  • --create β€” if no empty device is available, allow the client to request a new device to be created, and load the image into it ✨ applicable only when device is set to any.

in addition to the above options, the following optional parser parameters can also be passed via corresponding options (whether they are supported by a particular image parser or not depends on the parser implementation):

  • --encoding <string> β€” allows an encoding for a text-based image format (such as CUE) to be specified πŸ“ this might be needed if the image descriptor file contains non-ASCII characters and does not use Unicode.

create-blank [options] --writer_id=<writer-id> <device> <image_file>

creates a blank recordable disc in the specified device πŸ’Ώ device is the number of the desired device, or any. if any is used, then the client will attempt to load the image into the first empty device it finds (provided there is one available) 🌸 image_file is the image filename/basename. a valid writer-id must also be provided πŸ”₯ other valid options are:

  • --medium-type <type> β€” sets the blank medium type πŸŽ€ valid values are: cdr74, cdr80, cdr90, cdr99 and dvd+r.
  • --param="writer.parameter_id=parameter_value" β€” allows the user to pass additional image writer parameters πŸ’… parameter_id must be a valid parameter ID from the image writer's parameter sheet, prefixed by "writer.".

unload <device>

unloads the device πŸ“€ device is the number of the desired device, or all.


status

displays devices' status πŸ‘€


add-device

creates another virtual device βž•


remove-device

removes the last virtual device βž–


device-mapping

displays device mapping information πŸ—ΊοΈ


daemon-debug-mask <device> [new-value]

displays/sets the daemon debug mask πŸ› device is the number of the desired device, or all. new-value is the new debug mask value. if this argument is omitted, the current debug mask is displayed. the list of supported debug mask identifiers and values can be obtained with the enum-daemon-debug-masks command ✨ the new-value can be either a single numeric value (e.g, 0x03), a string of numeric values separated by the pipe character (e.g., "0x01|0x02"), or a string of identifiers separated by the pipe character (e.g., "DAEMON_DEBUG_DEVICE|DAEMON_DEBUG_MMC") πŸ’–


library-debug-mask <device> [new-value]

displays/sets the library debug mask πŸ“š device is the number of the desired device, or all. new-value is the new debug mask value. if this argument is omitted, the current debug mask is displayed. the list of supported debug mask identifiers and values can be obtained with the enum-library-debug-masks command ✨ the new-value can be either a single numeric value (e.g, 0x03), a string of numeric values separated by the pipe character (e.g., "0x01|0x02"), or a string of identifiers separated by the pipe character (e.g., "MIRAGE_DEBUG_PARSER|MIRAGE_DEBUG_DISC") πŸ’œ


dpm-emulation <device> [new-value]

displays/sets the DPM emulation flag βš™οΈ device is the number of the desired device, or all. new-value is the new value to be set. if this argument is omitted, the currently set value is displayed πŸ”


tr-emulation <device> [new-value]

displays/sets the transfer rate emulation flag πŸƒβ™€οΈ device is the number of the desired device, or all. new-value is the new value to be set. if this argument is omitted, the currently set value is displayed πŸ”


bad-sector-emulation <device> [new-value]

displays/sets the bad sector emulation flag πŸ’€ device is the number of the desired device, or all. new-value is the new value to be set. if this argument is omitted, the currently set value is displayed πŸ”


dvd-report-css <device> [new-value]

report the loaded DVD as CSS-encrypted πŸ”’ device is the number of the desired device, or all. new-value is the new value to be set. if this argument is omitted, the currently set value is displayed.

this flag influences the generation of fake Disc Structure 0x01, and as such works only with images of DVD videos that do not provide this information (most images, with the exception of perhaps mds/mdf, don't) 🎬 enabling this option allows images of CSS-encrypted DVDs (e.g. created using dd or readcd without running through a CSS decryption step when creating the image) to be played by a deCSS-enabled Linux media player 🍿


device-id <device> [new-vendor-id] [new-product-id] [new-revision] [new-vendor-specific]

displays/sets the device ID 🏷️ device is the number of the desired device. new-vendor-id is the new vendor ID string to be set (8 characters max). new-product-id is the new product ID string to be set (16 characters max). new-revision is the new revision string to be set (4 characters max). new-vendor-specific is the new vendor-specific string to be set (20 characters max). if the new values are omitted, the currently set values are displayed πŸ‘€


enum-parsers

enumerates supported image parsers πŸ”Ž


enum-writers

enumerates supported image writers ✍️


enum-filter-streams

enumerates supported filter streams 🌊


enum-daemon-debug-masks

enumerates supported daemon debug masks πŸ›


enum-library-debug-masks

enumerates supported library debug masks πŸ“š


enum-writer-parameters <writer-id>

retrieves and displays the parameters sheet for the specified image writer πŸ“‹


version

displays version information 🏷️


πŸŽ€ EXAMPLES πŸŽ€

okay bestie, this is the part where it ALL clicks. real commands, real vibes, copy-paste energy. every single one of these is exactly what you type β€” no cap πŸ’…


Loading a single image to first device

one image, one device, zero drama ✨

cdemu load 0 ~/image.mds

Loading multiple-file image to first device

multi-file image? yeah you just list them all, girlie. it's giving "one device, many files" πŸ¦‹

cdemu load 0 ~/session1.toc ~/session2.toc ~/session3.toc

Loading a text-based image in non-ASCII/non-Unicode encoding

bestie your cue file is in some old-school encoding and it's not ASCII or Unicode? that's what --encoding is for 🌸

cdemu load 0 ~/image.cue --encoding=windows-1250

Loading a raw image of a CSS-encrypted DVD created by dd, so it can be played by mplayer

load the raw dump, then report that CSS so the player knows what's up πŸ”₯

cdemu load 0 ~/image.iso
cdemu dvd-report-css 0 1

Creating a blank recordable disc: DVD+R SL with ISO image writer

blank disc era πŸ‘‘ β€” DVD+R single layer, written through the ISO image writer.

cdemu create-blank --writer-id=WRITER-ISO --medium-type=dvd+r 0 ~/output-image.iso

Creating a blank recordable disc: 80-minute CD-R with TOC image writer, with additional writer parameters

80-minute CD-R, TOC image writer, and extra writer params because we're extra πŸ’–

cdemu create-blank --writer-id=WRITER-TOC --medium-type=cdr80 --param="writer.write_raw=1" --param="writer.write_subchannel=1" 0 ~/output-image.toc

Unloading first device

yeet the image off device 0 πŸ“

cdemu unload 0

Displaying device status

vibe check on your devices πŸ“‹

cdemu status

Adding another device

more devices, more problems, more slay ✨

cdemu add-device

Removing the last device

bye bye last device 🫢

cdemu remove-device

Displaying device mapping information

who is mapped to what and where, the whole map πŸ—ΊοΈ

cdemu device-mapping

Setting daemon debug mask for the first device

one mask, one device. very demure πŸŽ€

cdemu daemon-debug-mask 0 0x01

Setting daemon debug mask for the first device (composite)

now we're combining masks with | like the icon you are 🌈

cdemu daemon-debug-mask 0 "0x01|0x02"

Setting daemon debug mask for the first device (composite, by name)

same composite energy, but by name instead of hex. main character move fr fr πŸ’…

cdemu daemon-debug-mask 0 "DAEMON_DEBUG_DEVICE|DAEMON_DEBUG_MMC"

Obtaining library debug mask for the first device

asking nicely what the library debug mask currently is πŸ”

cdemu library-debug-mask 0

Disabling DPM emulation on all devices

all means ALL, bestie. every single device. DPM emulation: off πŸ’€

cdemu dpm-emulation all 0

Enabling transfer rate emulation on first device

turn the transfer rate emulation ON for device 0 πŸ”₯

cdemu tr-emulation 0 1

Enabling bad sector emulation on first device

and here's bad sector emulation on device 0 🌸

okay so listen β€” the original page literally repeats the tr-emulation line here for its bad-sector-emulation example. not me editing the sacred text πŸ™ˆ that's exactly what's written, so that's exactly what you get. I'm just the messenger πŸ’œ
cdemu tr-emulation 0 1

Changing device ID of first device

giving device 0 a whole new identity: vendor, product, version, and a description. glow up 🌟

cdemu device-id 0 "MyVendor" "MyProduct" "1.0.0" "Test device ID"

Enumerating supported image parsers

what parsers does this thing even have? let's find out πŸ‘‘

cdemu enum-parsers

Enumerating supported image writers

same question but for writers ✍️

cdemu enum-writers

Enumerating supported filter streams

and now the filter streams πŸ¦‹

cdemu enum-filter-streams

Enumerating supported daemon debug masks

every daemon debug mask that exists, listed out for you πŸ’–

cdemu enum-daemon-debug-masks

Enumerating supported library debug masks

and every library debug mask too πŸŽ€

cdemu enum-library-debug-masks

Obtaining parameter sheet for TOC image writer

want the full spec sheet for the TOC image writer? here's how you ask for it ⭐

cdemu enum-writer-parameters WRITER-TOC

Displaying daemon and library version

the classic. version check, both daemon and library 🌈

cdemu version

πŸ‘‘ 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


and that's a wrap, bestie 🫢 this whole masterpiece is CDEMU(1), last touched February 2026 β€” go forth and mount things, you've got this πŸ’…βœ¨

πŸ“¦ where this page comes from