Edit by Admin: halevt is no longer needed with the current PCManFM. 0.9.9To make LXDE behave like KDE or Gnome (auto events with plugged-in devices like digicams, dvb-t-adapters, usb-devices or inserted CD/DVD with Audio, Video, datas) you can install the package
halevt
via synaptic (make sure to update libxml2 and install libxml2-devel, all packages you can find).
Then define your wished actions in a configuration file, e. g. in this way:
<?xml version="1.0" encoding="UTF-8"?>
<halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">
<halevt:Device match="hal.volume.disc.has_data = true">
<halevt:Insertion exec="pcmanfm"/>
</halevt:Device>
<halevt:Device match="hal.volume.disc.has_audio = true">
<halevt:Insertion exec="xmms /mnt/cdrom"/>
<halevt:Removal exec="killall xmms"/>
</halevt:Device>
<halevt:Device match="hal.volume.disc.has_video = true">
<halevt:Insertion exec="xine dvd://"/>
<halevt:Removal exec="killall xine"/>
</halevt:Device>
<halevt:Device match="hal.volume.disc.is_videodvd = true">
<halevt:Insertion exec="xine dvd://"/>
<halevt:Removal exec="killall xine"/>
</halevt:Device>
<halevt:Device match="hal.info.udi = /org/freedesktop/Hal/devices/volume_empty_cd_r">
<halevt:Insertion exec="gnomebaker"/>
</halevt:Device>
<halevt:Device match="hal.info.udi = /org/freedesktop/Hal/devices/volume_empty_cd_rw">
<halevt:Insertion exec="gnomebaker"/>
</halevt:Device>
<halevt:Device match="hal.info.udi = /org/freedesktop/Hal/devices/volume_empty_dvd">
<halevt:Insertion exec="gnomebaker"/>
</halevt:Device>
<halevt:Device match="hal.info.category = storage & hal.storage.bus = usb">
<halevt:Insertion exec="pcmanfm"/>
</halevt:Device>
<halevt:Device match="hal.info.category = camera">
<halevt:Insertion exec="gtkam"/>
</halevt:Device>
<halevt:Device match="hal.info.udi = /org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_AC">
<halevt:Property name="hal.ac_adapter.present">
<halevt:Action value="true" exec="notify-send -t 5000 -i /usr/share/icons/Tango/scalable/status/info.svg 'The AC adapter is connected now ...'"/>
</halevt:Property>
</halevt:Device>
<halevt:Device match="hal.info.udi = /org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_AC">
<halevt:Property name="hal.ac_adapter.present">
<halevt:Action value="false" exec="notify-send -t 5000 -i /usr/share/icons/Tango/scalable/status/info.svg 'The AC adapter was removed ...'"/>
</halevt:Property>
</halevt:Device>
</halevt:Configuration>
Store the file as halevt.xml and move it in a root terminal to /etc/halevt/ ...
Then add the line
@halevt
to the file /etc/xdg/lxsession/LXDE/autostart and store it.
Then logout the current user and login again. The defined actions will perform if the hal-events will appear.
Change the /etc/halevt/halevt.xml to your needs, there are many other actions possible. I prefer to mount my plugged devices manually, therefore pcmanfm opens without mounting the device (I have several USB harddisks with more partitions and I want to decide which partition shall be mounted). You can edit the configuration file to open pcmanfm in the automounted partition too ...
Make sure to have a mountpoint /mnt/cdrom, if you want to play AudioCDS with xmms and my halevt.xml!
Remove all lines concerning CD/DVD/CDRW/DVDRW devices in your /etc/fstab, so that pcmanfm is allowed to mount CDs/DVDs with datas and or pictures using hal!
Make sure to install libnotify and notification-daemon to use the lines in my halevt.xml for the message "AC adapter ..." for note-/netbooks.
flux.