- summary: One-button control of cd door --> One-button control for cd door
If you want a single command / a single button control
for your cd-door, apply the patch as following:
patch cdctl.c patch__cdctl__toggle-eject.diff
then "make", or "./configure", "./make" the code anew.
Now you can open or close the cd door with
"cdctl -f" or "cdctl --toggle-eject"
Unfortunately, this feature is not fully functional,
since it is not possible to tell if the door is opened
or closed. Truly, it is only possible to tell if a cd
is inserted or not. So, the command does the trick as
long as you always keep a cd in your drive, or just
flip the cd when it is opened. There is no work around
this flaw since it is a limit of questioning the status
of your cd drive, so stop searching for the "right
thing", or you will only have more whining about it.
If you want to control a drive door which you keep
empty sometimes, you have to make two buttons, one for
eject and one for close, else you will always run into
trouble.