Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automounting in userspace with ivman
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 17, 18, 19 ... 27, 28, 29  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Tue Jan 11, 2005 1:39 am    Post subject: Reply with quote

The page for HAL is at http://freedesktop.org/wiki/Software_2fhal. It's pretty out of date, though. If you want to get into hacking on HAL, probably it's best to look at the mailing list - http://freedesktop.org/mailman/listinfo/hal. I doubt there's any good documentation beyond what's in the source code, HAL is a pretty young project and documentation (unfortunately) is usually considered low priority.

Also, I notice that there's a HAL 0.4.4 in portage now (I'm still running 0.4.2). Have you tried that? Maybe it has MMC/SD support?
Back to top
View user's profile Send private message
Devport
Guru
Guru


Joined: 15 Dec 2004
Posts: 361

PostPosted: Tue Jan 11, 2005 2:09 am    Post subject: Reply with quote

Thanks for the links.

I am also running 0.4.2, but i doubt that MMC support is already in HAL 0.4.4 since it has been disabled on x86 systems up to linux 2.6.9. I will notify you in this thread when / if I ( or someone else ) gets the device supported by HAL.
Back to top
View user's profile Send private message
DrWoland
l33t
l33t


Joined: 13 Nov 2004
Posts: 603

PostPosted: Tue Jan 11, 2005 9:04 pm    Post subject: Reply with quote

So what's the deal with the CD's not mounting problem? lshal returns both of my drives, but neither lshal --monitor nor dbus-monitor --system do anything when my CDROM's are ejected or new media is put in. It appears to be a problem with HAL - I have the latest portage ebuilds installed for hal and dbus - the cvs links in the original how to don't seem to be working :( What to do? dbus and lshal -monitor both give output when I turn on my USB camera. hal even creates a folder in /media for it, but doesn't mount it - kind of stupid, no? It deletes the folder whenthe camera is off as well. None of it just makes any sense what so ever.
Back to top
View user's profile Send private message
ChrisM87
l33t
l33t


Joined: 07 Aug 2004
Posts: 728
Location: Rheinland-Pfalz (Germany)

PostPosted: Tue Jan 11, 2005 11:20 pm    Post subject: Reply with quote

Hi,

rohan28 wrote:
ChrisM: Can't help you there, but the problem might not even be in HAL; the messages are generated by the kernel, so it might actually be a kernel bug which is merely triggered by HAL. Or it might not be a bug at all, maybe HAL is just doing some polling and you've got verbose USB debug messages on? I really have no idea... :-)

thanks for your answer.

I just changed from 2.6.10-nitro4 (which is very instable) to 2.6.10-gentoo-r4 and explicitly checked, that all "USB debug"-messages are disabled in my kernel config.
But that didn't change anything, my cardreader (uba) is still spamming dmesg.

Perhaps I should just wait until things got more stable.

ChrisM
_________________
born to be root - sorry for my bad English!
Back to top
View user's profile Send private message
DrWoland
l33t
l33t


Joined: 13 Nov 2004
Posts: 603

PostPosted: Wed Jan 12, 2005 3:16 am    Post subject: Reply with quote

ChrisM87 wrote:
Hi,

rohan28 wrote:
ChrisM: Can't help you there, but the problem might not even be in HAL; the messages are generated by the kernel, so it might actually be a kernel bug which is merely triggered by HAL. Or it might not be a bug at all, maybe HAL is just doing some polling and you've got verbose USB debug messages on? I really have no idea... :-)

thanks for your answer.

I just changed from 2.6.10-nitro4 (which is very instable) to 2.6.10-gentoo-r4 and explicitly checked, that all "USB debug"-messages are disabled in my kernel config.
But that didn't change anything, my cardreader (uba) is still spamming dmesg.

Perhaps I should just wait until things got more stable.

ChrisM


Or use autofs 8O
Back to top
View user's profile Send private message
Tanisete
Guru
Guru


Joined: 12 Mar 2004
Posts: 312

PostPosted: Sat Jan 15, 2005 11:00 pm    Post subject: Reply with quote

Ivman is great, but hal is not as good as ivman. I've recently discovered that when i put an empty cd in my cd-writer, and hal is on, it blocks entirely the device, and i can't eject it. This dones not happen if the cd is full of data. Does anyone know how to solve this?

