From bf69d20966ba71c710078f1b8d790b022551154e Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Mon, 24 Feb 2020 14:31:31 +0100 Subject: Launch the graphical interface This patch adds the launching of the browser that works as interface for the users in ogLive. --- cfg/ogagent.cfg | 1 + main.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/cfg/ogagent.cfg b/cfg/ogagent.cfg index c1bb8c2..34939d2 100644 --- a/cfg/ogagent.cfg +++ b/cfg/ogagent.cfg @@ -1,5 +1,6 @@ [opengnsys] ip=127.0.0.1 port=1234 +url=https://127.0.0.1/opengnsys/varios/menubrowser.php # Log Level, if ommited, will be set to INFO log=DEBUG diff --git a/main.py b/main.py index b568509..b72a6f6 100644 --- a/main.py +++ b/main.py @@ -6,6 +6,7 @@ # Free Software Foundation, version 3. # +import subprocess from src.ogClient import * from src.ogConfig import * from signal import signal, SIGPIPE, SIG_DFL @@ -19,6 +20,9 @@ def main(): ip = ogconfig.get_value_section('opengnsys', 'ip') port = ogconfig.get_value_section('opengnsys', 'port') + url = ogconfig.get_value_section('opengnsys', 'url') + + proc = subprocess.Popen(["browser", "-qws", url]) client = ogClient(ip, int(port)) client.connect() -- cgit v1.2.3-18-g5258