LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-26-2017, 12:45 PM   #1
PROBLEMCHYLD
Member
 
Registered: Apr 2015
Posts: 395

Rep: Reputation: 85
Copy Disc Right click command


I would like to add this command
Code:
dd if=/dev/sr0 of=/tmp/image.iso
to the right-click in the picture below. How do I accomplish this?

Is it possible to use wildcards/flags etc.... in case one has multiple drives?
I'm using xfburn, and it lacks these feature. Please don't suggest another app/program. I'm content with my decision. I just want to add it to right-click context menu.

Last edited by PROBLEMCHYLD; 07-29-2017 at 08:45 PM.
 
Old 02-26-2017, 01:14 PM   #2
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Wellington, New Zealand
Distribution: Slackware, Fedora
Posts: 1,015

Rep: Reputation: 663Reputation: 663Reputation: 663Reputation: 663Reputation: 663Reputation: 663
I'm not familiar with the way XFCE menus work, but here's how I'd do it. It's arguably not the best way, but it's a way to accomplish it, and it's a way that will work in any file manager rather than just one desktop.

1. Create a shell script for the `dd` command. Use zenity to alert you when the job is done so you know when it's safe to eject the disc.

Code:
#!/bin/sh
# dd-desktop.sh

dd if=/dev/sr0 of=/tmp/image-`date +%H%M%S`.img bs=2M && zenity --info --text "Imaging complete." || zenity --error
2. Place the shell script in /usr/local/bin and make executable:

Code:
# mv dd-desktop.sh /usr/local/bin
# chmod +x /usr/local/bin/dd-desktop.sh
2. Create a .desktop file pointing to your shell script:

Code:
[Desktop Entry]
Type=Application
Exec=/usr/local/bin/dd-desktop.sh
Icon=xfburn
GenericName=Disk Imaging
MimeType=application/x-k3b;application/x-iso;application/x-cd-image;application/x-cue;x-content/blank-cd;x-content/blank-dvd;x-content/blank-bd;x-content/blank-hddvd;
3. Place the .desktop file in /usr/share/applications

4. Now when you click a disc, in the "Applications" submenu, you'll be able to select your custom dd "application" to kick off your dd command.

It's not exactly what you're looking for, and there may be better answers that come through later from other users, but that's my hack. If nothing else, maybe it will give you some better idea.
 
4 members found this post helpful.
Old 03-01-2017, 12:24 AM   #3
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.2 Slackware 14.2, Slackware{32,64}-current
Posts: 781
Blog Entries: 3

Rep: Reputation: 272Reputation: 272Reputation: 272
PROBLEMCHYLD,
what you can try are Thunar custom actions: http://docs.xfce.org/xfce/thunar/custom-actions.
I've done this ages ago from in Xfce, at least from within Thunar. Don't recall how to have it trigger on desktop icon.

(Although, you said not to, I must mention that Slackware ships with K3B which is very easy to use and can rip CDs and DVDs easily.)
 
1 members found this post helpful.
Old 03-03-2017, 08:18 AM   #4
PROBLEMCHYLD
Member
 
Registered: Apr 2015
Posts: 395

Original Poster
Rep: Reputation: 85
Quote:
Originally Posted by notKlaatu View Post
I'm not familiar with the way XFCE menus work, but here's how I'd do it. It's arguably not the best way, but it's a way to accomplish it, and it's a way that will work in any file manager rather than just one desktop.

1. Create a shell script for the `dd` command. Use zenity to alert you when the job is done so you know when it's safe to eject the disc.

Code:
#!/bin/sh
# dd-desktop.sh

dd if=/dev/sr0 of=/tmp/image-`date +%H%M%S`.img bs=2M && zenity --info --text "Imaging complete." || zenity --error
2. Place the shell script in /usr/local/bin and make executable:

Code:
# mv dd-desktop.sh /usr/local/bin
# chmod +x /usr/local/bin/dd-desktop.sh
2. Create a .desktop file pointing to your shell script:

Code:
[Desktop Entry]
Type=Application
Exec=/usr/local/bin/dd-desktop.sh
Icon=xfburn
GenericName=Disk Imaging
MimeType=application/x-k3b;application/x-iso;application/x-cd-image;application/x-cue;x-content/blank-cd;x-content/blank-dvd;x-content/blank-bd;x-content/blank-hddvd;
3. Place the .desktop file in /usr/share/applications

4. Now when you click a disc, in the "Applications" submenu, you'll be able to select your custom dd "application" to kick off your dd command.

It's not exactly what you're looking for, and there may be better answers that come through later from other users, but that's my hack. If nothing else, maybe it will give you some better idea.
This works great. Thank you very much, really appreciate it.
 
Old 06-17-2017, 10:59 AM   #5
PROBLEMCHYLD
Member
 
Registered: Apr 2015
Posts: 395

Original Poster
Rep: Reputation: 85
I have a more robust solution and loving it. I'm using AIR - Automated Image and Restore. Its a wonderful tool.

Last edited by PROBLEMCHYLD; 07-29-2017 at 08:45 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Will dd command make an exact copy (clone) of a disc pafos Linux - Newbie 15 03-29-2008 03:59 AM
Preventing disc copy majid_f Linux - Security 1 06-14-2007 02:26 AM
Disc Copy ravi Linux - General 3 05-23-2007 05:55 PM
right click has no copy command murshed Linux - General 4 12-25-2002 10:31 PM
Disc clone/copy szak Linux - Newbie 1 01-21-2002 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration