summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_vnc.py
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2015-01-29 21:27:50 (GMT)
committerBritney Fransen <brfransen@gmail.com>2015-01-29 21:27:50 (GMT)
commit531232997ba0f4e875af255b37e4149e37089805 (patch)
tree9681ec4df696ed0dfaf1ad304d7da7442647f968 /abs/core/LinHES-config/mv_vnc.py
parent7b3f302f194ae19b81cfa447eee943beebed9fa3 (diff)
downloadlinhes_pkgbuild-531232997ba0f4e875af255b37e4149e37089805.zip
linhes_pkgbuild-531232997ba0f4e875af255b37e4149e37089805.tar.gz
linhes_pkgbuild-531232997ba0f4e875af255b37e4149e37089805.tar.bz2
LinHES-config: mv_vnc.py: start xvnc runit service as needed
Diffstat (limited to 'abs/core/LinHES-config/mv_vnc.py')
-rwxr-xr-xabs/core/LinHES-config/mv_vnc.py25
1 files changed, 5 insertions, 20 deletions
diff --git a/abs/core/LinHES-config/mv_vnc.py b/abs/core/LinHES-config/mv_vnc.py
index 0260494..1a028d2 100755
--- a/abs/core/LinHES-config/mv_vnc.py
+++ b/abs/core/LinHES-config/mv_vnc.py
@@ -79,23 +79,6 @@ exec wmaker
logging.info("__End of vnc \n")
-def start_xvnc(xvncpasswd):
- logging.info(" Checking if x11vnc needs to be started")
- if mv_common.check_service("frontend"):
- logging.info(" Frontend is running, starting x11vnc")
- line='''su mythtv -c "DISPLAY=localhost:0 x11vnc -rfbport 5902 --passwd %s 2>&1 > /dev/null &" \n''' %xvncpasswd
- #line='''su mythtv -c "DISPLAY=localhost:0 xscreensaver -no-splash \&" '''
- try:
- fout = open("/tmp/cmd.sh", "w")
- fout.write(line)
- fout.close()
- os.chmod("/tmp/cmd.sh",0755)
- cmd="/tmp/cmd.sh"
- os.system(cmd)
- os.remove("/tmp/cmd.sh")
- except:
- logging.info(" Couldn't start x11vnc")
-
def setupvnc(systemconfig,data_config):
logging.info("____Start of vnc config ____")
@@ -114,6 +97,7 @@ def setupvnc(systemconfig,data_config):
mv_common.add_service("vnc")
else:
mv_common.remove_service("vnc")
+ mv_common.pacremove("tigervnc")
#x11vnc
try:
xvnc=systemconfig.get("xvncenable")
@@ -125,9 +109,10 @@ def setupvnc(systemconfig,data_config):
if xvnc == "1":
logging.info(" Installing x11vnc system\n")
mv_common.pacinstall("x11vnc")
- start_xvnc(xvncpasswd)
+ mv_common.add_service("xvnc")
else:
- mv_common.pacinstall("x11vnc")
+ mv_common.remove_service("xvnc")
+ mv_common.pacremove("x11vnc")
- logging.info("__End of vnc\n") \ No newline at end of file
+ logging.info("__End of vnc\n")