Auto start/stop gimx on linux
Posted: Mon Nov 13, 2017 12:35 pm
Sorry fo my bad english.
I installed gimx on Gentoo Linux for work my ps4 and Logitech Driving Force GT. Thats work great! Thank you very much to the developers!
I would like to be able to auto start and stop the gimx when connecting to the PC of the my Logitech Driving Force GT.
For work auto start helped me udev.rules and hardware idVendo, idProduct.
I added to /etc/udev/rules.d/90-logitech.rules:
/root/sh/gimx/start.sh:
Auto start work great! But I dont know how close gimx after disconected my Logitech Driving Force GT from the PC.
For example:
Dont't work, because udev does not see disconect my Logitech Driving Force GT.
As a temporary option, I created a cron script that runs every minute:
But this is a poor solution to the problem
Somebody tried to solve this problem?
I installed gimx on Gentoo Linux for work my ps4 and Logitech Driving Force GT. Thats work great! Thank you very much to the developers!
I would like to be able to auto start and stop the gimx when connecting to the PC of the my Logitech Driving Force GT.
For work auto start helped me udev.rules and hardware idVendo, idProduct.
I added to /etc/udev/rules.d/90-logitech.rules:
Code: Select all
ACTION=="add", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c29a", RUN+="/bin/bash /root/sh/gimx/start.sh"
Code: Select all
#!/bin/bash
cd /root/
/usr/bin/screen -A -m -d -S gimx /usr/bin/gimx -p /dev/ttyUSB0 -c 2.xml --nograb
For example:
Code: Select all
ACTION=="remove", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c29a", RUN+="/bin/bash /root/sh/gimx/stop.sh"
Code: Select all
[81623.919209] usb 3-2: USB disconnect, device number 3
Code: Select all
#!/bin/bash
lsusb > /root/sh/gimx/usb
if grep -q Logitech /root/sh/gimx/usb
then
a=0
else
a=1
fi
if [[ $a == 1 ]]
then
/usr/bin/screen -S gimx -X quit
fi
Somebody tried to solve this problem?