File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 11import os
2-
3- from utils .funs import nmsg
2+ from funs import nmsg
43
54DISPLAY = os .getenv ('DISPLAY' )
6- VNC_LOCK_TYPE = "/tmp/X11-unix/X"
5+ VNC_LOCK_TYPE = "/tmp/. X11-unix/X"
76
87def isvncstarted (port :int ) -> bool :
98 """
109 Check if VNC is started
1110 """
1211 if os .path .exists (VNC_LOCK_TYPE + str (port )) \
13- or os .path .exists ("/tmp/X" + str (port )+ "-lock" ):
12+ or os .path .exists ("/tmp/. X" + str (port )+ "-lock" ):
1413 return True
1514 else :
1615 return False
@@ -42,8 +41,8 @@ def stopvnc(port:int) -> bool:
4241 nmsg ("Cleaning Lock File" )
4342 if os .path .exists (VNC_LOCK_TYPE + str (port )):
4443 os .remove (VNC_LOCK_TYPE + str (port ))
45- if os .path .exists ("/tmp/X" + str (port )+ "-lock" ):
46- os .remove ("/tmp/X" + str (port )+ "-lock" )
44+ if os .path .exists ("/tmp/. X" + str (port )+ "-lock" ):
45+ os .remove ("/tmp/. X" + str (port )+ "-lock" )
4746 nmsg ("VNC Server Stopped" )
4847 else :
4948 nmsg ("VNC Server not started at " + str (port ))
You can’t perform that action at this time.
0 commit comments