changing GIMX config using keyboard shortcut raspberry pi

Discuss everything to do with GIMX here
Post Reply
opi9752
Posts: 2
Joined: Fri Mar 20, 2020 2:17 am

changing GIMX config using keyboard shortcut raspberry pi

Post by opi9752 »

first use this guide to start gimx at boot without gui https://gimx.fr/wiki/index.php?title=RPi

then create shell script file for every game in a directory( /home/username/GIMXterm/)
for eg. apex legends F1apexlegends.sh

sed -i 's/[^ ]*PS4[^ ]*/PS4_ApexLegends_debugman.xml/ /etc/systemd/system/gimx.service && systemctl daemon-reload && systemctl restart gimx

for battlefield4

sed -i 's/[^ ]*PS4[^ ]*/PS4_Battlefield4_Godlike_beta.xml/' /etc/systemd/system/gimx.service && systemctl daemon-reload && systemctl restart gimx

For other games replace the PS4_ApexLegends_debugman.xml with the config file name which is present in GIMX config directory.


this script change config name inside gimx.service file create using this guide https://gimx.fr/wiki/index.php?title=RPi (without gui)
Make these scripts executable also
we cant use this script without sudo so we are going to use visudo to run these script with no password requirement

in terminal type sudo visudo

then add this line to end of visudo file

username ALL=NOPASSWD:/home/username/GIMXterm/*

after this add keyboard shortcut

in keyboard setting shortcut use

sudo /path/t0/script.sh

eg. sudo /home/username/GIMXterm/F1apexlegend.sh

and assign keyboard shortcut to this command.

When changing config press desired config shortcut wait for few seconds (gimx will disconnect) and then press the assigned PS button on the keyboard.

:mrgreen: :mrgreen:

Sorry for my poor English and Linux knowledge.

Post Reply