Re: [opensuse] How to keep KDE4 from messing with my CD/DVD

On 02/17/2011 02:35 PM, Mark Hounschell wrote:
How does one disable/enable KDE4 from controlling my CD/DVD drives? I
have some scripts that I run that fail all over the place in run-level-5
running KDE4. Something as simple as the following

eject /dev/sr0
eject -t /dev/sr0
mount /dev/sr0

will show no errors but the device will not be mounted when I go to look
at the files. My fstab entry is "/dev/sr0 /mnt iso9660
ro,noauto,user 0 0". If I mount it enough times it eventually mounts.
Sometimes when I "eject /dev/sr0" it even closes before I can get my
media out.

All the problems I'm having are gone if running in run-level-3.

Thanks and Regards

OK, it does the same at run-level-3 also so it's not KDE related I guess.
Here is a simple script that bombs. It seems only in single user mode does
it always work.

All it does is eject the tray, ask you to insert your media into the open
tray, mounts it, does an ls of the mount point, unmounts it, and then
ejects the tray for media removal. I get errors from no files found to
"umount: /mnt: not mounted". Then sometimes it even works as I expect it
to. Why???

umount $DEV
eject $DEV

# make sure /dev/sr0 exists
if ! [ -b /dev/sr0 ]; then
echo "No CD/DVD device at /dev/sr0 found"
exit 1

eject $DEV
echo -n "Insert media into the CD/DVD's open tray then CR. (CR,X):"
read ans
case "$ans"
exit 0
exit 0

# Mount the device
echo "Mounting $DEV"
if ! mount $DEV ; then
echo "Unable to mount CD/DVD on device $DEV"
exit 1
echo "Files found on CD/DVD $DEV "
echo " "
ls /mnt/

exit 0

#sh -x sh.tst
+ '[' -b /dev/sr0 ']'
+ DEV=/dev/sr0
+ eject /dev/sr0
+ echo -n 'Insert media into the CD/DVD'\''s open tray then CR. (CR,X):'
Insert media into the CD/DVD's open tray then CR. (CR,X):+ read ans

+ case "$ans" in
+ echo 'Mounting /dev/sr0'
Mounting /dev/sr0
+ mount /dev/sr0
+ echo 'Files found on CD/DVD /dev/sr0 '
Files found on CD/DVD /dev/sr0
+ echo ' '

+ ls /mnt/
+ cleanup
+ umount /dev/sr0
umount: /mnt: not mounted
+ eject /dev/sr0
+ exit 0

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

Relevant Pages

  • Re: USB Key light on/off state depending on mount
    ... On a windows box, ... linux, the light is simply on whenever the key is plugged in. ... Should linux toggle the light depending on mount state? ... For example, if you think you have to eject /dev/sdc, check before ...
  • Re: mounted cd and tray locking
    ... That is, if I mount through acd, then trough cd, then unmount the cd ... But if mount only through one device then tray is locked. ... should ultimately lead to unmounting media in the device and ejecting ... In these cases "KDE" simply issues eject command and the drive is only ...
  • Re: [SLE] Odd problem with unmounting CD
    ... > Just came from another session of installing SuSE8.2 on a friend's computer ... > demonstrating how to mount, unmount and eject a CDROM using KDE, it failed. ...
  • Re: suse 8.2 kde 3.2 and kdeeject
    ... > suse rpm's i have problems ejecting any cd's and dvd's i put into my ... > i can mount and unmount with no problems but when i try to eject (by ... dcop kdesktop default refreshIcons ...
  • Re: atapicd regression
    ... when inserting a CD, mount /cdrom returns an immediate I/O error, while ... before it would wait for the cd to be read then mount it. ... * the eject cli utilitiy returns 'device busy' in every situation, ... This is a laptop, a Dell Inspiron 8600 from 2003-11-16, Intel ICH4 chipset ...