summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2013-01-07 20:16:52 (GMT)
committerJames Meyer <james.meyer@operamail.com>2013-01-07 20:16:52 (GMT)
commitbce9a0bdcd1d4cbd464b7f4ec2c3b19bff86d48f (patch)
tree9ad961719cda3b1033e67302df3f8e302f6912e0 /abs/core/LinHES-config
parent33671693297f177c4b30c30584ddb79359a3d0ed (diff)
downloadlinhes_pkgbuild-bce9a0bdcd1d4cbd464b7f4ec2c3b19bff86d48f.zip
linhes_pkgbuild-bce9a0bdcd1d4cbd464b7f4ec2c3b19bff86d48f.tar.gz
linhes_pkgbuild-bce9a0bdcd1d4cbd464b7f4ec2c3b19bff86d48f.tar.bz2
LinHES-system|config: add support for x11vnc
x11vnc support added to service menu. By default it will run on :2. The startup script will reference /etc/x11vnc.cfg if a user wishes to override the default flags. Ex: x11_vnc_options=” -rfbport 6000” will result in a startup cmd of “x11vnc -rfbport 6000” refs # 894
Diffstat (limited to 'abs/core/LinHES-config')
-rwxr-xr-xabs/core/LinHES-config/PKGBUILD4
-rwxr-xr-xabs/core/LinHES-config/mv_vnc.py35
2 files changed, 36 insertions, 3 deletions
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD
index 7c64fe2..2ebafe8 100755
--- a/abs/core/LinHES-config/PKGBUILD
+++ b/abs/core/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=2.3
-pkgrel=204
+pkgrel=205
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config )
pkgdesc="Install and configure your system"
depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted'
@@ -166,7 +166,7 @@ md5sums=('26e20dba8d1bea96a07131ef945fd2f7'
'087a0ef743bc8af915503f8773536ce4'
'183a11aa06d60065106472ed9f72cc4a'
'b4900090d841d3e390cb840cf16afd85'
- 'f2a19e3e864984ec95ac5ea090cbfa69'
+ '299c24c0820fc9c483c820db2595e3cb'
'cf51cb22e23218ae7e9b55cac1ba3a7f'
'e4b61402858058f7575b776d62d5ee89'
'c2ef0f1140bd3fbeb44294fdf5415a32'
diff --git a/abs/core/LinHES-config/mv_vnc.py b/abs/core/LinHES-config/mv_vnc.py
index bc7a201..0260494 100755
--- a/abs/core/LinHES-config/mv_vnc.py
+++ b/abs/core/LinHES-config/mv_vnc.py
@@ -79,12 +79,30 @@ 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 ____")
if mv_common.read_config(mv_common.module_config,"vnc") == False :
logging.info("____Skipping of vnc, config disabled____")
return
-
+ #vncservice
try:
vnc=systemconfig.get("vncenable")
except:
@@ -96,5 +114,20 @@ def setupvnc(systemconfig,data_config):
mv_common.add_service("vnc")
else:
mv_common.remove_service("vnc")
+ #x11vnc
+ try:
+ xvnc=systemconfig.get("xvncenable")
+ xvncpasswd=systemconfig.get("xvncpassword")
+ except:
+ xvnc = "0"
+ xvncpassword="LinHES"
+
+ if xvnc == "1":
+ logging.info(" Installing x11vnc system\n")
+ mv_common.pacinstall("x11vnc")
+ start_xvnc(xvncpasswd)
+ else:
+ mv_common.pacinstall("x11vnc")
+
logging.info("__End of vnc\n") \ No newline at end of file