File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 22from utils .funs import *
33
44######## VNC
5- HOSTPUBIP = os .system ("hostname -I | cut -d ' ' -f 2" )
5+ if os .popen ("hostname -I | cut -d \" \" -f 2 | tr -d '\\ n'" ).read () is '' :
6+ # hostname returs \n which can effect logic
7+ IPv4Address = os .popen ("hostname -I | tr -d '\\ n'" ).read ().strip ()
8+ else :
9+ IPv4Address = os .popen ("hostname -I | cut -d \" \" -f 2 | tr -d '\\ n'" ).read ().strip ()
10+
611LOCALIP = "127.0.0.1"
712
813def vncokdialog (port ):
914 return "vncserver started on " \
1015 + "\n " + magneta (str (LOCALIP )+ ":" + str (port ))\
11- + "\n " + magneta (str (LOCALIP )+ ":" + str (port ))\
16+ + "\n " + magneta (str (IPv4Address )+ ":" + str (port ))\
1217 + "\n " + "To stop it, run:\n " \
1318 + green ("vncserver -kill :" + str (port ))\
1419 + " or " + blue ("stopvnc" )
1520
1621def vncrunningdialog (port ):
1722 return "vncserver already started on " \
1823 + "\n " + magneta (str (LOCALIP )+ ":" + str (port ))\
19- + "\n " + magneta (str (LOCALIP )+ ":" + str (port ))\
24+ + "\n " + magneta (str (IPv4Address )+ ":" + str (port ))\
2025 + "\n " + "To stop it, run:\n " \
2126 + green ("vncserver -kill :" + str (port ))\
2227 + " or " + blue ("stopvnc" )
23-
Original file line number Diff line number Diff line change 11import os
22from utils .funs import *
33
4- CURRENT_VERSION = "v0.3 "
4+ CURRENT_VERSION = "v0.4 "
55REMOTE_VERISON = os .popen ("git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/RandomCoderOrg/udroid-extra-tool-proot | tail -n1 | cut -d \" /\" -f 3" ).read ().strip ()
66
77def isold ():
You can’t perform that action at this time.
0 commit comments