next up previous contents
Next: Graphical Interface Up: Actim - Manual Previous: Architecture   Contents


Quick Start - Command Line

Suppose that you have successfully installed the application on your home PC and office workstation.

Assume the name of your home PC is A, and office workstation is B.
You want to send a command from machine A to machine B.
Suppose the email account name on machine A is 'accountA' and the password is 'pswdA'.
For machine B, the account and password are 'accountB' and 'pswdB' respectively.
Before you start, you need to setup the following options on both machines A and B:

Client ($HOME/.actimrc) Server ($HOME/.actimdrc)
emailAddress IMAP4_server
emailAccount SMTP_server
emailPassword mailSubject


Note that the mailSubject must have the same value at both ends. The emailAccount or emailPassword can be left with empty string and the user will be prompted for password. The user can also decide whether the encryption key, eKey, is put into actimrc file or entered from the prompt. The key must have the same value on both machines A and B in order to encrypt and decrypt the email content.

Make sure actimd is running on both A and B machines.

actimd
Then request to start a polling for emails from an user's mailbox. Such that on machine B, enter:
actim -C POLL EMAIL SETUP_USER
Note that once polling for emails is started, it will continue to poll forever until the user requests to end the polling on that machine. (END_USER is not implemented yet)

Then on machine A, you can choose to submit a full event request which automatically start up polling for accountA's mailbox then launches a request. In order to do this, you must setup the emailAddress and emailAccount options as the table mentioned above.
actim -E -e "ps -ef" -d "B@wabot.com" -R
Alternatively, if you don't want to expose your emailAccount and emailPassword in your actimrc file, you need to start polling explicitly. Then submit your request.
actim -C POLL EMAIL SETUP_USER accountA pswdA
If actim displays the return message of a successful login to IMAP4_server, then on machine A enter:
actim -E -e "ps -ef" -d "B@wabot.com" -R
Then sit back and do something else while waiting for the result.

However instead of starting to poll explicitly first, if you have your emailAccount and emailAddress setup in the actimrc file, then you can invoke an event request anyway. Once the actimd server receives an event, it checks whether a polling has been started. If not, start one and send the email request.

If you want to request XML output, then you can do the following:

actim -C QUEUE_INFO ALL --xmlOut
The XML output should look similar to the following:
<Result>
    <ReturnCode>0<\ReturnCode>
    <Type value="0">Command<\Type>
    <Output>
Hello message from 'pebbles'
    <\Output>
    <Error>
    <\Error>
<\Result>
<Result>
    <ReturnCode>0<\ReturnCode>
    <Type value="0">Command<\Type>
    <Output>
<Queue length="0">CLIENTS_RESULT<\Queue>
<Queue length="1">SUBMITTED<\Queue>
<Queue length="0">INCOMING<\Queue>
<Queue length="0">RAW_RESULT<\Queue>
<Queue length="0">HOLD_RESULT<\Queue>
    <\Output>
    <Error>
    <\Error>
<\Result>


next up previous contents
Next: Graphical Interface Up: Actim - Manual Previous: Architecture   Contents
Joseph Kuan 2001-10-16