Merge branch 'zdy'
This commit is contained in:
16
desktop_env/server/osbench_server.service
Normal file
16
desktop_env/server/osbench_server.service
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=OSBench Server
|
||||||
|
StartLimitIntervalSec=60
|
||||||
|
StartLimitBurst=4
|
||||||
|
After=network.target auditd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/python3 /home/user/main.py
|
||||||
|
User=user
|
||||||
|
WorkingDirectory=/home/user
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=1
|
||||||
|
Environment="DISPLAY=:1"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical.target
|
||||||
16
desktop_env/server/osbench_server@.service
Normal file
16
desktop_env/server/osbench_server@.service
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=OSBench Server
|
||||||
|
StartLimitIntervalSec=60
|
||||||
|
StartLimitBurst=4
|
||||||
|
After=network.target auditd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/python3 /home/user/main.py
|
||||||
|
User=user
|
||||||
|
WorkingDirectory=/home/user
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=1
|
||||||
|
Environment="DISPLAY=%i"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical.target
|
||||||
@@ -55,12 +55,12 @@ def judge_node(node: ET, platform="ubuntu") -> bool:
|
|||||||
or platform=="windows"\
|
or platform=="windows"\
|
||||||
and node.get("{{{:}}}visible".format(state_ns), "false")=="true"\
|
and node.get("{{{:}}}visible".format(state_ns), "false")=="true"\
|
||||||
)\
|
)\
|
||||||
and ( node.get("{{{:}}}enabled".format(state_ns), "false")=="true"\
|
and ( node.get("{{{:}}}enabled".format(state_ns), "false")=="true"\
|
||||||
or node.get("{{{:}}}editable".format(state_ns), "false")=="true"\
|
or node.get("{{{:}}}editable".format(state_ns), "false")=="true"\
|
||||||
or node.get("{{{:}}}expandable".format(state_ns), "false")=="true"\
|
or node.get("{{{:}}}expandable".format(state_ns), "false")=="true"\
|
||||||
or node.get("{{{:}}}checkable".format(state_ns), "false")=="true"
|
or node.get("{{{:}}}checkable".format(state_ns), "false")=="true"
|
||||||
)\
|
)\
|
||||||
and (node.get("name", "") != "" or node.text is not None and len(node.text)>0)
|
and (node.get("name", "") != "" or node.text is not None and len(node.text)>0)
|
||||||
|
|
||||||
coordinates: Tuple[int, int] = eval(node.get("{{{:}}}screencoord".format(component_ns), "(-1, -1)"))
|
coordinates: Tuple[int, int] = eval(node.get("{{{:}}}screencoord".format(component_ns), "(-1, -1)"))
|
||||||
sizes: Tuple[int, int] = eval(node.get("{{{:}}}size".format(component_ns), "(-1, -1)"))
|
sizes: Tuple[int, int] = eval(node.get("{{{:}}}size".format(component_ns), "(-1, -1)"))
|
||||||
|
|||||||
Reference in New Issue
Block a user