media:/ shows unnecessary media

Giuseppe Bilotta bilotta78 at hotpop.com
Sun May 29 03:50:54 CDT 2005


On Sat, 28 May 2005 20:51:17 +0000, Rajeev J Sebastian wrote:

> On Saturday 28 May 2005 11:34 am, Giuseppe Bilotta wrote:
>> On Sat, 28 May 2005 05:13:54 +0000, Rajeev J Sebastian wrote:
>>> I have a question:
>>>
>>> Is it only me ? or is anyone else having to mount via console ?
>>>
>>> pmount just isn't working. And there is no bug filed in bugzilla either.
>>> This is wierd, no one is reporting the inability to mount hard disks
>>> wuthin media:/.
> What about the above question ? Are you able to mount via pmount/fstab-sync or 
> not ? Does mounting via media:/ work (for partitions not in the fstab file) ?

I just tried yesterday. Remember, I was the one that posted on the
other thread "media:/ shows unnecessary media" about media not
mounting my harddisk :) So no, it doesn't work. Plus, pmount complains
about hdas not being removable media, so one of the big issues here is
that pmount will *not* work with hard disks. Maybe it will if they are
recognized via the hotplug/udev interface, but I don't know.

>>> Anyway, after waiting for Kari to respond for 2 days, I have made a
>>> simple script to do the renaming of media nodes with the following
>>> features:
>>>
>>> 1) If the partition has a volume label, it sets that as the label in
>>> media:/
>>
>> What happens if two medias have the same volume label?
> Yeah that is a problem :) Obviosly, we shouldn't allow that, but I havent 
> checked. But I also think

Therefore you are ;)

>>> 2) else if the user has already changed the name to something more
>>> appropriate in media:/, it sets that as the label in media :/
>>
>> Is this necessary? :)
> Yep its necessary, otherwise, we might overwrite the label set by the user.

Just skip that partition? :)

>>> 3) else, it constructs a string "<OS> <device><partitionNumber>" where
>>> <OS> is currently, "Linux", "Windows" and ".Linux Swap", the <device> is
>>> A,B,C,D, etc. Volker's suggestion of using "." paid off and swap
>>> partitions are hidden.
>>
>> FWIW, Windows uses the term "Local disk (<drive letter>:)" for
>> unlabeled partitions. Something like "<OS> Local Disk
>> <device><partition number>" might be nice.
> As you said earlier, getting the drive letter is not that simple (since it 
> doesnt progress the same way on different machines). So I thought this was an 
> alternative.
> 
> About names, if you look at the code, you can see that the names can be 
> changed easily. In the attached script, I have changed them to (following 
> your need):
> 
> Device name -> label after rename_hdd.py
> /dev/hda1 (ext3) -> Linux Local Disk (A1)
> /dev/hda2 (swap) -> .Swap Disk (A2)
> /dev/hda3 (fat32) -> Windows Local Disk ( A3)
> 
> If someone can give me a printout/screenshot of hal-device-manager showing the 
> Advanced properties of a USB stick, I can make sure that such disks are 
> labelled accordingly.

I will try and do it later today.

>> I can test it. Would it work with the Live Kubuntu DVD? I haven't
>> installed it on my system yet ...
> Well, as long as you have the dependencies (python2.4-dbus, python2.4-dcop and 
> python2.4) then it should run (you need to modify the /etc/defaults/hal as 
> well so that we can retrieve partition type info from HAL).

Hm. Hope Kubuntu live has those deps :)

> I think, this is a good start to a kubuntu-specific default automation 
> package. Seeing the HAL/DBUS system and its bindings in Python, I think its 
> very possible to popup nice dialogs, control centre modules etc when devices 
> are loaded. For eg, wouldn't it be nice if the printer driver selection is 
> automatically started when a USB printer is started ? For me currently, this 
> doesnt occur (atleast for my Canon S200SPx).

But it should only happen if it wasn't configured already ...
otherwise just a popup notice to let the user know the device has been
(re)added.

> perhaps, it is also a start to a kubuntu specific device-manager ?

That's an interesting idea. Are there Kubuntu-specific feature that
allow that, or can the scripts and all be passed upstream with little
change?


-- 
Giuseppe "Oblomov" Bilotta

"I'm never quite so stupid
 as when I'm being smart" --Linus van Pelt




More information about the kubuntu-devel mailing list