Set(...) / ExecAndSet(...) commands

Text view screen This command used to control and customize GUI of J2ME/Android client. It is possible to change:

Set(...) command is used to set various parameters of GUI of J2ME/Android client with impicit data specification.

ExecAndSet(..) do the same thing, but it uses the results of executed command as a part of command which will be sent to J2ME/Android client.

For details see examples below.

There are a plenty of ways to use this command:

Set(icons, ...)

Format: Set(icons,caption,1,name1[,2,name2...,*,name11,#,name12])

where nameX specifies desired action. This command sets the caption of J2ME/Android client window and changes shown icons.

1=Exec(xmmsctrl play);\
1=ExecAndSet(icons,echo "XmmsPlaying,5,stop,1,kill");

if You do not want to change the caption of the J2ME/Android client window then it is possible to write:

1=Exec(xmmsctrl play);\

Set(hints, ...)

Format: Set(hints,1,hint1[,2,hint2...,*,hint11,#,hint12])

where hintX specifies desired action assigned to the button. This command sets the hints.

1=Exec(xmmsctrl play);\
  Set(hints,5,stop play,1,kill application);
1=ExecAndSet(icons,echo "XmmsPlaying,5,stop,1,kill");

if You do not want to change the caption of the J2ME/Android client window then it is possible to write:

1=Exec(xmmsctrl play);Set(icons,SAME,5,stop,1,kill);

Set(caption ...)

Format: Set(caption, new_caption)

This command sets the caption of J2ME/Android client window.


Set(title, ...)

Format: Set(title, new_title)

This command sets the title field of J2ME/Android client.


It is possible to add line break characters to the text. It could be done with "\n".

Set(status, ...)

Format: Set(status, new_status)

This command sets the status field of J2ME/Android client.

3=Exec(xmmsctrl play);Set(status, Playing)
3=ExecAndSet(status,sh -c "if xmmsctrl playing;\
       then echo Stopped; else echo Playing; fi")

Set(bg ...)

Format: Set(bg,#XXXXXX) or Set(bg,R,G,B)


This command sets the background color of control (main) screen of J2ME/Android client.

Note: This command does not switch the current screen.

For example to set background to blue:

3=ExecAndSet(bg,echo "0,0,255");

Set(fg ...)

Format: Set(fg,#XXXXXX) or Set(fg,R,G,B)


This command sets the foreground color of control (main) screen of J2ME/Android client.

Note: This command does not switch the current screen.

For example to set foreground to blue:

4=ExecAndSet(fg,echo "255,0,0");

Set(font ...)

Format: Set(font [,small | medium | large] [,bold] [,italic] [,underlined] [,system | monospace | proportional])

This command sets font parameters for the title and status fields of control (main) screen of J2ME/Android client. Java realization in the phone could support only some subset of fonts which can be specified by this command.

Note: This command does not switch the current screen.

For example, the following commands sets small underlined bold proportinal font:

4=ExecAndSet(font,echo "small,underlined,bold,proportinal");

Set(volume ...)

Format: Set(volume,X)

Where X should be between 0 and 100. This command sets value of volume bar of J2ME/Android client (it needs to issue Set(layout,....volume) command before to make volume bar visible):

4=ExecAndSet(volume,xmmsctrl getvol);

Set(cover ...)


Set(cover,noname,/path/to/image/file) or

Set(cover,by_name,cover_name) or



For each connected client anyRemote will automatically scale cover to the appropriate size. It is possible to use command Get(cover_size) to determine appropriate size of cover image, but in general there are no needs to run this command explicitly because anyRemote executes it by itself upon connection to/from client.

This command works only if layout previously set to 7x1 with ticker parameter:


Set(vibrate, ...)

Format: Set(vibrate,duration)

This command switches on internal vibrator of the phone (if exists) for specified amount of time. The duration is specified in tenths of a second and should be between 0 and 300.


Set(text, ...)

Format: Set(text,add|replace|show|clear|close|fg|bg|font, _data_)

This command shows help test on the screen of cell phone. See detailed description here.

#=Exec(xmmsctrl quit);\
  Set(text,replace,Help,To run Xmms press 1)

Set(list ...)


Set(iconlist ...)


Set(list,add|replace|clear|show|close|fg|bg|font, _data_) or

Set(iconlist,add|replace|clear|show|close|menu|fg|bg|font, _data_)

This command used to create and manage lists. It could be useful to manage player playlists or to browse directory structure. See detailed description here. The iconlist can contain icons in front of each list item.

3=Set(list,replace,Shell commands,reboot,shutdown,uptime,dmesg);
3=ExecAndSet(list,replace,Example,more some_file.txt);
3=Set(iconlist,replace,Shell commands,\

Set(menu ...)

Format: Set(menu,add|replace|clear[,_data_])

This command used to manage menues. Custom made menu could be added to each screen of J2ME/Android client. See detailed description here.

4=ExecAndSet(menu,add,echo "Random,Repeat,Shuffle");

Set(layout ...)


Set(layout,default|3x4|7x1 [,keypad_only|joystick_only] [,ticker|noticker] [,volume] [,choose,_button_] [,up,_button_] [,down,_button_])

4=ExecAndSet(layout,echo "7x1,joystick_only,\

7x1 layout This command used to choose icon layout to show. There are 2 icon layouts defined: default (3x4) and 7x1.

If keypad_only parameter specified, then it will be possible to send commands only by pressing numeric keys.

If joystick_only parameter is specified, then it will be possible to send commands only by pressing joystick central button.

If choose,_button_ parameter is specified then initial selection will be set to button with appropriate number. (0-9, *, # are the valid values for the button).

16x16 icons If ticker parameter is specified then ticker (running text) will be used to show title field instead of static text.

If noticker parameter is specified then title field will be shown as static text.

If volume parameter is specified then volume bar will be shown.

In 7x1 icon layout if there will be not enough space on phone screen to show all icons, then some of them can be omitted.

If J2ME contains all icon sets then if heigth of the screen is less than

  • 220pt. then 16x16 icons will be used by default
  • 280pt. then 32x32 icons will be used by default
  • 340pt. then 48x48 icons will be used by default
  • 400pt. then 64x64 icons will be used by default
  • 600pt. then 96x96 icons will be used by default
  • overwise 128x128 icons will be used by default

It is possible to change icon size with Set(parameter,icon_size,...) command. Beware, for J2ME client valid values are only 16/32/48/64/96/128.

Note: to make this command work it needs to use J2ME which contains specified icon set.

Default (3x4) layout

In 7x1 icon layout it is possible to specify action to JoystickUp and JoystickDown with help of "up,_button_up_" and "down,_button_down_". If user pushes JoystickUp/JoystickDown then _button_up_/_button_down_ events will be sent.

Note: It is possible to change distance between icons Set(parameter,icon_padding,...) command.

Filemanager screen

Set(filemanager ...)

Format: Set(filemanager, add|replace|select, left|right, [_data_])

This command used to show file manager window. It looks like MC and allows to do basic file operations. See detailed description here.

4=ExecAndSet(filemanager,add,left,ls -1);  

Set(fullscreen ...)

Format: Set(fullscreen,on|off|toggle)

Set fullscreen mode on or off.

4=ExecAndSet(fullscreen,echo on);

Set(editfield ...)

Format: Set(editfield,caption_value,label_value,init_value)

Shows edit field on phones screen. When used press Ok then reply Ok(0,_entered_value_) will be sent to server.

3=Set(editfield,Enter parameters,\
    Parameters,Enter your data here);
    echo "Enter parameters,Parameters,Enter your data here");

For example, if user enters, say - new_line - and presses Ok, then reply Ok(0,new_line) will be sent.


Format: Set(disconnect)

Force J2ME/Android client to disconnect from PC.


Set(parameter, ...)

Format: Set(parameter,[_parameter_name_,_parameter_value_]+)

This command used to tune J2ME/Android client in some aspects (which could be hardware-dependent). See detailed description here.


Format: Set(repaint)

This command force J2ME client to repaint the screen.


Set(image ...)


Set(image,window,_image_file_name_) or

Set(image,icon,_icon_name_,_image_file_name_) or

Set(image,cover,_cover_name_,_image_file_name_) or


This command used to show images on screen of cell phone or upload icons which could be used in Set(icons,...) command. See cfg-example/Server-mode/winManager.cfg and cfg-example/Server-mode/iconUpload.cfg for details. See detailed description of Set(image ...) here.


Set(popup ...)


Set(popup,show|hide,_message_) or

This command used to show popup message on screen of cell phone.

4=Set(popup,show,Please wait !);

Data caching

To mimimize traffic between PC and J2ME/Android client results of the following commands will be cached:

Then one of these command will be executed next time, it will be send to J2ME/Android client only if command data are changed.