Difference between revisions of "Command line"

From GIMX
Jump to: navigation, search
Line 11: Line 11:
 
<!--T:4-->
 
<!--T:4-->
 
In a terminal:<br />
 
In a terminal:<br />
    emu ps3_mac_address bt_device_index sixaxis_index
+
emu ps3_mac_address bt_device_index sixaxis_index
  
 
<!--T:5-->
 
<!--T:5-->
Line 25: Line 25:
 
<!--T:6-->
 
<!--T:6-->
 
In another terminal:<br />
 
In another terminal:<br />
    emuclient --config file_name
+
emuclient --config file_name
  
 
<!--T:7-->
 
<!--T:7-->
Line 37: Line 37:
 
<!--T:9-->
 
<!--T:9-->
 
In a terminal:<br />
 
In a terminal:<br />
    GIMX 0.51 or older:
+
GIMX 0.51 or older:
    emuclient --config file_name --serial --port /dev/ttyUSBX --joystick --precision 16 --refresh 4
+
  emuclient --config file_name --serial --port /dev/ttyUSBX --joystick --precision 16 --refresh 4
  
    <!--T:13-->
+
<!--T:13-->
 
GIMX later than 0.51:
 
GIMX later than 0.51:
    emuclient --config file_name --port /dev/ttyUSBX --type joystick --refresh 4
+
  emuclient --config file_name --port /dev/ttyUSBX --type joystick --refresh 4
    or
+
or
    emuclient -c file_name -p /dev/ttyUSBX -t joystick -r 4
+
  emuclient -c file_name -p /dev/ttyUSBX -t joystick -r 4
  
 
<!--T:10-->
 
<!--T:10-->

Revision as of 11:25, 15 May 2013

Other languages:
English • ‎français

Motivation

GIMX can be run from a Linux terminal without having to run a windowing system.
This improves performances, especially on small targets like the Raspberry Pi or thin clients.
It's also useful for other stuff like automation.

Linux + bluetooth

In a terminal:

emu ps3_mac_address bt_device_index sixaxis_index
  • ps3_mac_address
This argument is mandatory.
  • bt_device_index
The bluetooth device index (ex : 0 for hci0, 1 for hci1, etc).
This argument is optional, default device index is 0.
  • sixaxis_index
The sixaxis index (ex : 0 for sixaxis 1, 1 for sixaxis 2, etc).
This argument is optional, default sixaxis index is 0.

In another terminal:

emuclient --config file_name
  • file_name
The name of the config file, in the ~/.emuclient/config directory (ex : toto.xml).
This argument is mandatory.
Use backslashes to escape spaces.

Linux or Windows + DIY USB adapter or GPP

In a terminal:

GIMX 0.51 or older:
 emuclient --config file_name --serial --port /dev/ttyUSBX --joystick --precision 16 --refresh 4
GIMX later than 0.51:
 emuclient --config file_name --port /dev/ttyUSBX --type joystick --refresh 4
or
 emuclient -c file_name -p /dev/ttyUSBX -t joystick -r 4

emuclient options:

  • --config file_name
The name of the config file, in the ~/.emuclient/config directory (ex : toto.xml).
This argument is mandatory.
  • --serial
Only mandatory for the DIY USB adapter.
This option is only applicable for GIMX 0.51 and older.
  • --port /dev/ttyUSB0
The serial port. Ex: /dev/ttyUSB0 in Linux, COM4 in windows.
Only mandatory for the DIY USB adapter.
  • --joystick / --GPP / --360pad / --Sixaxis / --PS2pad
The type of USB adapter.
--joystick is for the DIY USB adapter, and --Sixaxis is for the Bluetooth dongle.
This option is only applicable for GIMX 0.51 and older.
  • --type joystick/GPP/360pad/Sixaxis/PS2pad
The type of USB adapter.
joystick is for the DIY USB adapter, and Sixaxis is for the Bluetooth dongle.
This option is only applicable for GIMX later than 0.51.
  • --precision 16
The axis precision. Joystick: 16, Other adapters: 8.
This option is only applicable for GIMX 0.51 and older.
  • --refresh 4
The refresh period, in ms.
Recommended values:
joystick/GPP/360pad/Sixaxis: 4 (250Hz)
PS2pad: 16 (62.5Hz)

General emuclient options

  • --curses
curses terminal display.
Mouse calibration is available through this interface.
  • --status
Display controls in the terminal.
  • --nograb
Do not grab the mouse cursor.
  • --force-updates
Send button+axis status even if there is no change (for compatibility with games like DNF).
  • --subpos
Improve stick precision (counteract rounding issues).
  • --keygen key
Generate a key press at emuclient startup.
The main use case for this is the automation of macro's execution.
Events that are not generated by macros are ignored.
The only way to quit is to add KEYDOWN LSHIFT and KEYDOWN ESCAPE at the end of the macro, or use --nograb and press ctrl+c into the terminal.
Another use case is the sending of a single command (it requires to use a macro as no key up event is generated).