finally found a way to avoid manually starting x2go sessions using the client, now its automatically starting the x2go sessions for the needed CSS display

This commit is contained in:
jenz
2022-03-27 12:18:00 +02:00
parent ec87a07ede
commit 5830ed4aa7
4 changed files with 42 additions and 9 deletions
+8 -9
View File
@@ -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": "**********"
}
+18
View File
@@ -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()
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
cd "$(dirname "$0")"
source venv/bin/activate
python3 pyhoca_display.py