diff --git a/AutismBotIngame/README.md b/AutismBotIngame/README.md index 82517321..e1a43011 100644 --- a/AutismBotIngame/README.md +++ b/AutismBotIngame/README.md @@ -9,6 +9,12 @@ apt install mesa-vulkan-drivers libglx-mesa0:i386 mesa-vulkan-drivers:i386 libgl1-mesa-dri:i386 libxtst6:i386 libpipewire-0.3-dev libbz2-dev + apt-get install pyhoca-cli (pyhoca-cli --server localhost -N) #needed to avoid x2go client login + + apt-get install xvfb xserver-xephyr tigervnc-standalone-server x11-utils gnumeric #needed to avoid x2go client login + + pip3 install pyvirtualdisplay pillow EasyProcess #needed for virtual display, create it inside a venv + #intel specific: apt-get remove xserver-xorg-video-intel @@ -21,6 +27,10 @@ apt install libgtk2.0-0:i386 + #pyhoca x2go terminal + aptitude install pyhoca-cli + apt-get install x2goclient + #debian hostname unloze.com @@ -77,3 +87,5 @@ #check if all libs are present with cd ~/.steam/steam/ubuntu12_32 LD_LIBRARY_PATH=. ldd vgui2_s.so + + diff --git a/AutismBotIngame/python/config.json b/AutismBotIngame/python/config.json index 41019133..893a2d5a 100644 --- a/AutismBotIngame/python/config.json +++ b/AutismBotIngame/python/config.json @@ -1,11 +1,10 @@ { - "udp_port": 48470, - "chat_external_port": 48475, - "steam_port": 29074, - "discord_bot_ip": "5.104.107.39", - "server_ip_port_ze": "135.125.188.157:27015", - "server_ip_port_ze2": "135.125.188.157:27035", - "ovh_ip": "135.125.188.157" + "udp_port": *****, + "chat_external_port": ****, + "steam_port": *****, + "discord_bot_ip": "****", + "server_ip_port_ze": "****:****", + "server_ip_port_ze2": "****:****", + "ovh_ip": "*******", + "x2go_pw": "**********" } - - diff --git a/AutismBotIngame/python/pyhoca_display.py b/AutismBotIngame/python/pyhoca_display.py new file mode 100644 index 00000000..647cff36 --- /dev/null +++ b/AutismBotIngame/python/pyhoca_display.py @@ -0,0 +1,18 @@ +from pyvirtualdisplay import Display +import json +import subprocess + +whoami = subprocess.getoutput(["whoami"]) +with open(f'/home/{whoami}/ze_runner/config.json') as jsonfile: + data_ports = json.load(jsonfile) + +#enter screen to enter password +def main(): + with Display() as disp: + d = subprocess.getoutput(["echo $DISPLAY"]) + print(d) + subprocess.getoutput([f"pyhoca-cli --server localhost -N --password {data_ports['x2go_pw']}"]) + + +if __name__ == '__main__': + main() diff --git a/AutismBotIngame/python/run_follow.sh b/AutismBotIngame/python/run_follow.sh new file mode 100644 index 00000000..eed45df3 --- /dev/null +++ b/AutismBotIngame/python/run_follow.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd "$(dirname "$0")" +source venv/bin/activate +python3 pyhoca_display.py