Automount in fluxbox con rox-filer
Inviato: mar 23 feb 2010, 20:46
-Io non uso rox filer anche per la gestione delle icone, quindi in ./fluxbox/startup ho messo solo:Mount command -> halevt-mount
Unmount command -> halevt-umount
Eject command -> eject.hal
Codice: Seleziona tutto
/usr/local/bin/rox.panelput.pl Restore
killall -9 halevt; halevt -f -u YOURUSERNAME -g plugdev &
Sì perchè no. Magari anche solo un appunto sotto senza separare tra chi usa e chi non usa il desktop.jimmy_page_89 ha scritto: 2)quindi mi suggerisci di modificare l'articolo in modo da dividere chi usa le icone da chi non le usa?
Codice: Seleziona tutto
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE halevt:Configuration [
<!-- this entity corresponds with mountable devices, which have
volume.policy.should_mount true or don't have
volume.policy.should_mount false and are block devices hotpluggable or
removable.
-->
<!ENTITY MOUNTABLE "hal.block.device & hal.block.is_volume = true & (hal.volume.policy.should_mount = true | ((! hal.volume.policy.should_mount = false) & (hal.block.storage_device.hal.storage.policy.should_mount = true | ((! hal.block.storage_device.hal.storage.policy.should_mount = false) & (hal.block.storage_device.hal.storage.hotpluggable = true | hal.block.storage_device.hal.storage.removable = true)))))">
]>
<halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">
<halevt:Device match="hal.block.device & hal.block.is_volume & hal.volume.is_disc = true & hal.volume.disc.type=cd_rom & hal.volume.disc.has_audio=true & hal.volume.disc.has_data=false">
<halevt:Insertion exec="amarok /mnt/cdrom"/>
</halevt:Device>
<halevt:Device match="hal.block.is_volume & hal.volume.is_disc=true & hal.volume.disc.is_blank=true">
<halevt:Insertion exec="k3b"/>
</halevt:Device>
<!--
This rule matches removable devices which have volume.policy.should_mount true
or don't have volume.policy.should_mount false.
Upon insertion, they are mounted and recorded by halevt-mount.
-m 002 sets the umask of mount to 002 when pmount is used system-wide
to mount the device. This allows regular users to read the device.
<halevt:Insertion exec='halevt-mount -u $hal.udi$ -m 002 ; /usr/local/bin/rox.panelput.pl Add "$hal.volume.mount_point$" "$hal.volume.label$"'/>
!-->
<halevt:Device match="&MOUNTABLE; & (!hal.volume.is_disc | hal.volume.is_disc=false)">
<halevt:Insertion exec='halevt-mount -u $hal.udi$ -m 002'/>
</halevt:Device>
<halevt:Device match="&MOUNTABLE; & hal.volume.is_disc=true">
<halevt:Insertion exec="halevt-mount -u $hal.udi$ -m 002"/>
</halevt:Device>
<halevt:Device match="&MOUNTABLE; & hal.volume.is_disc=true & hal.volume.disc.has_audio=true & hal.volume.disc.has_audio=true & hal.volume.disc.has_data=false">
<halevt:Insertion exec="amarok /dev/cdrom"/>
</halevt:Device>
<!--
When a device get a mount point, it is passed to halevt-mount which can
record it. The property that changes is volume.is_mounted, and the action is
executed when the value of volume.is_mounted becomes true.
<halevt:Action value="true" exec="halevt-mount -s"/>
!-->
<!--USB-->
<halevt:Device match="hal.block.device & hal.block.is_volume = true & hal.volume.mount_point & hal.volume.is_disc = false">
<halevt:Property name="hal.volume.is_mounted">
<halevt:Action value="true" exec="rox $hal.volume.mount_point$"/>
</halevt:Property>
</halevt:Device>
<!--cdroms-->
<halevt:Device match="hal.block.device & hal.block.is_volume = true & hal.volume.is_disc = true & hal.volume.disc.has_data = true">
<halevt:Property name="hal.volume.is_mounted">
<halevt:Action value="true" exec="rox $hal.volume.mount_point$"/>
</halevt:Property>
</halevt:Device>
<!--
When a device is unmounted, it is recorded by halevt-mount.
!-->
<halevt:Device match="hal.block.device & hal.block.is_volume = true">
<halevt:Property name="hal.volume.is_mounted">
<halevt:Action value="false" exec="halevt-mount -s"/>
</halevt:Property>
</halevt:Device>
<!--
When a device is removed, it is recorded by halevt-mount.
Note that at that point the device is already out of hal, so we use
* which matches any device in the match attribute, and only pass the
udi to the command.
!-->
<halevt:Device match="hal.*">
<halevt:Removal exec="halevt-umount -u $hal.udi$; halevt-umount -s"/>
</halevt:Device>
<!--
Example of a use of OnInit. At startup all the devices are matched and the exec
comand is run for those that match. Here we match all the removable devices
that aren't already mounted and mount and register them.
<halevt:OnInit exec="halevt-mount -u $hal.udi$ -m 002"/>
!-->
<halevt:Device match="&MOUNTABLE; & (!hal.volume.is_disc | hal.volume.is_disc=false)">
<halevt:OnInit exec='halevt-mount -u $hal.udi$ -m 002'/>
</halevt:Device>
<halevt:Device match="&MOUNTABLE; & hal.volume.is_disc=true">
<halevt:OnInit exec='halevt-mount -u $hal.udi$ -m 002'/>
</halevt:Device>
<halevt:Device match="hal.storage.drive_type = cdrom">
<halevt:Condition name="EjectPressed" exec='eject.hal $hal.block.device$'/>
</halevt:Device>
</halevt:Configuration>
Codice: Seleziona tutto
/usr/local/bin/rox.panelput.pl Restore
killall -9 halevt; halevt -f -u YOURUSERNAME -g plugdev cdrom users&Codice: Seleziona tutto
&Codice: Seleziona tutto
&Codice: Seleziona tutto
halevt -f -u muller -g plugdev cdrom usersCodice: Seleziona tutto
<halevt:Device match="hal.volume.disc.has_audio = true">
<halevt:Insertion exec="xmms /mnt/cdrom"/>
<halevt:Removal exec="killall xmms"/>
</halevt:Device>