Thanks a lot!!
Back to top
View user's profile Send private message
nightfrost
Apprentice
Apprentice


Joined: 07 Dec 2004
Posts: 293
Location: Sweden

PostPosted: Tue Jan 18, 2005 7:20 pm    Post subject: Reply with quote

Hi!

I was just (this morning actually) about to post a thread asking why automounting is such a mess - and practically impossible - under linux. Now it seems I don't need to do that anymore. Ivman is great! It has a few problems, but the project is really promising.

However, I do have a slight problem I would like to address here. I've been trying to read through this whole thread, but since it's so big by now I might have missed this particular issue. Please correct me if I have.

Now, to cut it short; if I enter a CD which is blank, I cannot eject it, unless I issue "eject /dev/hdc" as root. Of course, this is not a problem, cause if a blank disc is entered it is to burn it (and that works, and k3b manages to eject the CD when burning is done). But anyway, I was wondering why that could be and if there's a workaround.

Once again, thanks a lot for great tool :)
Back to top
View user's profile Send private message
Tanisete
Guru
Guru


Joined: 12 Mar 2004
Posts: 312

PostPosted: Tue Jan 18, 2005 9:27 pm    Post subject: Reply with quote

I have almost the same problem, so i configured ivman not to mount (or try) the media inserted in my cd driver, like this:

Code:
<ivm:Match name="hal.block.device" value="/dev/hdc">
       <ivm:Match name="hal.volume.disc.is_blank" value="true">
            <ivm:Option name="mount" value="false" />
       </ivm:Match>
    </ivm:Match>


For me it worked!!
I hope it works for you too!
Back to top
View user's profile Send private message
nightfrost
Apprentice
Apprentice


Joined: 07 Dec 2004
Posts: 293
Location: Sweden

PostPosted: Wed Jan 19, 2005 5:22 am    Post subject: Reply with quote

Tanisete wrote:
I have almost the same problem, so i configured ivman not to mount (or try) the media inserted in my cd driver, like this:

Code:
<ivm:Match name="hal.block.device" value="/dev/hdc">
       <ivm:Match name="hal.volume.disc.is_blank" value="true">
            <ivm:Option name="mount" value="false" />
       </ivm:Match>
    </ivm:Match>


For me it worked!!
I hope it works for you too!


Ah! Worked like a charm! Many thanks!
Back to top
View user's profile Send private message
jwc
n00b
n00b


Joined: 31 Jan 2004
Posts: 57
Location: Germany

PostPosted: Wed Jan 19, 2005 9:34 pm    Post subject: Just one question Reply with quote

Hi, that rule for not mounting blank discs looks nice! I just wonder why you check for /dev/hdc first, do you want to mount other empty discs?

Bye, Joost
Back to top
View user's profile Send private message
Tanisete
Guru
Guru


Joined: 12 Mar 2004
Posts: 312

PostPosted: Wed Jan 19, 2005 9:49 pm    Post subject: Reply with quote

I had problems applying this rule for all devices, and i found out that not all the devices have this property (at least for some of mine). In other cases, you can erase the first "if".
I'm glad it worked for more people too!!
Back to top
View user's profile Send private message
nightfrost
Apprentice
Apprentice


Joined: 07 Dec 2004
Posts: 293
Location: Sweden

PostPosted: Thu Jan 20, 2005 1:06 am    Post subject: Reply with quote

well, so far for me everything's been working. But I've been encountering another problem. I have a builtin 7-in-1 mem card reader, and whenever I insert a card therein nothing happens. I issue 'df' and I get no respone of a new mounted device. If I enter fdisk -l, my normal partitions show up and then the whole system hand a la windows. I have to power off and restart.

Unfortunately, I'm sort of drunk right now (really sorry) and don't know what additional information to post to make this issue easier to understand... What do I need to post - I'll do it as soon as I sober up :)
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Thu Jan 20, 2005 8:28 am    Post subject: Reply with quote

Hi guys,
First, let me say, I'm sorry I haven't provided any support here lately. Gentoo Forums stopped notifying me of replies to this topic for some reason, and I've been somewhat distracted lately...

