Unmount DVD when pressing eject button on drive?

I'm running XFCE 4.8 and wondering if there's a way to have the system unmount a DVD and eject it when I press the physical button on the drive.  I seem to remember this working in 4.6 when Thunar's volume manager was running.  It is particularly annoying when I pop in a video DVD, play it in Totem (which mounts it), and then have to open a Thunar window to eject it.

light0 wrote:Someone wrote a kludge script to fix it
I am not sure the script solves the issue; the command 'eject /dev/sr0', in the script called by the udev rule, doesn't work for me if the device was busy before the eject button was pushed. Because the umount command called by eject will not operates in this case and the mount point stays there.
I think this is a bug in the default udev rule '/usr/lib/udev/rules.d/60-cdrom_id.rules' which ejects the CD/DVD when the button is pressed even when a file system on it is mounted and even if it is busy! This rule should be changed (or the cdrom_id binary) to not act in these cases.
Presently I think the only way to work around this, is to comment out the line:
ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"
To do that:
# cp /usr/lib/udev/rules.d/60-cdrom_id.rules /etc/udev/rules.d
# cd /etc/udev/rules.d
# vim 60-cdrom_id.rules
# diff 60-cdrom_id.rules /usr/lib/udev/rules.d/60-cdrom_id.rules
12c12
< #ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"
> ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"
# udevadm control --reload
The rule in /etc/udev will take precedence over the one in /usr/lib/udev and will not be overwritten by an systemd update.
Edit: In fact this is not the solution either; see next post.
Last edited by berbae (2014-09-26 12:58:28)

