Create One Touch open close button for CD-DVD drive Tray - Net Gator

Post Top Ad

Create One Touch open close button for CD-DVD drive Tray

Create One Touch open close button for CD-DVD drive Tray

Share This
I have published a post about opening and closing cd/dvd drive tray with (mouse left click) one click button several months ago. I named that post as open close CD tray by mouse click on ubuntu . One of my readers ask me that s/he can not understand the method. S/he requested me to explain the process detail.

So I am writing the post. I have two optical drive attached on my machine. I will create two buttons to open or close my first CD Drive. I will create buttons on top or side menu on Ubuntu Linux Desktop system.


Open Close One Click Button for CD Drive:
  • a. Right click on panel body. A drop-down or pop-up menu will open.
  • b. Select 'Add to Panel' from the list. A 'Add to Panel' dialogue window will open.
  • "Add to Panel" dropdown menu.
    add launcher panel dialogue window
    Add launcher panel dialogue window 
  • c. Click on "Custom Application Launcher' to create a new launcher.
  • d. Now type description and command one by one as shown on the picture below.
  • I wrote 'Open CD Rom' on Name field.
  • At Command text box I wrote "eject /dev/sr0" to Eject my first optical drive that is CD Drive.
  • At Comment text field I wrote 'Open CD Tray'. Remember you can write anything on 'Name' and 'Comment' box. But must write perfect command on 'Command' field.
  • e. Now click on "Close" button. You will find a new launcher on panel. Click on this button. You primary drive tray will open instantly.
Now you want to close the CD Rom Tray? Here is the method. Full process is same.
  • Right click on Panel.
  • Select 'Add to Panel'.
  • Select "Custom Application Launcher' to create a new launcher.
  • Write anything on 'Name' and 'Comment' Field.
  • But type a little different on 'Command' field. Closing command is quite different from Opening Command.
  • Write "eject -t /dev/sr0" Don't make mistake to give space on both side (front and end) of '-t' syntax there.
I wrote 'sr0' to specify my first drive. I will write 'sr1' for my second drive. If you have more optical drive connected on casing then mention them as 'sr2', 'sr3', 'sr4'.... . Here is the screen-shot of those another launchers for other drive.
Open DVD one click button on Ubuntu linux
Open DVD drive tray one click button on Ubuntu Linux

Look at the image above. All processes are same I just changed drive name.
Close DVD one click button on Ubuntu linux
Close DVD drive tray one click button on Ubuntu Linux

You can change icon on clicking onto the icon (left top side) when you create a launcher. Look at the image below. Two new launcher for opening and closing cd/dvd drive tray has been created on top panel of Ubuntu Linux.
newly created open close cd dvd drive tray button on ubuntu panel
Newly created open close cd dvd drive tray button on Ubuntu Linux top panel

Now you can open and close your systems cd or dvd or blue ray drive tray with a single mouse click. No need to press front-end button manually to get access of drive tray. Put compact disc on drive tray with left hand and press close button to close tray with right hand using mouse. Still you failed to understanding something? Please do not feel hesitation to inform me as a comment.

1 comment:

  1. Good idea. I have do it on LinuxMint 12 Mate desktop too. This is very handy exciting and essential tool. Thanks for share.

    ReplyDelete

Please help me to improve my English. Please Email me or comment below. Thanks...

Post Bottom Ad