File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1- import os
1+ from ipaddress import IPv4Address
2+ import os , socket
23from utils .funs import *
34
45######## VNC
5- HOSTPUBIP = os . system ( "hostname -I | cut -d ' ' -f 2" )
6+ IPv4Address = socket . gethostbyname ( socket . gethostname () )
67LOCALIP = "127.0.0.1"
78
89def vncokdialog (port ):
910 return "vncserver started on " \
1011 + "\n " + magneta (str (LOCALIP )+ ":" + str (port ))\
11- + "\n " + magneta (str (LOCALIP )+ ":" + str (port ))\
12+ + "\n " + magneta (str (IPv4Address )+ ":" + str (port ))\
1213 + "\n " + "To stop it, run:\n " \
1314 + green ("vncserver -kill :" + str (port ))\
1415 + " or " + blue ("stopvnc" )
1516
1617def vncrunningdialog (port ):
1718 return "vncserver already started on " \
1819 + "\n " + magneta (str (LOCALIP )+ ":" + str (port ))\
19- + "\n " + magneta (str (LOCALIP )+ ":" + str (port ))\
20+ + "\n " + magneta (str (IPv4Address )+ ":" + str (port ))\
2021 + "\n " + "To stop it, run:\n " \
2122 + green ("vncserver -kill :" + str (port ))\
2223 + " or " + blue ("stopvnc" )
You can’t perform that action at this time.
0 commit comments