Udev : no "change" action for cd/dvd (optical) - helping tool

i was writing udev rules for usb storage auto-mount and umount. it works great. no other tools than udev is needed.
BUT when it comes to optical drives, udev isn't that great.
on 2 out of my 3 optical drives udev does not perform any "change" action
so, there is no action at all when changing cd/dvd media and watching:
$ udevadm monitor
it seems that either udev or the optical drive is "asleep", not sending media change info
i found a solution.
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <linux/cdrom.h>
int
main(int argc, char *argv[])
if (argc < 2) {
printf("USAGE: %s DEVICE\n", argv[0]);
return 1;
int h;
for (;;) {
h = open(argv[1], O_RDONLY | O_NONBLOCK);
if (h < 0) {
perror("open");
return 1;
close(h);
sleep(1);
$ cdromkeepawake /dev/sr0
this tool opens and closes a handle to the optical drive every second.
it keeps the drive "awake" (i really don't know why this works at all)
with this tool running in the background udev "catches" all changes and sends "change" action like it should.
auto-mount and umount for optical drives using only udev rules is possible now.
i want to hear if this "solves" your udev-optical-drive-problem also?
it would be great if someone could tell the udev developers about that. their site on kernel.org isn't up...

Some new facts about my problem.
I tried this, as wine application was asking for a /dev/sg0 file which doesn't exist anymore:
ln -s /dev/sr0 /dev/sg0
chown root:disk /dev/sg0
Quite ugly, but if it works...
But it didn't. The new error message is:
err:aspi:SCSI_OpenDevice Failed to open device /dev/sg0: Système de fichiers accessible en lecture seulement
The french part means that the filesystem is accessible only in reading. The wine application is EAC (CD extractor to FLAC files); it does'nt write on disk, but I guess it needs to have more rights on /dev/sr0. I don't want to make more crazy things like changing rights on /dev/sr0 or starting a wine application on root.
Would anyone have an idea?

Similar Messages

  • After downloading IOS 8.0.2 on my iPhone 5, my email messages are not automatically coming through.  I have to open my mailbox and wait for messages to download.  Do I need to reset or change settings for mail?  Please help.

    After downloading IOS 8.0.2 on my iPhone 5, my email messages are not coming through automatically. Before, my email messages would come through automatically and my iPhone would alert me each time an emial message was recevied.   I now have to open my mail in-box and wait for my email messages to download.  Do I need to reset or change my mail settings?  This issue is delaying my abiliy to receive and respond to email messages in a timely manner.
    Please Help.
    Jesse

    Hi Chris.  Thanks, for the suggestions re: my email issues.  They were helpful and yes I did check all items you referenced.  I even contacted Apple support and spent about 40 minutes on phone checking all settings.  However, after all these efforts, my mail and calendar issues were not resolved.  Apple Support finally recommended deleting the mail account and then reloading it - and it worked!  I am now receiving my emails and calendar appts. in real time again.
    Just wanted to share this in case anyone elest has a similar problem with mail/calendar after downloaing i.O.S. 8.1 onto iPhone 5.
    Thanks, again.
    Jesse

  • Trying to change computers for my ipod please help!!!!!

    my question is this. I bought a new notebook ,and I downloaded the itunes software. I can not access any of my old play lists that were on my other computer. How can I get those on this computer. Any help would really be appreciated. Thank you in advance..

    there is a manual method of accessing the iPod's hard drive and copying songs back to iTunes on Windows posted in this thread: MacMuse - iPod to iTunes
    If you prefer something more automated then there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod, this is just a selection. Have a look at the web pages and documentation for these, they are generally quite straightforward. You can read reviews of some of them here: Wired News - Rescue Your Stranded Tunes
    YamiPod Mac and Windows Versions
    iGadget Windows Only
    iPodCopy Mac and Windows Versions
    iPod Access Mac and Windows Versions
    PodUtil Mac and Windows Versions
    iPodCopy Mac and Windows Versions
    PodPlayer Windows Only
    CopyPod Windows Only
    The transfer of purchased content to authorised computers has been introduced with iTunes 7, look under under File>"Transfer Purchases from iPod". A paragraph on it has been added to this article: How to use your iPod to move your music to a new computer
    If your iPod is set to update automatically take care when connecting to your new computer and an empty iTunes. You will get a message that your iPod is linked to a different library and asking if you want to link to this one and replace all your songs etc, press "Cancel". Pressing "Erase and Sync" will irretrievably remove all songs from your iPod. Your iPod should appear in the iTunes source list from where you can change the update setting to manual and use your iPod without the risk of accidentally erasing it. Check the "manually manage music and videos" box in Summary then press the Apply button. Don't uncheck Sync Music it will be unchecked by default when you choose the manual setting: Managing content manually on iPod
    Whichever of these retrieval methods you choose, keep your iPod in manual mode until you have reloaded your iTunes and you are happy with your playlists etc then it will be safe to return it auto-sync again.

  • Create change lists for HDCAM project without Cinema Tools?

    Hi
    We have an HD project, shot on video, and are getting to final stages of mixing. Is there way to set a version, and then make changes and generate a change list? Needless to say, we haven't been using Cinema Tools (and the Export Change List process asks us to select a CT database). Is this only possible for film projects?
    Thanks!
    Matt

    Actually, I figured it out.
    1) Open Cinema Tools and create a new, blank database. Remember its name and where you saved it.
    2) Open your original sequence in FCP. Go to FIle - Export - Cinema Tools Film Lists. If it's a video project, you can ignore the film-specific fields (footage length, key numbers and the like), but make sure that "Save a Cinema Tools program file" is ticked. In the columns on the right, I have "Time", "Source Time" and "Clip name" added. When prompted, locate your database file.
    3) Export the file.
    4) Now, open the changed sequence in FCP. Go to File - Export - Cinema Tools Change List. Locate the Cinema Tools program file you saved earlier.
    You can select "Combine deletions" if you don't want to see separate edits across a multi-clip deletion. (ie, trim tail, delete clip, delete clip, trim head).
    The first few pages will probably be most useful for video projects, since they use timecodes; the other sections of the report seem to be based on key codes.
    Matt

  • How to implement Change pointers for Purchase order - ME22N - Custom Fields

    Hi Experts,
    Can you please tell me how to implement - Change Pointer for Custom fields in IDOC.
    I am working on IDOC - For purchase order - acknowledgements - in custom screen/tab in ME22N.
    Everything is working fine according to my requirement.
    All i need to know is the process of - Creating/Change - Change pointers for Custom fields.
    1.How to implement change pointers for custom fields.
    2.Can we maintain - Change Document - for custom fields at data element level?
    P.S. - I have browsed many previous - forums before posting a new discussion.
    please share your inputs...
    explaining how to create/implement - change pointers for custom fields will help me .
    Regards,
    Karthik Rali.

    Hi,
    To maintain Change Document for custom field:
    1. Check if "Change document" checkbox is set in data element.
    2. Find Change Document Object for transaction.
       You can use SQL trace - ST05.
       Look there for line with table CDHDR and statement insert values
       (for example for transaction KA02 Change Document Object is KSTAR)
    3. Regenerate update program for this Change Document Object in transaction SCDO
    Change documents for z-fields schould be generated.
    I am not sure about change pointers but they are configured somehow in BD61 and BD50.

  • What is the best and reasonably priced external cd/dvd optical drive for an Imac 21.5 inches from late 2009?

    What is the best and reasonably priced external cd/dvd optical drive for an Imac 21.5 inches from late 2009?

    A lot of people have a Mac where the superdrive has been taken out to be replaced with a harddisk. Try to find a friend who has done that, give him a beer and take the superdrive, then buy a superdrive container from OWC or another for  afew dollars and put it in there. This slimdrive container has a USB connector. There you go.

  • Changing / swopping my slot loading CD-RW for a DVD/CD-RW combi drive

    Can anyone explain to me how I can change my slot loading CD-RW for a DVD/CD-RW Combi drive??
    I know it's something to do with the IDE cable but if someone could give me a idiot's walkthru guide I would apreciate it.
    x

    You're better off posting this in the iMac G3 forum. This is the iMac Core Duo (Intel) forum. You might get lucky and find and answer here, but you'll likely find one much quicker in the proper forum. Best of luck.

  • I can not change the region of DVD for region 4 (Brazil)

    I can not change the region of DVD for region 4 (Brazil) what do I do? Help me. The drive is a MAT**bleep**A BD-CMB UJ141ES notebook and is a satellite Toshiba M645.

    You might try AnyDVD. It's not a free solution, but might provide you a way around the region restricions.
    There are other software solutions, you might start by reading or searching at the doom9.org forums.

  • How to change application action for all Firefox users?

    Hi,
    Is there any way I can change application action for all FF users. I am using Firefox admin 0.5.9.3 and deploy FF 3.6 through GP.
    Thanks

    You can change the system colors based on the system you are logging on to.  We have many users here doing that. (Red for prod, Green for Dev, etc)  You cannot use the Sap signature Design theme as it does not allow color changing.  I explained this in another post and how to change it.
    Re: Set Color for several system with sap gui 7.20
    To answer your question on how to change this for ALL users... That I cannot answer as our user base differs and they change it as they wish.  Hope this helps.
    Regards,
    Zecher

  • How do you change the the region for your dvd player

    I purchased a macbook pro in the USA and I am now trying to watch an American DVD on its in-built player and it is telling me that the DVD does not match the DVD region and that the DVD region can not be changed??

    See DVD Player: About DVD-Video regions

  • DVD optical drive no longer works with Windows under bootcamp or parallels

    For some strange reason, the DVD optical drive- Optiarc 5680 on my 27" iMac, no longer works anymore with Windows under Parallels or Bootcamp. It used to work perfectly fine before, but now it just shows up with a yellow exclamation mark under Device Manager and Code 39 "Windows cannot load the device driver..."
    The DVD drive continues to still work fine with OSX. But it won't work anymore under Windows via Parallels or bootcamp, despite trying to uninstall the optical device drivers, update, reinstall, etc. Anybody else experiencing this or have any ideas?

    Finally found the solution for anybody else who runs into this problem. It was solved by doing a registry mod in Windows from this site:
    http://aumha.org/win5/a/xpcd.php#problems
    described in “My CD drives have vanished (from Explorer, Device Manager, etc.)”
    After applying the registry changes the DVD optical drive worked instantly again with Windows....sigh...guess I can't blame the Mac on this one.

  • USB DVD Optical Drives

    Dear Forum:
    (This is my first submission, so please forgive me if I don't do it correctly.)
    A few months ago, I purchased a HP ENVY 23-k110 Desktop.  I did not know at the time of purchase that it did not have a DVD Optical Drive, so I purchased a USB External DVD Combo Drive Writer and it did not work - it just spun around for a few seconds while the green light flashed a few times.  Nothing happened on the screen.  I tried and re-tried to get it to work without results.
    Thinking the drive was defective, I returned it and bought another combo drive of a different brand and, to my disappointment, I could not get this to unit to work either.  Again, nothing happened on the screen.  By now, I figured that either I was doing something wrong or maybe there was something wrong with my computer.  Out of frustration, I decided to get yet another, more expensive unit.  However, after following the instructions for this new, third combo drive, I could still not get it to work and I was becoming angry!  As was the case with the previous tries, nothing appeared on the screen.
    If anyone has ideas or suggestions for me to get this USB External Combo Drive to function, I will be grateful!  Thank you for your time and help!  ~ Max

    Is the computer recognizing other USB devices through those ports?
    If not, try resetting your USB controllers.
    (Instructions from the Microsoft Support Forum) 
    To disable and re-enable the USB controllers, follow these steps:
    Click Start, and then click Run.
    Note If you are running Windows Vista, click Start, and then use the Start Search box.
    Type devmgmt.msc, and then click OK. Device Manager opens.
    Expand Universal Serial Bus controllers.
    Note You might have to scroll down the list to find this item.
    Right-click the first USB controller under Universal Serial Bus controllers, and then click Uninstall to remove it.
    Repeat step 4 for each USB controller that is listed under Universal Serial Bus controllers.
    Restart the computer. After the computer starts, Windows will automatically scan for hardware changes and reinstall all the USB controllers that you uninstalled.
    Check the USB device to see whether it is working.
    I work on behalf of HP (But this isn't my job)
    Mark my post as “Accept as Solution" if you feel my post solved your issue, so that others with the same question can find the answer.
    Please give me Kudos if I wrote something that helped you.

  • Converting 2 large .movs for quality DVD play

    I need specific advice for converting a 3.6 GB (created from Final Cut Pro) .mov
    and a 1.2 GB .mov (created from AVID) to a somewhat smaller file that contains good quality and can be viewed from most consumer computers.
    Because the .mov files are so high quality (footage captured from HD cameras) playing the files alone on quicktime slows down even on a fast computer. when i drag it to IDVD or dvd studio pro, it downgrades the quality, i do not understand how to change the preset.
    how should i go about converting these monster files? should i use compression?
    please e-mail me at [email protected] i can pay pal you 10 bucks if you're willing to give me specific instructions 1 on 1. THANK YOU SO FRIGGIN MUCH!!!!!!!!!!!!!!!!!!!!

    when i drag it to IDVD or dvd studio pro, it downgrades the quality, i do not understand how to change the preset
    Since DVD video is a standard definition format, you should naturally expect some degradation in quality when starting with a high definition source. That's the nature of the beast.
    In DVD-SP, you could make an HD DVD, but that format is essentially dead since Toshiba lost the format war with Sony's Blu-ray. Only later model Macs and a couple of (now obsolete) Toshiba HD DVD player will play HD DVD formatted discs.
    Your other option for optical disc delivery is to burn a Blu-ray disc. You can do that in a limited fashion using FCP or Compressor ... or use Toast 10 Pro or Adobe Encore to author and burn the BD. Of course, you will also need a compatible Blu-ray burner.
    -DH

  • Firmware upgrade for Matshita DVD-R UJ-845E to burn dual layer DVD?

    Dear All
    I have a PowerBookG4 with a Matshita DVD-R UJ-845E which it seems apple has disabled from burning dual layer DVD. I've read around that there are firware upgrades that can enable actions again. I can't find any for Matshita DVD-R UJ-845E, though. Any ideas?
    Thank you!
    Angie
    PowerBookG4   Mac OS X (10.4.8)  

    angie1976 you have me directly.
    As stated in previous posts there have been several issues with the Matshita Optical drives that Apple has installed in there computers. Over time the problem has been discussed and it would appear that there are several things that come into play here.
    Apple has made it so that many of the drives they intall are in fact not capable of there full potential.
    It in fact boils down to an issue of Copywrite Infringment. Apple doesn't want to put itself in a position to be open to Lawsuits from the Motion Picture Industry.
    Many of the drives that do not work up to there full potential have FIRMWARE updates that are offered by the manufacture to remedy this problem and some do not.
    It has also been found that the casual user that burns DVD's isn't aware of the huige difference in the Format's available for DVD Burning. and the many limitations of these different drives as far as Media and Speed of Media is concerned. Many of the DL burners that were installed will not burn DL. Apple has had such a huge amount of dissatisfied customers that many that will take the time and if they still have AppleCare these drives will be replaced free of charge.
    Here are a collection of links that will help you to understand the problem as it exists.
    I will also say that upwards of 85% of the problems user expieriance is with POOR QUALITY MEDIA.
    http://www.digitalfaq.com/media/dvdmedia.htm
    http://www.videohelp.com/dvd
    I also noticed that some others have chimed in as to the fact that Media was not the issue. This is not entirely true.
    Here is another post that I answered that will also cover this subject that may help you understand the problem a little better.
    Let me see if I can shed some light on this issue, for you.
    Maybe some others as well can.
    There are several Applications that are standard programs that come with OSX.
    Of these, several have the ability to burn a project.
    iTunes....iMovie.....Disk Utility.
    Each of the above mentioned applications were developed for a specific purpose. However, they are capable of doing more than the original developers intended.
    The problem in my eyes is the lack of information for a new user to Mac.
    In what one would consider the perfect world, you simply choose a project, drag it in to one or more of the applications mentioned above and simply click burn and you are finished.
    This is not always the case.
    Often users are left with the issue of no clear cut direction on how to use these different burning softwares, and the ability to have a clear cut step by step user interface.
    All of the furnished OSX burning software is in fact usable and works well.
    The problem is HOW TO USE THEM.
    The more experienced users find this either to be a non issue or will take the time to work with these different applications until they figure out how to use them.
    There are of course different Advertisements and FAQ's that cover these to some degree that leave users more confused than when they started.
    One of the major issues that accompany this problem is this.
    Not all Burners that Apple uses in there machines are the same.
    Not all Burners will accept all the different Media's that are available on the market.
    Thus leaving many users confused. Not having a clear cut understanding of what the difference is between these different Media's and there use.
    http://www.videohelp.com/dvd.htm
    The above link offers an overview of this subject.
    Apple has found itself in a delima with the Motion Picture Industry, as well as The Music Industry over the issue of offering there users with the capability of copying Copyrighted material. Thus leaving them open for Law Suits.
    There was an in-depth article in one of the recent issues of Macworld Magazine, that went in-depth covering this issue.
    It is almost impossible to cover all aspects of this issue on these forums.
    There are of course different softwares available that make the burning experience much easier and user friendly.
    Roxio is one of the industry leaders in the development of Mac compatible Burning Software. They offer 2 of the industry leaders in this area.
    Toast-7 and Popcorn.
    This solves only one portion of the problem. Both of these software offering give the user the ability to copy about anything.
    However, there is so much controversy over the issue of Movie and Music copying, the manufactures of the Computers, and the Burners try to limit the users ability to copy these, and thus be clear of any Legal Issue.
    Here again rises the problem of computer users being mad because the industry has placed limitations on there ability to use there product in a fast easy to use method.
    Again there are work around to all of these issues.
    The problem then becomes who out there is willing to tell us what is the easiest most trouble free method of using these computers, burners, software,and media.
    The burner manufactures offer there burners.
    To get them to work to there full potential the users then must search out the 3rd party Firmware updates that will enable them to work properly. This is not an issue with all burners but quite a few.
    Most readers on these forums have read about the MEDIA compatibility and poor quality issues these are covered in a prior link.
    To sum this up, the resources are available to do just about anything one wants to do in the copy area.
    Not every copy problem is the same because of all the different elements that come into the equation, Burner, Media, Software, Firmware.
    So if a user has a problem and needs the information and the resources to copy there projects whatever they may be.
    Be through, give as much information as you can.
    Keep it simple, No need for the use of exotic terms that most people don't understand anyway.
    In-depth. Tell all aspects of the issue and what you have what you are using and what you want to accomplish.
    If there is an answer out there.
    Someone will Chime in.
    The users on these forums for the most part are more than willing to share in there knowledge, free of charge.
    One last thing,
    When a user gives you an answer for you problem, for the most part they believe it to be a fact. Sometimes this isn't the case, we have all been guilty of, this is not done with malicious intent. It is done trying to help.
    I personally have been misinformed, or tried a fix, that will work in one instance but not another. So tell all you can about your problem.
    Cheers Don

  • How can I edit an Automator action for Word?

    I'm running Word 2008 on a Macbook Pro, Mac OS 10.5.
    Word comes with a selection of Automator actions, including one to find and replace text in Word. I often want to convert standard numerals to old-style numerals, which are part of the extended glyphs set in fonts I use. Automator will allow me to set up ten find/replace actions (for the numbers 0-9) that successfully replace all the numerals with old-style numerals. But it only does it for the main body of the document, not for the footnotes. I need to be able to do it for all the footnotes.
    I thought I might find a workaround by adding an AppleScript to my workflow, which would shift the focus in Word to the footnotes and rerun the find/replace actions. I mapped the menu item View/Footnotes to the keystroke command-) and inserted this AppleScript into the Automator workflow:
    tell application "Microsoft Word"
    tell application "Microsoft Word" to activate
    tell application "System Events"
    tell process "Microsoft Word"
    keystroke ")" using command down
    end tell
    end tell
    end tell
    But the find/replace actions simply repeat what they'd done before, converting the numerals in the main body but not in the footnotes. I then thought that perhaps I should have an AppleScript to do the find/replace itself, once the footnotes have been selected, so I created the following (command-H accesses the find/replace dialog box in Word 2008):
    tell application "Microsoft Word"
    tell application "Microsoft Word" to activate
    tell application "System Events"
    tell process "Microsoft Word"
    keystroke "H" using command down
    keystroke "1"
    keystroke tab
    keystroke ""
    end tell
    end tell
    end tell
    The character after the fourth keystroke command is the glyph for old-style numeral 1. For some reason Word reinterprets this as the letter a. So using AppleScript I can only replace the numerals 1-9 with the letters a-i.
    I'm pretty hopeless at even this very basic level of programming, but I presume that there's something in the Automator action 'Find and replace in Word' that specifically tells it not to look anywhere but the footnotes. I also presume it's possible to insert a command to tell it to operate on the footnotes (and headers and footers: everywhere!) too.
    Does anyone know a way to edit an Automator action? I'm willing to experiment and fiddle with one until I find a way that works, if nobody knows the exact changes that I'd need to make, but I just don't know how to edit an Automator action in the first place. A bit of googling suggests that I could do it in XCode, and that that is bundled with my Mac, but I don't have it.
    This all used to work when Office used to allow VBA (and I was using a horrible Windoze machine). Maybe someone would prefer just to find a way of creating a solution our of the old code, so here's one part of what I used (to change the number 1):
    For Each aStory In ActiveDocument.StoryRanges
    With aStory.Find
    .ClearFormatting
    With .Replacement
    .ClearFormatting
    End With
    .Execute FindText:="1", ReplaceWith:=ChrW(63281), _
    Format:=True, MatchCase:=True, Replace:=wdReplaceAll
    End With
    Next aStory
    Thanks in advance for any help.

    Thanks to all three contributors for their generous help so far. Mac people are lovely.
    BDAqua's suggestion wouldn't work, I think, because copying footnote text into another application and then back into Word would lose all the associations between footnote references in the body and the footnotes themselves. I wish I could do what Klaus1 says, but Word 2008 won't allow the creation of Macros any more. They've shut off support for their creation. Nice MS. red_menace's suggestion seems very plausible and I'll look into a way of mapping the old style numerals to specific keystrokes. That might do it.
    Reflecting on what you all said, I looked again through Word's help menus and eventually got pointed towards this page of 'help': <http://tinyurl.com/6398l6>. This is completely impenetrable for me, though it does compare a VBA script for Word 2004 to an AppleScript. This encourages me to hope that it should be possible to translate my original VBA script (part of which I included in my first message) into AppleScript, though I don't know how to do it because I don't really understand the language in the first place (the VBA script was put together by someone else).

Maybe you are looking for