...but now I would like to announce a new version: Ivman-0.5_pre1! Hopefully it will be in portage soon. It has some nice new features. It can monitor HAL properties of devices and execute commands when they change to certain values (I was hoping this would enable Ivman to replace ifplugd for ethernet cable plugging, but unfortunately this is not the case). It can substitute any HAL property into a command string (for instance, you could make a new link on your desktop whenever a new device is mounted, and the name of the link could be the volume's label). And it has man pages, hooray :-) There are also some minor fixes and improvements - for instance, there will be much less warnings from HAL now, as Ivman will now check to see if a property exists before trying to get its value.

The basic stuff - mounting volumes - hasn't really changed much, but Ivman is now even more flexible. There's a bit on my page about what you can do with it, but it's really up to you...

Tanisete: thank you for pointing out the problem with blank CDs, I was not aware of it (I very rarely burn CDs :-)). I put that rule into the default configuration of 0.5_pre1. I also concur with you, I would say that Ivman is probably more stable than HAL, but that's fair enough... HAL is much more complex than Ivman!

On that note... the rest of you who have reported problems recently... no solutions come to mind. (I'm pretty mentally exhausted at the moment, I was up rather late last night waiting for results of my girlfriend's surgery, and I spent most of today making my local search engine index kopete logs. What fun :-)) Remember though, if you can't mount something without Ivman, of course you won't be able to mount it with Ivman...
Back to top
View user's profile Send private message
keyson
l33t
l33t


Joined: 10 Jun 2003
Posts: 829
Location: Sweden

PostPosted: Thu Jan 20, 2005 9:56 pm    Post subject: Reply with quote

rohan28

Thank you for Ivman-0.5_pre1. Couldn't resist to use the popup function :D

So this is a contribution.
Code:

   <ivm:Match name="hal.info.category" value="printer">
       <ivm:Match name="hal.info.bus" value="usb">
           <ivm:Option name="exec" value="dcop knotify default notify 'Ivman' 'New Device' 'USB printer detected: $hal.info.vendor$ $hal.info.product$' '' '' 16 1" />
       </ivm:Match>
   </ivm:Match>


Give a nice info about that you plugged in your usb printer.

-Kjell
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Thu Jan 20, 2005 11:35 pm    Post subject: Reply with quote

Thank you, keyson :-) That rule will be in the next release. Everyone else is also encouraged to submit rules for their hardware - it would be nice to have pop-ups for pretty much every device available by default.
Back to top
View user's profile Send private message
yanos
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2003
Posts: 149
Location: montreal, canada

PostPosted: Fri Jan 21, 2005 5:22 am    Post subject: Reply with quote

For me, most thing works well, only minor glitchs. The most annoying one is that when I plug my usbstick, it is mounted on /media/usbstick. Then I unmount it and plug it in again but then it gets mounted on /media/usbstick1 and so on. This annoys me just because I would like to have a link in my home dir to my usbstick, but when the mount point is always moving it gets a little difficult to do that.

A part for that tiny little issue, I can say that ivman really, really makes my life easier when I actually want to use my computer for doing some real work, not just mindless fiddling around like I do most of the time :)
Back to top
View user's profile Send private message
keyson
l33t
l33t


Joined: 10 Jun 2003
Posts: 829
Location: Sweden

PostPosted: Fri Jan 21, 2005 5:50 am    Post subject: Reply with quote

Hi yanos.

I hade the same problem. You need to set up a udev rule so the
name of the device stay's the same. I hade the problem that it
shifted from /dev/sda to sdb .. sdc .... and got the problem you describe.

This is mine.
Code:

BUS="usb", SYSFS{serial}="0734023200E7", NAME="stick", SYMLINK="%k"


Observ the backward naming. It make the 'real' device be named /dev/stick.
You may alter it to serve any partition on the usb drive. My stick is
using the 'sda' as a partition, but you may have sda1 .. sdb1 ....

-Kjell
Back to top
View user's profile Send private message
DumbMan
n00b
n00b


Joined: 27 Feb 2004
Posts: 31

PostPosted: Fri Jan 21, 2005 12:19 pm    Post subject: Reply with quote

Hi all,

I've spend the whole last week-end playing around with dbus-hal-ivman as a solution for automounting ( I used supermount before)

