Ivman documentation or help for configs?? (need more than man pages)
I'd appreciate any pointers to documentation that isn't the man pages, but more specifically I'm looking for what options I have available to me to use in the XML configuration files.
I want to add a few rules to IvmConfigConditions.xml. My naive approach was... Code:
<?xml version="1.0" encoding="UTF-8"?> |
Umm, just where is it supposed to echo the line to? All you have is a raw echo command there. The ivman exec line is not a shell interpreter, it's just a launcher.
What you need to do is create a shell script with the commands you want to run and execute that. Even then, you can't simply use "echo"; it would only run as a background process and be invisible to the user. You need to have it spawn some kind of output window first. If all you want is to have some kind of "info window" appear when the action occurs, you can use something like xdialog (generic xwindows), kdialog (kde), or zenity (gtk/gnome) to create a pop-up gui window for your text. |
Ah, okay - good point!
Do you know if the Condition names I've used are valid names? I've just guessed the ones I've used above (using the debug mode output) as I can't find out what options are available to use. |
I don't really know all that much about the hal output, but looking at your post more carefully, I think you're probably using the wrong config file.
IvmConfigConditions.xml is generally for when some device sends a signal or something, such as when a laptop's suspend button is pressed. If you want a command to run when a device is physically added or removed, you should be using IvmConfigActions.xml. And in that file, you specify the device (or type of device) to match, then use exec to run a command when that device is added, and execun when the device is removed. If I'm following the comments in the file correctly, the following should run your scripts on any mountable block devices. I haven't actually tested it though. Code:
<ivm:Match name="ivm.mountable" value="true"> Code:
<ivm:Match name="ivm.mountable" value="true"> |
Amazing!!
I've spent hours going round in circles trying to get this functionality somehow or other! I'd read this page http://wiki.archlinux.org/index.php/Ivman among many others but somehow missed its mention of 'exec' and 'execun'. Thank you so much - you've made my day! :) Tom |
Glad you could get it working. I mostly just followed the comments and examples found in the default config files that are installed with the program. They're fairly clearly explained.
|
All times are GMT -5. The time now is 08:19 PM. |