This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Using K3b without a GUI

Tags: None
(comma "," separated)
blang
Registered Member
Posts
5
Karma
0

Using K3b without a GUI

Tue Mar 05, 2013 10:11 pm
HI,
I wish to use K3b exclusively from the command line, without a GUI. Alternatively, with a proper API, I could run it from another program.
Is that possible ? I would appreciate pointers to the right documentation, or to another forum that would be (more?) appropriate.
Actually, at this time moment, I am mostly interested in the copy part of K3b, the one you run with " k3b --copy <device> ". Does it exist as an independent program ?
I did some search on the web, but without success. Possibly I did not use the right keywords.

Thanks for any help.
Bernard
User avatar
donaldc
Registered Member
Posts
8
Karma
0
OS

Re: Using K3b without a GUI

Wed Mar 06, 2013 1:00 am
http://k3b.plainblack.com/dcop

check here. This might help.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using K3b without a GUI

Wed Mar 06, 2013 7:19 am
This will depend on the version of K3b in use - DCOP is no longer used in KDE 4, with D-Bus being used instead.
As such, the interface may differ.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Minio
Registered Member
Posts
177
Karma
1
OS

Re: Using K3b without a GUI

Wed Mar 06, 2013 11:14 am
As far as I know, k3b is GUI for CD burning command line apps (cdrtools/cdrkit and dvd+rw-tools). You can simply use these programs (although prepare for few evenings od documentation reading).


Best regards
Mirosław Zalewski
blang
Registered Member
Posts
5
Karma
0

Re: Using K3b without a GUI

Wed Mar 06, 2013 3:06 pm
Hi
Thanks to all for these answers.
I am using K3b: 2.0.2 with Qt: 4.8.4 on KDE Development Platform: 4.8.5 (4.8.5)
so I guess DCOP is out (I never tried to use it)

I had the impression that K3b was a GUI for other tools, but I do not know which. I am trying to get Iso image of my CDs and DVDs all being ISO 9660. I currently use " k3b --copy <device> " but this still require graphical interaction though I do not have to provide any new information.
It is a real inconvenience in my processing chain.
I was so far unable to determine whether K3b is actually running a command line application, let alone which app.
I am not interested in burning CDs or DVDs as I actually own them. I am interested in saving copies as ISO images on hard disk. K3b is the application that gave me the best results so far ... and I would rather avoid trying to read the K3b code to get my information .

Bernard
User avatar
google01103
Manager
Posts
6668
Karma
25

Re: Using K3b without a GUI

Wed Mar 06, 2013 3:29 pm
k3b -> settings -> configure K3b -> programs, this lists the programs K3b calls and their purpose

actually burning an iso and looking at the processing window should indicate how K3b does the task (iirc) if not there's the last log file ~/.kde[4]/share/apps/k3b/lastlog.log


OpenSuse Leap 42.1 x64, Plasma 5.x

Minio
Registered Member
Posts
177
Karma
1
OS

Re: Using K3b without a GUI

Wed Mar 06, 2013 3:38 pm
blang wrote:I am not interested in burning CDs or DVDs as I actually own them. I am interested in saving copies as ISO images on hard disk.

This is what isodump from cdrtools/cdrkit packages does. You should really give them a try.


Best regards
Mirosław Zalewski
blang
Registered Member
Posts
5
Karma
0

Re: Using K3b without a GUI

Thu Mar 07, 2013 9:09 am
Hi,

Thanks for the further suggestions. Though I am still searching, I did learn a few things.
Apparently isodump is for examining ISO files, not for dumping them from dvd drive onto hard disk. Also, on my flavor of Linux (Mageia 2), it is in the package cdrkit-isotools (isodebug, isodump, isoinfo, isovfy, devdump).
I also looked at k3b -> settings -> configure K3b -> programs, but I could not identify the relevant application.
To make sure, I tested K3b after changing the name of some apps, so that K3b would not find them, but K3b was still able to copy DVDs though the applications were listed as "not found". I thus made sure that none of readcd, cdrdao, cdrecord, wodim is the application I was looking for.
I also looked at the source code of K3b, which is a bit ambitious since I am not a C++ user.
It seems that the code I was looking for is in directory k3b-2.0.2/src/rip/videodvd, and does not exist as a separate application, but I am not sure since my C++ reading is worse than crude. This would seems rather non Unix: building large apps from independent smaller ones is a Unix design principle.
This might explain that I did not get hints from looking at the last log file ~/.kde[4]/share/apps/k3b/lastlog.log
Is that the source of the "debugging information file" proposed by the GUI at the end of a run. It seems to have identical content, but with a slightly more readable presentation ?

Bernard
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using K3b without a GUI

Sat Mar 09, 2013 1:34 am
I've examined the source code and determined that, it uses:
- growisofs is the medium is a DVD or BD disk.
- cdrecord and some custom code if the medium is a CD disk.

The relevant code is in src/misc/k3bmediacopydialog.cpp which in turn uses libk3b/jobs/k3bcdcopyjob.cpp and libk3b/jobs/k3bdvdcopyjob.cpp.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
blang
Registered Member
Posts
5
Karma
0

Re: Using K3b without a GUI

Sat Mar 09, 2013 3:03 pm
>> bcooksley

Thanks a lot for taking the time to look.
However I tried using K3b to copy a DVD on hard disk without growisofs or cdrecord available, and it still works.
So K3b has to be using so other code.
Possibly the code you identified could be intermediate code, that may be using growisofs or cdrecord for some tasks.

Bernard
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using K3b without a GUI

Mon Mar 11, 2013 8:45 am
Were you generating a disk image, or were you copying from one disk directly to another?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
blang
Registered Member
Posts
5
Karma
0

Re: Using K3b without a GUI

Wed Mar 13, 2013 9:23 pm
bcooksley wrote:Were you generating a disk image, or were you copying from one disk directly to another?

I was generating an ISO image on hard disk from a DVD. I was not creating an original image, only a copy of the DVD.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using K3b without a GUI

Thu Mar 14, 2013 8:56 am
That is handled by different code completely in K3b::CloneJob.
It invokes code in "libk3b/jobs/k3breadcdreader.cpp" and "libk3b/projects/k3bcdrecordwriter.cpp" to read and write discs for a clone process respectively.
The first uses the "readcd" command, while the second uses "cdrecord".


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]