Similar Messages

  • My mini ipod appears off and not respond to any commands when pressed the buttons to reset, apple logo appeared and then the apple support site and it shuts down. already tried all the steps, but none worked, and when I plug it into my computer it does no

    My mini ipod appears off and not respond to any commands when pressed the buttons to reset, apple logo appeared and then the apple support site and it shuts down. already tried all the steps, but none worked, and when I plug it into my computer it does not appear in the iTunes bar. what do I do?

    If MacKeeper corrupted the Recovery partition then even I underestimated its potential for damage. Garbage "cleaning" apps will cause misery but I have not found that the Recovery partition to have been affected by using MacKeeper or anything like it. I doubt that it did so, but I have learned not to underestimate the potential for such things to result in system corruption.
    Before concluding your Mac has a hardware failure, try booting OS X Internet Recovery by holding command option r on startup (three fingers). That will force your iMac to bypass the Recovery partition altogether, and convey the ability to create a new one.
    An Internet connection will be required (wired or wireless).
    At the Mac OS X Utilities screen, select Disk Utility. Select your startup volume (usually named "Macintosh HD") and click the Repair Disk button. Describe any errors it reports in red. If Disk Utility reports "The volume Macintosh HD appears to be OK" in green then you can be reasonably (though not completely) assured your hard disk is in good working order.
    Assuming the HD remains usable you can then use Disk Utility to erase it. Reinstall OS X, restore your essential software and other files, and don't reinstall the junk.

  • How to when press the button and can change the value in the table?

    this is my code so far with a table and a button..how can i make it when press the button and the data in table change..
    * SimpleTableDemo.java is a 1.4 application that requires no other files.
    import java.awt.BorderLayout;
    import java.awt.Button;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    public class SimpleTableDemo extends JPanel {
    private boolean DEBUG = false;
    private JPanel button;
    private JButton enter;
    public SimpleTableDemo() {
    super(new BorderLayout());
    //button.setBackground(Color.pink);
    //setForeground(Color.pink);
    String[] columnNames = {"First Name",
    "Last Name",
    "Sport",
    "# of Years",
    "Vegetarian"};
    Object[][] data = {
    {"Mary", "Campione",
    "Snowboarding", new Integer(5), new Boolean(false)},
    {"Alison", "Huml",
    "Rowing", new Integer(3), new Boolean(true)},
    {"Kathy", "Walrath",
    "Knitting", new Integer(2), new Boolean(false)},
    {"Sharon", "Zakhour",
    "Speed reading", new Integer(20), new Boolean(true)},
    {"Philip", "Milne",
    "Pool", new Integer(10), new Boolean(false)}
    final JTable table = new JTable(data, columnNames);
    table.setPreferredScrollableViewportSize(new Dimension(500, 70));
    if (DEBUG) {
    table.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    printDebugData(table);
    //Create the scroll pane and add the table to it.
    JScrollPane scrollPane = new JScrollPane(table);
    enter = new JButton("Press me");
    //Add the scroll pane to this panel.
    buildButton();
    add(scrollPane, BorderLayout.NORTH);
    add(button, BorderLayout.CENTER);
    private void buildButton(){
    button = new JPanel();
    button.add(enter);
    private void printDebugData(JTable table) {
    int numRows = table.getRowCount();
    int numCols = table.getColumnCount();
    javax.swing.table.TableModel model = table.getModel();
    System.out.println("Value of data: ");
    for (int i=0; i < numRows; i++) {
    System.out.print(" row " + i + ":");
    for (int j=0; j < numCols; j++) {
    System.out.print(" " + model.getValueAt(i, j));
    System.out.println();
    System.out.println("--------------------------");
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    private static void createAndShowGUI() {
    //Make sure we have nice window decorations.
    JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    JFrame frame = new JFrame("SimpleTableDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and set up the content pane.
    SimpleTableDemo newContentPane = new SimpleTableDemo();
    newContentPane.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    }

    Cross-post:
    http://forum.java.sun.com/thread.jspa?threadID=676105

  • Malfunctioning printer call to DLBAPRP,DLL FOR DELL PRINTER A940, ERROR 126. This error occurs when pressing properties button. Is there a patch to fix this?

    This error does not occur with any of my other programs employing this printer when pressing properties button. The complete error message I get is as follows:
    '''DELL PRINTER A940 PROPERTIES'''
    Function address 0x0 caused a protection fault (exception code 0xc0000005). The application property sheet page(s) may not function properly.
    |OK|

    Perform the suggestions mentioned in the following articles:
    * [[Firefox prints incorrectly#w_reset-firefox-printer-setting|Reset Firefox Printer Setting]]
    * http://kb.mozillazine.org/Problems_printing_web_pages
    Check and tell if its working.

  • Macbook pro not opening when press power button

    my mac book pro not opening when press power button even battery is full.

    I already tried with the Battery in and without but no luck. I'm sure it's not that kind of problem unfortunally

  • HT4211 My i pad hang on with information of icloud back up with informtion of "this ipad hasn't been backed up in three weeks. backups happen when this pad is plugged in, locked and connected to wifi"  and doesn't close when press ok button. I am not able

    My i pad hang on with information of icloud back up with informtion of "this ipad hasn't been backed up in three weeks. backups happen when this pad is plugged in, locked and connected to wifi"  and doesn't close when press ok button and still hangon. I am not able to switched off also. How to remove popoup note and entering into ipad applications.

    Hold down the sleep and home keys for about 20 seconds or so and see if it reboots.

  • Submiting requests when pressing a button.

    I have a button that when pressed should fire an HTMLDB After Submit process and just after the process has finished, it should trigger a javaScript function to call a pop-up page.I've tried to do that in three different ways:
    1)Using the button optional URL redirect, and as the URL target I send first the request to run the After submit process and then the request to open the pop-up window.
    The problem with that solution is that the pop-up window opens before the
    process is completed, which is an inconvinience for me.
    2)Running the After submit process when pressing the button and running an after processing braching to call the javaScript function. It didn't work as HTMLDB redirect the application to an error page saying that no branch is specified...
    3)Inside the After submit process after a call to a procedure that resolves the logic of the process I've tried to call the pop-up using webtoolkit's tag htp.p as follows:
    htp.init;
    htp.p('<script language = "javascript">');
    htp.p('callMyPopup2("480",'+l_aux+');');
    htp.p('alert("entre");');
    htp.p('</script>');
    But it didn't work neither.
    The HTMLDB version I'm using is 1.5.0.00.33. Is there a way to accomplish that when pressing a button a process is ran and just after its execution is finished call a javascript function that opens a pop-up page?
    Thanks in advance.
    Best Regards.
    Larissa.

    Vikas,
    The question is interesting. I remember trying something similar without success and would be interested in an answer. I could imagine the following situation:
    1. I start a process that runs a procedure which fills in a table with values
    2. after the process is completed a pop-up window opens and runs a report on that table...
    This could be practical since a user that started the procedure doesn't have to wait for it to complete in order to click another button to see the result. This is just one possible example.
    Denes Kubicek

  • Mac Pro Crashes when I press Eject button!?

    I've recently upgraded from Leopard to Snow Leopard. This has brought me more problems than solutions! Chief among them is that the Eject button on my keyboard sometimes causes my Mac to quit all applications (including the Finder) thereby dumping all unsaved files. This problem is not exclusively caused by the eject button as it also happened once when I tried to Force Quit Safari which had froze. The "crash" does not appear to be a full crash since the Mac doesn't entirely restart but the screen goes blue, all menus disappear, then after a few seconds the Finder relaunches but all other programmes have quit and all unsaved changes lost. This is clearly unsatisfactory and frankly an intolerable risk given the work I can lose if this happens. I'm not sure of the cause but suspect it might be linked to the Flash Player in Safari which has been behaving very oddly since upgrading. Safari frequently freezes due to the Flash player going haywire. I've uninstalled and reinstalled the Flash Player several times but it keeps messing up. That may be a separate problem but it's the only lead I have at the moment...
    Can anybody help me restore some stability to my Mac??
    I had none of these issues under Leopard...
    I'm on a Mac Pro Quad Core 2.8 GHz

    Reset Your PRAM to see if it helps.

  • Acrobat 9 (CS4) Freezes when pressing 'Print' button

    Hi all,
    I am having a problem with Acrobat Pro 9.0.0 in that when I go to print (with any setting/printer etc) selected, the dialog freezes after pressing the 'Print' button. Therefore I must force-quit to start Acrobat again.
    I have tried trashing the preferences, removing Acrobat 9 altogether & re-installing and nothing seems to be helping.
    I have also tried all sorts of different PDF files both created by myself as well as random PDF's from elsewhere.
    What also seems to happen is that the blue 'Print' button pulses while waiting to be pressed and then when pressed goes blue and stops pulsing and that is where it stays frozen.
    Please let me know if you need any more information or details of the configuration I am using.
    ps. I have Acrobat Professional 8.1.3 also installed which works fine including printing.
    Regards,
    Ross

    Hi Mike,
    I do have some startup items;
    EyeTV Helper
    AdobeResourcesSynchroni
    I Love Stars
    GrowlHelperApp
    NikePlusUtil
    EEvent Manager
    EPSON Scanner Monitor
    I don't have any haxies on anything.
    I made a new user account and tried to replicate the problem but it seems to work fine when logged in as a different user which leads me to think it is a preference in my current user>library
    Ross

  • How to enable the InputField when press the Button

    My sceanrio is by default the InputField is in disable .when ever i press the button it should enable.

    Here is the sample code for HTMLB :
    <hbj:inputField
        id="InputText"
        jsObjectNeeded="true"
        type="string"
        maxlength="30"
        value="Text" >
    <% String text = myContext.getParamIdForComponent(create_group); %>
    <SCRIPT> var jsText = '<%=text%>'; </SCRIPT>
    </hbj:inputField>
    <hbj:button id="Enable_Button"
           text="Enable"
           tooltip="Enable InputField"
           onClick="onEnableClick"
           onClientClick="enableInputField()"
           width="30px" >
    </hbj:button>
    </hbj:page>
    </hbj:content>
    <script language="javascript">
         function enableInputField()
              var funcName = htmlb_formid+"_getHtmlbElementId";
              func = window[funcName];
              var inputfield = eval(jsText);
                                    inputfield.setEnabled();
    </script>
    Refer to the following links for more info...
    http://help.sap.com/saphelp_nw04/helpdata/en/53/9d0e41a346ef6fe10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/067941a51a1a09e10000000a155106/content.htm
    Regards,
    Rajiv

  • How to suppress the showing up of the menu when press soft buttons...

    I'm writing a game with fullscreen mode. When I press soft buttons in fullscreen mode, the menu shows up. How can i suppress it when i press the soft buttons for my own executions.
    I have tested a game on Nokia 6600.

    U missed understand my mine.
    I want to suppress the system menu when i press soft buttons in fullscreen mode. I want to execute my own codes when i press soft buttons.
    thanks

  • How to invoke plsql block when press a button

    new to htmldb,
    let's say i have a form with some items , after i press a button, i want to invoke a plsql block, how can i do that?
    Cheers,

    I have only played a bit with this. I had a region with search criteria’s and a region based on a procedure. I created a page button on the first region that branched to the same page. When I press the button the page is refreshed and the procedure is re-executed with what ever search criteria’s the user has keyed in. That is as far as I have come :-)

  • Error when pressing the buttons in ALV

    Hi all,
    I have written a report using ALV by using FM REUSE_ALV_GRID_DISPLAY
    layout-coltab_fieldname = 'FARBE'.
    layout-f2code = 'DISPLAY'.
    layout-zebra = 'X'.
    layout-box_fieldname = 'BOX'.
    event_exit-ucomm = '&XP1'.
    event_exit-before = 'X'.
    APPEND event_exit.
    variant-report = repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
              I_INTERFACE_CHECK  = check_flag      
              I_CALLBACK_PROGRAM = repid
              I_STRUCTURE_NAME    = 'ITAB'
              is_layout             = layout
              it_fieldcat           = fieldcat
              it_excluding          = excluding
              it_special_groups     = gruppen[]
              it_sort               = sorttab[]
              it_filter             = filttab[]
              i_save                = 'X'
              is_variant            = variant
              it_events             = events[]
           TABLES
               T_OUTTAB             = ITAB
           EXCEPTIONS
               program_error        = 1
               OTHERS               = 2.
    The ALV grid is shown successfully after executing the program. But when I press the button like 'Print Preview', 'SpreadSheet' which are provided by the ALV. I got the following error:
    Assignment error: Overwriting a protected field.
    What happened?
    Error in ABAP application program.
    The current ABAP program "SAPLSLVC_FULLSCREEN" had to be terminated because one of the statements could not be executed.
    This is probably due to an error in the ABAP program.
    Any one has idea how to solve it? Thanks!

    Gundam,
    I feel the problem is in line in BOLD.
    excluding[] must be an Internal Table.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = check_flag
    I_CALLBACK_PROGRAM = repid
    I_STRUCTURE_NAME = 'ITAB'
    is_layout = layout
    it_fieldcat = fieldcat
    <b>it_excluding = excluding[ ]</b>
    it_special_groups = gruppen[]
    it_sort = sorttab[]
    it_filter = filttab[]
    i_save = 'X'
    is_variant = variant
    it_events = events[]
    TABLES
    T_OUTTAB = ITAB
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    Please have a check and let me know.
    Thanks
    Kam

  • Error in any ServiceImpl when pressing save button

    In our application after pressing the save button we are getting the following error on screen:
    "com.nbd.demeter.model.service.AbonnementenServiceImpl".
    This error can occur in any screen (any ServiceImpl). We do not get this error every time when the save button is pressed, but it happens more and more.
    This problem blocking normal use of the application.
    The first time this happened was after installing a new EAR-file, but untill now we are not able to determine what causes it.
    Anyone got an idea??

    Can you tell us what the OC4J log says? There must be more logging if you got such an error. Perhaps you should try to enable ADF BC logging by setting -Djbo.debugoutput=true as run parameter (tools - properties - Run/Debug - Edit - Launch Settings - Java Options).
    Regards,
    Evert-Jan de Bruin
    JHeadstart Team

  • DoSubmit(Save) when pressing another button

    Hi all,
    I have a Button with request "anfordern" (created as a button displayed among this region's items). The button redirect to another page.
    When the user make changes in data of the page and press "anfordern" without pressing "Save" first, all changes will be lost. Now he want's to "Save" automatically when he presses the button "anfordern".
    I read something about doSubmit, but I don't understand how I can do this in Apex. (Javascript is new for me!)
    Can anybody help me?
    Thanks, Daniela

    Hi Patrick,
    excuse me. I mix up 2 buttons. My Button with Request "anfordern" don't redirect to another page. When I press the button a conditional validation (function returning error text) starts. In the validation I do an insert into another table. There is no other function or process on this button.
    You say "Change your existing Processes so that they also fire for your new request". I think this will help me. But how can I do this?
    I have the generated process "Process Row of AUFTR_AUFTRAG" with type "automatic row processing (DML)". I think this is the process that fires by the request "Save" and should also be fired for my Request "anfordern". In which attribute can I write my request?
    Thanks, Daniela

Maybe you are looking for