Tips & tricks

Enhance security with password

In Server-mode it is possible to set password which will be requested from java client.

To make this it needs to run anyRemote with -password commandline option.

The password phrase should be stored in $HOME/.anyRemote/password file in plain text.

Keepalive messages

If java client on the phone disconnects from PC after some inactivity period it is possible to send keepalive messages to handle this. It just needs to add command like

Timer(_PING_,300,0);

to the $HOME/.anyRemote/hook_connect file and add command

Timer(_PING_,cancel);

to the $HOME/.anyRemote/hook_disconnect file.

In the line above 300 is a number of seconds between Get(ping) requests.

Customization of java client initialization/exiting and connect/disconnect commands.

It is possible to add custom commands to (Init), (Connect), (Disconnect) and (Exit) event handlers.

To do this it needs to create file

and put all needed commands there. That commands will be executed after commands defined in appropriate event handler command sequence.

Support for non-UTF8 encodings

Anyremote java client supports only UTF8 encoding. If You system configured to use other encoding (e.g ISO-8859-15 used in Western Europe) then it is possible to handle this.

It just needs to add commands like

Make(var,from_utf,by_value,|iconv -t ISO-8859-15 -f UTF8);
Make(var,  to_utf,by_value,|iconv -f ISO-8859-15 -t UTF8);

to the $HOME/.anyRemote/hook_init file.

Be sure iconv utility is installed in You system.

Tune amixer utility to control appropriate sound card and channel.

If configuration file uses amixer utility to control sound volume and if it needed to control a non-default (0) sound card it is possible to add the folowing command

Make(var,MixerCard,by_value,1); % change 1 to the appropriate sound card number

to the $HOME/.anyRemote/hook_init file.

If configuration file uses amixer utility to control sound volume and if it needed to control a channel different from Master it is possible to add the folowing command

Make(var,MixerChannel,by_value,PCM); % change PCM to appropriate channel to control

to the $HOME/.anyRemote/hook_init file.