Saturday, 3 February 2007

Alert: Windows EventLog

I can send you a message when an entry is written to the Windows EventLog (useful to monitor a server)
Open the "<installDir>/Addins/LogWatcher.xml" file:

Configure the Watcher elements (here we are monitoring the "Application" log for "Warning" and "Error" messages only).
Use the "logwatch" command to start monitoring:

You can type "logwatch /list" to display the list of monitored logs, and "logwatch /stop" to stop monitoring.

Command: help

You can type "help" to display all available commands and your own aliases:

Saturday, 27 January 2007

Installation: Windows service

There is a new way to run MyHAL on Windows. Download the Windows setup, extract it and run setup.exe. Go in the installation directory (by default: "C:\Program Files\MyHAL project\MyHal") and modify the "MyHal.Service.exe.config" as explained here.
Then go in "Start"-"Control Panel"-"Administrative tools"-"Service" and start the "MyHal" service. Now, MyHAL will start automatically with your machine.

(see the "MyHal.log" file in the installation directory in case of any errors)

Saturday, 20 January 2007

Command: "alias"

You can create your own commands by using the "alias" command.
For example, you want to launch a TV recording program remotely. Firt add a new command:

(/action: [a]dd, [r]emove or [l]ist aliases. Here we're adding a new alias, named "tv")
Now you have you own "tv" command!

You can also specify arguments to the program launched:

Now, by typing "ie", Internet Explorer will be launched with google as its start page.

You can list and remove aliases:

Command: "!" (history)

I can display your 10 latest commands by typing "!":

Wednesday, 17 January 2007

Command: "ps"

The "ps" command displays running processes:

/p displays the PID, /r displays the priority, /sort is used to sort by name, pid or priority.

(to display the help, type: "ps /?" or "ps /help")

Alert: File System

I can send you a message when a file is created on your disk. (e.g. you want to be warned when a file download is finished).
Open the "<installDir>/Addins/FileWatcher.xml" file:

Add as many "Watcher" tag as you have directories to monitor. Here the first Watcher monitors the creation of text files (.txt) in "c:\" (for Windows systems); the second Watcher monitors the creation of any file in "/home/jc" (for Linux systems).
Use the "fwatch" command to start monitoring:

(here you can see that only one directory will be monitored because the second one doesn't exist)

As soon as a file is created in a watched directory and matches the filter, I send you a message:

You can type "fwatch /list" to display the list of monitored directories, and "fwatch /stop" to stop monitoring.

File system commands

You can navigate your remote computer's file system by using the "pwd" (print working directory), "cd" (change directory) and "ls" (list directory contents) commands (like in a shell).
For example:

You can even upload files (using your Jabber client "send file" function):

The file is uploaded in the current directory:

You can also download files using the "file" command:

(you have to open port 15000 in your firewall )

Saturday, 13 January 2007

Chat: example

Chat: configuration

The chat functionality uses an AIML engine.

The basic configuration file is "/bots/en-US/". There are a lot of things you can modify, take a look.

You can find the AIML files in the "/AIML/en-US" folder. These are XML files that are easily customizable. If the "pattern" tag matches your message I will use the "template" tag to answer you.
Don't hesitate to share your modifications.

Command: "ip"

By typing "ip" I will display your IP address(es):

Here you can see that the computer has three local addresses (three network cards), and one Internet address (this is the address other people see on the Internet).
You can type "ip /l" to display only local addresses (it's a little faster because an http request is done to retrieve the Internet address).
You can type "ip /full" to display a more complete view.

(and you can type "ip /?" or "ip /help" to display the help)

Command: "alarm"

I can send you a message after some hours/minutes/seconds (useful to don't forget the egg in the boiling water after 3 minutes...)

(to display the help, type: "alarm /?" or "alarm /help")

Command: "sysinfo"

By typing "sysinfo" I will display some system information about the computer on which I'm running:

Installation - part 3: execute the program

  1. Install Mono or .NET 2.0:
  • MyHAL runs on Linux using the Mono runtime. Follow this link to download and install Mono.
  • MyHAL runs on Windows using the Mono runtime or .NET 2.0. Follow this link to download and install Mono, or this link to install .NET 2.0.
  1. Execute MyHAL:
    • On Windows double-click on "MyHal.Console.exe" (if you have .NET 2.0 installed), or execute the following command: "mono MyHaL.Console.exe" using the Mono command prompt (in "Start"-"All Programs"-"Mono for Windows")
    • On Linux run the following command: "mono MyHaL.Console.exe"
  2. Launch your Jabber client (on any computer), add the account you created for MyHAL to your roster (your "buddy list"), and start chatting with your computer!

Installation - part 2: install and configure the program

  1. Download MyHAL on sourceforge.
  2. Unzip the package.
  3. Open the "MyHAL.Console.exe.config" file with your favorite text editor and fill in the following parameters:
  • <add key="JabberServer" value="ServerName"/> : put the server name on which you created the account for MyHAL (for example:
  • <add key="JabberId" value="MyHALAccountName"/> : put the account name you created for MyHAL (for example: MyHAL-home)
  • <add key="JabberPassword" value="MyHALAccountPassword"/> : put the account password you created for MyHAL
  • <add key="User" value="YourJabberID@yourServer"/> : your own Jabber user account (for example:
  • <add key="CanChat" value="false"/> : change it to "true" if you want to be able to chat with MyHAL. (Warning: the initialization process could take several minutes and the program could consume up to 100Mo of memory)

Installation - part 1: Jabber accounts

  1. Register a Jabber account for your computer: using your favorite Jabber client create an account on any Jabber server (for example: or This account will be used by MyHAL to log on the Jabber network.
    Don't have a Jabber client? Read the doc here (at least chapters 3.0 to 6.0)
  2. Register a Jabber account for yourself: if you don't already have one, of course.

Hello everybody!

Have you ever wanted to talk to your computer?
Now it's possible!
I introduce myself: my name is MyHAL (do you remember HAL in 2001: A space odyssey?
). I am a Jabber bot that runs on your computer. What is Jabber? It is an Instant Messenging technology like AIM, ICQ, MSN, or Yahoo messenger. So, with a Jabber client (you can find a list here), you can communicate with me from anywhere. You could chat with me, execute commands remotely, display system information or create alerts (e.g. I can warn you when your disk lacks free space, when a download has finished etc. (the only limit is your imagination))

Anybody could contribute to my development (developer, tester, or just for giving ideas), there is an open-source project hosted on sourceforge.

From a technical point of view, I am implemented in C# on Mono (so I can run on Windows and Linux systems) using SharpDevelop and TortoiseSVN.