projects-jenz/AutismBotIngame/python/pyhoca_display.py

18 lines
468 B
Python

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()