## Please edit system and help pages ONLY in the moinmaster wiki! For more
## information, please see MoinMaster:MoinPagesEditorGroup.
##master-page:Unknown-Page
##master-date:Unknown-Date
##acl MoinPagesEditorGroup:read,write,delete,revert All:read
#format wiki
#language en
== Ivman and Configuring Automounting of Devices ==
Ivman is installed by default in Kubuntu and is configured to popup windows on insertion of new devices. I don't know about regular Ubuntu, but with the Kubuntu desktop I find this really annoying. One quick way to see if ivman is installed and configured on your system is to see if the directory /etc/ivman/ exists. With ivman in Kubuntu, everytime I insert a USB key or a CD, a new Konqueror window pops-up. Also audio CDs start playing right away and this is not what I wanted to KDE to do. This is especially annoying if you are like me and are using KDE 3.5 (Beta 1) which has its own dialog window which comes up and asks you what to do with the newly inserted media.
To change the ivman settings, you should edit the file /etc/ivman/IvmConfigActions.xml as root. To do this enter the following command into a terminal window:
{{{
sudo kwrite /etc/ivman/IvmConfigActions.xml
}}}
Kwrite uses syntax highlighting which means everything that ivman cannot see is coloured grey (this is called commenting). The coloured text is the settings which effects the mounting of devices. You can comment out text you do not want like so:
{{{
}}}
The act as brackets which tell ivman to ignore the text inside.
If you want specific actions to be commented out, there is a comment explaining what each section does above it. I want to stop a new Konqueror windows from opening as soon as something is mounted so I commented out this section:
{{{
}}}
Be careful not to comment out everything in the file. Even if you don't want anything to happen when something is mounted, make sure not to comment out the first two lines of the file, the last line, or this section:
{{{
}}}
The section above tells ivman to mount any device when it is pluged in - but it does not tell ivman to launch any programs. Only comment out this section if you don't want users to have access to USB drives, or you plan to mount them yourself as root.
== Access Photos from Digital Cameras ==
If you commented out the 'open konqueror' section above, Konqueror should still pop up a new window when plugging in a digital camera, as there is a separate rule in /etc/ivman/IvmConfigActions.xml for those:
{{{
}}}
Not all digital cameras support the Picture Transfer Protocol (PTP) though, and thus hal.info.product does not get set to the value above. This was specifically tested with the Casio Exilim EX-Z750 so far, but most older Casio cameras may be affected as well. For the EX-Z750, hal.info.product is set to "SANVOL". So some simple additional lines like the following solve this problem:
{{{
}}}
Note, that we actually can't access "media:/camera" but rather use the same method we just commented out in the generic 'open konqueror' action above.
=== Automatically Copy Photos from Digital Cameras ===
Instead of just opening a Konqueror window and let the user copy the photos himself, a solution to copy photos automatically to a specified directory is described below. Please note that this has only been tested within KDE.
First, we need to create a rule which matches the camera as specific as is possible, in order to not trigger this Ivman action by accident. For the Casio EX-Z750 we actually would need to check the "parent" HAL entry of the mountable partition on the MMC/SD card, as the HAL entry for the partition itself does not contain any indicator about the manufacturer (Casio) but the parent entry does. (You can check the HAL entries with a connected camera by running 'lshal'.) Unfortunately, there doesn't seem to be a way to resolve the hal.info.parent reference, but just checking the value of this key may be sufficient as well.
If you put the following text in your /etc/ivman/IvmConfigActions.xml, all photos (and videos) are copied from the digital camera to a directory photo.YYMMDD-HHMMSS.
{{{
}}}
Please note:
* The text starting with "