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

Set volume name per command line option or dbus call

Tags: None
(comma "," separated)
User avatar
l3u
Registered Member
Posts
38
Karma
0
OS
Hi :-)

Is it possible to set the volume name of a data session per command line option? I know I can start a new data project and add files per command line, but the volume name is automatically set.

Alternatively: (how) can I set the volume name via dbus call?

The background is I wand to write a shell script that automates parts of burning all files in a given directory.
Code: Select all
k3b --data /path/to/dir

is a fine start, but I have to change the volume name manually.

Thanks in advance for all advice!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
While i'm afraid no command line option exists, you can use the following D-Bus call to do this.
Code: Select all
qdbus org.k3b.k3b /projects/0 setVolumeID "Volume Name You Want"


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
l3u
Registered Member
Posts
38
Karma
0
OS
After starting a new data project with
Code: Select all
$ k3b --data /some/data

it does not work:
Code: Select all
$ qdbus org.k3b.k3b /projects/0 setVolumeID "Volume Name You Want"
Cannot find '.setVolumeID' in object /projects/0 at org.k3b.k3b

Seems like /projects does not exist at all:
Code: Select all
$ qdbus org.k3b.k3b
/
/KBookmarkManager
/KBookmarkManager/k3b
/KBookmarkManager/kfilePlaces
/KIO
/KIO/Scheduler
/MainApplication
/k3b
/k3b/MainWindow_1
/k3b/MainWindow_1/actions
/k3b/MainWindow_1/actions/file_open
/k3b/MainWindow_1/actions/file_open_recent
/k3b/MainWindow_1/actions/file_save
/k3b/MainWindow_1/actions/file_save_as
/k3b/MainWindow_1/actions/file_close
/k3b/MainWindow_1/actions/file_quit
/k3b/MainWindow_1/actions/options_show_statusbar
/k3b/MainWindow_1/actions/options_configure
/k3b/MainWindow_1/actions/help_show_tip
/k3b/MainWindow_1/actions/options_configure_keybinding
/k3b/MainWindow_1/actions/options_configure_toolbars
/k3b/MainWindow_1/actions/options_show_menubar
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
That is odd - did you wait for K3b to fully startup and create the new data project? I tested it by creating a data project through the user interface.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
l3u
Registered Member
Posts
38
Karma
0
OS
It doesn't matter if I start a new data session by hand or via the command line editor. The out put of "qdbus org.k3b.k3b" is the same as I posted above. There's no /projects.

If there _should_ be /projects/0, perhaps this is a Gentoo specific problem? Currently, there's only one version of K3B provided by Portage (Gentoo's package manager), it's 2.0.2-r4, where the -r4 stands for patches against the Version 2.0.2. But 2.0.2 seems to be the latest version anyway, isn't it?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Hm, my system appears to have K3b 2.0.80 - could you try building the latest development code for K3b to see if that makes a difference?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
l3u
Registered Member
Posts
38
Karma
0
OS
I'd love to, but where is the source code? http://k3b.org/ lists only 2.0.2, as http://k3b.kde.org/ does … http://websvn.kde.org/tags/k3b/ even stops at 2.0.1 …

[UPDATE]
Okay, I found git://anongit.kde.org/k3b – I think this is something comparable to svn trunk, but I don't know git at all (yet). I checked out the sources and built them without a problem on my box. Running this version, I actually can access /projects/0 as you described, "qdbus org.k3b.k3b /projects/0 setVolumeID 'Volume Name You Want'" does work with this version.

I think Gentoo should update their K3B ebuilds! Thanks for the help!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Not a problem. I can confirm that git://anongit.kde.org/k3b, 'master' branch is the latest development code (ie. comparable to svn trunk).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
l3u
Registered Member
Posts
38
Karma
0
OS
So, is there any "tagged" version for 2.0.80? Where do the other distributions get the source package? I'm about to file a bug in Gentoo's Bugzilla about this.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The version number 2.0.80 suggests that it is development (alpha) software. Unfortunately, i'm not sure of the status of K3b development, so it is possible that a 2.1 release will not be happening soon.


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


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]