I found this solution really cool, frexible and very promising but there were some "issues" for me that made me go back to supermount and sit waiting for a fix (unfortunately I can't help with anything but reporting "issues")

So this is what made me go back to supermount:
1. DVD tray stays locked when I whatch a movie with Xine or Mplayer (no problem otherwise, if I just "cd" around) I can eject it with the "eject" command but only as root. If I umount it (also as root) then ivman breaks (I know I'm not alone here, there are other posts about this in this thread)
2. Blank CD locks tray (as I can see from the posts above this one is already fixed)
3. I mount a data CD. I access it with Konqueror and within a console. When I remove the CD, it get's unmounted, no problem here. But if I'm still in the CD directory in the console, I get a VFS message every 2 seconds about "busy inodes" or something like that (I don't remember exactly now, writting from work) As soon as I leave the CD directory the messages stop.

I'm not the only user on this machine, so I can't be always there when someone wants to eject a dvd.
A log message every 2 seconds is a bit annoying for me.

I know that ivman is in developpment, and I want to thank rohan28 for his hard efforts and for the time spent helping us around here.

Anyone has a solution/suggestion?

Thanks in advance.

Dumbman
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Fri Jan 21, 2005 12:48 pm    Post subject: Reply with quote

DumbMan:
1. The locking is a problem with the DVD player software (I would guess not mplayer or xine, but the underlying libraries). I haven't yet gotten around to fixing the breakage of Ivman on manually umounting, but I'll move it higher up the list :-) For now, as you've noted, you can eject it as root. I suggest putting a rule in /etc/sudoers allowing everyone to call eject, then binding it to a keyboard shortcut. (in the long run, maybe someone could track down exactly where the tray is locked and find a way to disable it? Or maybe Ivman could periodically check if the tray is still unlocked?)
2. Yup, as you said, apparently fixable with an additional rule :-)
3. I've seen this too. I'm not sure it's really Ivman's fault... the 'correct' way to remove media is always to unmount it before taking the media out of the system. Everyone skips this for CDs since they are read-only and won't get damaged, but I guess programs or the kernel can still get confused sometimes, especially if you are still in the filesystem when the media is yanked. What if you stop ivman, and manually mount a CD, then eject it? Do you get the messages then...? In any case, it's only a nuisance and is probably not that easy to fix :-(
Back to top
View user's profile Send private message
DumbMan
n00b
n00b


Joined: 27 Feb 2004
Posts: 31

PostPosted: Fri Jan 21, 2005 1:18 pm    Post subject: Reply with quote

Thank you for answering so fast rohan28! :D
1. I like your idea. I didn't know about the sudoers (I'm still a kind of a newbie :D ) I think it will be even more fun ejecting with a shortcut for "my users", it sounds like a "geek" feature :D
2. I'll try that one
3. Here you're right again. Stupid me. I didn't test mounting by hand, without ivman working :oops: I'll try it and post if there is problem. I'll do a little more searching about this, and about the trya lock problem.

Well, it looks like I'm going to play again :D

Thank you again rohan28. Let the force be with you :wink:
Back to top
View user's profile Send private message
grzewho
l33t
l33t


Joined: 31 Dec 2002
Posts: 626
Location: /home/g

PostPosted: Fri Jan 21, 2005 2:52 pm    Post subject: Reply with quote

DumbMan wrote:
1. DVD tray stays locked when I whatch a movie with Xine or Mplayer (no problem otherwise, if I just "cd" around) I can eject it with the "eject" command but only as root. If I umount it (also as root) then ivman breaks (I know I'm not alone here, there are other posts about this in this thread)


maybe the solution could be that ivman detects if its a dvd movie and don`t try to mount it ? i`m affraid i can not write a rule to do that. i`m having the same problem as you mentioned above
_________________
Code:
USE="freedom -software_patents" emerge --deep --update world
Back to top
View user's profile Send private message
DumbMan
n00b
n00b


Joined: 27 Feb 2004
Posts: 31

PostPosted: Fri Jan 21, 2005 3:34 pm    Post subject: Reply with quote

I didn't know that it was possible to watch the dvd without mounting it :) Never tried...

Yes grzewho, it's a good idea to make a rule like that, but it seems that recognizing video DVDs is not 100% reliable (?yet?) Correct me if I'm wrong.

But I'll try to dig around that one, may be it can be something similar to the way audio CD are recognized... Something like ***.has_video... Anyway, I'll print again tha hal docs tonight :-)
Back to top
View user's profile Send private message
nightfrost
Apprentice
Apprentice


Joined: 07 Dec 2004
Posts: 293
Location: Sweden

PostPosted: Tue Jan 25, 2005 12:59 am    Post subject: Reply with quote

Devport wrote:
rohan28 wrote:
Devport: I'd certainly like to support MMC/SD cards :-) The question is, does HAL support them? Can you please run 'lshal' and see if there's any /dev/mmcblk3p1 mentioned anywhere? If there is, please post the HAL output for that device. If there's not, then we'll have to wait until HAL supports them (or alternatively bypass HAL for memory cards, but that will be messy and I don't want to do that). In any case, I would definitely like to support absolutely anything that can be mounted, but I don't have any MMC/SD readers, so development for them could be a little slow.

No, as it seems the device is not ( yet ) supported by HAL. I will investigate to find out what I can do to get that device supported by HAL.


hey, I get the following outputs from lshal --monitor when inserting my SD-card in my builtin 7-in-1 card reader:

Code:
*** lshal: property_modified, udi=/org/freedesktop/Hal/devices/block_8_16, key=block.have_scanned
           is_removed=false, is_added=false
*** new value: true  (bool)


removing it, expectedly gives:

Code:
*** lshal: property_modified, udi=/org/freedesktop/Hal/devices/block_8_16, key=block.have_scanned
           is_removed=false, is_added=false
*** new value: false  (bool)


ivman doesn't react to this as far as I can tell. I'm sure this could be fixed with some rule or other, but I don't know how that would look like.

Rohan28: How about starting a new thread to collect device-notifier rules?
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Tue Jan 25, 2005 1:13 am    Post subject: Reply with quote

Quote:
How about starting a new thread to collect device-notifier rules?


That's a good idea :-) I'd like to look for a more neutral place though - after all, this isn't supposed to exclusively be a Gentoo program... in fact, I'm looking at reviving the Ivman wiki.

In the mean time, you may as well post the entire lshal output for /org/freedesktop/Hal/devices/block_8_16 here :-) In the long run, I would like to include it in "ivm.mountable", but even now, it is probably possible to put together a rule to mount it.
Back to top
View user's profile Send private message
nightfrost
Apprentice
Apprentice


Joined: 07 Dec 2004
Posts: 293
Location: Sweden

PostPosted: Tue Jan 25, 2005 8:15 am    Post subject: Reply with quote

Quote:
That's a good idea Smile I'd like to look for a more neutral place though - after all, this isn't supposed to exclusively be a Gentoo program... in fact, I'm looking at reviving the Ivman wiki


Well, nothing beats a wiki, that's for sure :) but I think you could start a thread here anyway. It seems like there are users from other distros hang about here as well, not least due to the excellent support of gentoo-devs. Otherwise, you could perhaps start a thread at linuxquestions.org.

Here's from lshal:
Code:
udi = '/org/freedesktop/Hal/devices/block_8_16'
  volume.is_partition = false  (bool)
  storage.policy.should_mount = true  (bool)
  info.udi = '/org/freedesktop/Hal/devices/block_8_16'  (string)
  storage.requires_eject = false  (bool)
  storage.hotpluggable = true  (bool)
  storage.removable = true  (bool)
  info.product = 'USB SD Reader'  (string)
  info.vendor = 'Generic'  (string)
  storage.drive_type = 'disk'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_16'  (string)
  storage.physical_device = '/org/freedesktop/Hal/devices/usb_usb_device_58f_9360_100_-1_9206051_0'  (string)
  storage.vendor = 'Generic'  (string)
  storage.model = 'USB SD Reader'  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.no_partitions_hint = false  (bool)
  storage.media_check_enabled = true  (bool)
  storage.bus = 'usb'  (string)
  block.minor = 16  (0x10)  (int)
  block.major = 8  (0x8)  (int)
  info.capabilities = 'block storage'  (string)
  info.category = 'storage'  (string)
  info.parent = '/org/freedesktop/Hal/devices/scsi_2_0_0_0'  (string)
  block.device = '/dev/sdb'  (string)
  block.is_volume = false  (bool)
  block.have_scanned = true  (bool)
  block.no_partitions = false  (bool)
  linux.sysfs_path_device = '/sys/block/sdb'  (string)
  linux.sysfs_path = '/sys/block/sdb'  (string)
  info.bus = 'block'  (string)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 17, 18, 19 ... 27, 28, 29  Next
Page 18 of 29

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum