Determine DVD+R write capability in Ubuntu

vbimport

#1

Hello,

I’m writing some software to assess the state of optical drives for a hardware recycling program. It’s written in Python and will be running on Ubuntu 9.10.

I’ve found cdrkit to be useful, specifically ‘wodim dev=/dev/sr0 -prcap’ to list the drive’s capabilities, but it doesn’t tell whether or not a drive is DVD+R capable, only DVD-R.

Does anybody know a good way to determine whether a drive can write DVD+R, either with a command line tool, or by examining something in /proc, or similar? This is one of the first things that the program needs to do as we want to recycle drives that are not capable instead of reusing them.

Thanks!


#2

Bump. I still haven’t been able to figure out how to query the drive to determine DVD+R write capability, other than maybe to just try to do it with ‘wodim’ and see if it fails? Any help?


#3

Figures, 5 minutes after I post in frustration, I do just a couple more Google searches before giving up for a while and find something new.

In Ubuntu, at least:

hal-find-by-capability --capability storage.cdrom

to get a UDI

lshal -u [udi]

reveals the drive’s capabilities one by one, including plusr, dvdram, etc. Dunno about lightscribe.

See also http://ubuntuforums.org/showthread.php?t=1240043