2022-03-27 12:18:00 +02:00
|
|
|
from pyvirtualdisplay import Display
|
|
|
|
import json
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
whoami = subprocess.getoutput(["whoami"])
|
|
|
|
with open(f'/home/{whoami}/ze_runner/config.json') as jsonfile:
|
2022-07-14 21:23:19 +02:00
|
|
|
data_ports = json.load(jsonfile)
|
2022-03-27 12:18:00 +02:00
|
|
|
|
2022-07-14 21:23:19 +02:00
|
|
|
#enter screen to enter password
|
2022-03-27 12:18:00 +02:00
|
|
|
def main():
|
2022-07-14 21:23:19 +02:00
|
|
|
with Display() as disp:
|
|
|
|
d = subprocess.getoutput(["echo $DISPLAY"])
|
|
|
|
print(d)
|
|
|
|
subprocess.getoutput([f"pyhoca-cli --server localhost -N --password {data_ports['x2go_pw']}"])
|
2022-03-27 12:18:00 +02:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2022-07-14 21:23:19 +02:00
|
|
|
main()
|