KDE4 Control Center confusing

Duncan 1i5t5.duncan at cox.net
Fri Oct 30 18:11:33 GMT 2009


genericmaillists posted on Thu, 29 Oct 2009 22:02:49 -0400 as excerpted:

genericmaillists posted on Thu, 29 Oct 2009 22:02:49 -0400 as excerpted:

genericmaillists posted on Thu, 29 Oct 2009 22:02:49 -0400 as excerpted:

> The control center in KDE4 is confusing and limited compared to
> KDE3.5.<br><br>Setting up device PNP actions was relatively straight
> forward and easy to figure out in KDE3.5 but that does not seem to be so
> in KDE4.<br><br> When I put a movie DVD in the CD/DVD-ROM drive I get
> five available actions. One of those actions is Open with File
> Manager.<br>When I put a music CD in the CD/DVD-ROM drive I get three
> available actions. The Open with File Manager or Play with Amarok is not
> in the list to choose.<br> <br>Looking in the control center under
> device actions left me stumped trying to figure out how to change that
> so I can choose Open with File Manager.<br><br>Clicking on Help did not
> make it clear either.<br><br>Is there any documentation available that
> does explain this so a person new (not new to KDE or Linux) to the KDE4
> environment can learn how to do this?<br>

Please turn off the HTML when posting to lists.  Some readers find it
annoying, as their client may not handle HTML, or if it does, they may
have that feature off for security or other reasons.

As for your question... I took a look at it here, running kde 4.3.2 (you
don't mention what particular kde4 you're running, unfortunately).

Kde4 is obviously rather more integrated with hal, and policykit if you
(or your distribution) enabled that at installation.  As such, it's setup
to deal with things using the information they provide, such as various
device properties.  The logic is boolean (that is, true/false, on/off, no
in-betweens).  A condition is either true or false, and groups of
conditions can be combined with a logical OR (any one must match) or a
logical AND (all must match) to fill a condition at the next higher level.
 If the top-level condition (which is generally a logical ALL or OR of
lower level conditions) matches when a device becomes available, that
action is shown as one of the ones available to choose from.

There's also a place to fill in the command that the action triggers when
chosen.

You want to be able to open a music (presumably CDA, CD Audio) disk using
the file manager.

First, understand that a music disk isn't really composed of files, per
se.  It's one long data stream, with the data track a spiral much like
that of an old vinyl record, except in digital rather than analog. There's
timestamp information that enables a CD-player to skip to a particular
audio track, but that's just a portion of the data stream, not really
individual files, as the concept is normally understood in computer terms.
 What you used to see when opening the disk in kde3's konqueror was a
"virtual" filesystem, created by by KDE's cda ioslave, making it appear
that there were actual files on the disk that could be copied elsewhere,
even tho they didn't really exist as such, and what kde was doing thru the
ioslave was actually converting the data into the desired format
on-the-fly.  The cda format is very close to "raw", in that it's just that
track streamed off the disk.  That's what many other systems such as MS
Windows normally expose as well.  But there's not a real filesystem on the
CDA disk, and it can't be mounted as such -- try it, mount gives an error.
 The additional formats that were viewable, however, were converted from
cda format to mp3 or whatever, on the fly. That's probably why it's not
listed to be opened using the file manager by default, now, because it's
not really a filesystem to be browsed, in the same way that a data CD or a
data session on a mixed-mode CD would be.

A DVD, unlike an audio format CD (aka CDA), uses the UDF filesystem, with
2K data-blocks according to the spec, corresponding rather closely to the
1/2k sector size and usual 2-8k block sizes of various other filesystems.
Like the ISO9660 filesystem on a data-CD, but UNLIKE the filesystemless
CDA format, this is a real filesystem and can be browsed as such, so it
makes sense for the choice to browse the filesystem to be listed as one of
the available options, and it is, by default.

Do note that if you have a (still alpha I believe, but reasonably
functional tho without a help manual to browse, version 1.68.0_alpha3
installed here) kde4 version of k3b installed, you *WILL* have a couple
additional actions available, as supplied by k3b.  Here, in addition to
the ones you may have, I have:

* Extract Digital Audio with K3b

* Copy with K3b

The first would do the conversion that kde3's cda ioslave used to do on-
the-fly, ripping to your choice of ogg-vorbis, wave, flac, or mp3, based
on the encoders you have installed for k3b to use and your choice in the
ripping dialog.  The second simply copies aka clones the CD to a second
one, optionally keeping the iso image on the computer's normal filesystem
to burn additional copies off of.

Of course, if you wanted to try it, you can edit the Open with File
Manager option, which looks like this, here (* indicates nesting level)...

--------------

Any of the contained conditions must match

* All of the contained conditions must match

* * Any of the contained conditions must match

* * * The devices property StorageVolume.usage must equal 'FileSystem'

* * * The devices property StorageVolume.usage must equal 'Encrypted'

* * The devices property StorageVolume.ignored must equal false

* All of the contained conditions must match

* * The device must be of the type StorageAccess

* * The devices property StorageDrive.driveType must equal 'Floppy'

--------------

So, taking it backward.  from the bottom...

1) The bottom two conditions are children of the third from the bottom,
which says both must match (a logical AND).  The bottom two in simple
terms just require that the device be floppy drive.  If it's a floppy,
therefore, both match, and their parent is true as well.  Since /its/
parent is the top-level logical OR (any must match), if it's a floppy, the
conditions match all the way up the tree and action is shown.

But we're talking about a CD here, not a floppy, so that doesn't apply.

2) The other nested set of conditions is a bit more complicated.  Still
from the bottom...

2a) The device can't be set to ignored in hal's config.  Simple enough. It
should be safe to assume that's not the case or the other choices likely
wouldn't appear either.

2b) The other peer condition is a compound OR (any must match), which
basically requires that the device usage must be either filesystem or
encrypted. If either of those are true, the compound OR matches.

2c) So, now we're talking about a (1) non-floppy that (2) isn't ignored
and (3) is either encrypted or a filesystem.  If that's the case, then
this branch of the logic tree is true, and the whole logic tree is
therefore true since the top-level parent is a logical OR (any true
children make it true as well).

It should be obvious what the problem is.  Our CDA doesn't have a valid
filesystem, and it's not encrypted either, so it's not filling that
condition and the action doesn't appear.

If you wish, you should now have enough information to add a new action
with what you want.  (I'd suggest not messing with the existing actions,
just in case.  It's a lot easier to remove an added action than it might
be to fix a screwed up edited action.)  Find one, say Play with KsCD, that
looks like what you want, and make the new one look like it, except change
the command and the icon, of course.  Do note that changes don't seem to
actually take effect in the device notifier until you restart KDE.  (It
should be possible to terminate and restart just one component... if I
knew which one... Maybe just plasma-desktop?  I didn't try it.)

But I tried the filemanager thing with a CDA just to see what it would do,
and while after restarting kde the action did show up, it didn't do
anything.

But you could probably setup a play with Amarok that would likely work
better...  I decided amarok was going some other way than what I was
interested in and don't have it installed anymore, so I can't test that,
but I did test creating an action with the same conditions as the KsCD
one, but using a different command, and that worked fine.  (Incidentally, 
it appears existing actions can be edited and the edits are picked up 
immediately.  Deleted actions seem to be deleted immediately as well.  
It's only adding actions that seemed to require the kde restart to be 
picked up, for whatever reason.)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list