The cdemu packages from deb multimedia repo is broken, so we will have to use ubuntu PPA for this.
Add ubuntu PPA Ref link
sudo nano /etc/apt/sources.list.d/cdemu.list
with content:
# cdemu source
deb http://ppa.launchpad.net/cdemu/ppa/ubuntu/ bionic main
deb-src http://ppa.launchpad.net/cdemu/ppa/ubuntu/ bionic main
Add key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AFDF4CC6A4F32AA9395FAE8F423A2125D782A00F
Add deb multimedia for libmirage-plugin relevant issue
You can do it using synaptic or sudo vim /etc/apt/sources.list
and add deb http://www.deb-multimedia.org/ buster main non-free
sudo apt install cdemu-client cdemu-daemon gcdemu libmirage-plugin
Sometime you will run into some trouble running the daemon:
posix_spawn avoided (fd close requested) cdemu0: Kernel I/O: failed to open control device /dev/vhba_ctl: No such file or directory!
cdemu: Daemon: failed to start device #0!
cdemu: Daemon: failed to create device!
Daemon initialization and start failed!
Solution to this is to: sudo modprobe vhba
to start up vhba
device, then start the daemon.
cdemu-daemon
gcdemu
Hope that helps.
I'm having issues, seen here.
Error given at system start is
Trying to figure out a way to convert the systemd init script to a sysv init script and sysv init scripts look arcane. I mean,
Systemd:
vs
SysV Init:
There's no way of guessing the correct syntax for an init script, I'd basically have to know how to program them from scratch.
Tried starting the cdemu daemon manually and:
Looks like a deadlock. Can't find GDBus package, guess that's my next rabbit hole to jump down, since MX uses a systemd shim for compatibility, it should be working, right? So maybe it's GDBus?
Looks like we're using DBus instead? Found these:
https://docs.gtk.org/gio/
https://docs.gtk.org/gio/migrating-gdbus.html
In hopes that the daemon was running successfully despite not returning control to the terminal window, I tried running gCDemu, it won't open.
cdemu status
locks up then displays:Poked around and here's the net.sf.cdemu.CDEmuDaemon.service file
/bin/true "does nothing and exits successfully" so...??
EDIT: Looks like I found the culprit for some of this. Missing the
libmirage-plugin
, which I had thought I saw get installed, but it waslibmirage11
-- so I had to:sudo add-apt-repository deb https://www.deb-multimedia.org bookworm main non-free
then
sudo apt update
&sudo apt install libmirage-plugin
then edit the
/etc/apt/sources.list.d/archive_uri-https_www_deb-multimedia_org-bookworm.list
and comment out all lines thensudo apt update
againService still has the same error as before but now I can manually start it with
cdemu-daemon --config-file ~/".config/cdemu-daemon"
It will still lock up that terminal window, but you can then seem to use cdemu. (If you Ctrl+C the terminal window it will close the daemon as well.)
I have not tested mounting anything, just the program can view device status.
For gCDEmu, you need to right-click the tray icon & quit, then start it back up from your menu and then it will see the devices properly.
There's a thread on the MX Linux forums about cdemu and I mentioned the above on it. You can find it here.