diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-07-04 22:55:21 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-07-04 22:56:06 (GMT) |
commit | a058c452957138b5c75bfccc4eb0dc203c08a558 (patch) | |
tree | e7b0f3f1e7eb82677bb97b95213504e50540db9e /scripts/check-system | |
parent | d1bf08573a4e49b1db2c8f2abef528fddd7f025e (diff) |
Tweak ubuntu X configuration in check-system
And remove the instructions from README
Diffstat (limited to 'scripts/check-system')
-rwxr-xr-x | scripts/check-system | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/check-system b/scripts/check-system index 75498b2..17eda54 100755 --- a/scripts/check-system +++ b/scripts/check-system @@ -4,6 +4,7 @@ import os import subprocess import sys +scriptdir = os.path.dirname(__file__) devnull = open("/dev/null", "w") xvfb_display = ":100" @@ -386,6 +387,21 @@ def check_distro(): return distro +def apply_ubuntu_tweaks(): + wrapper_config = open("/etc/X11/Xwrapper.config").read() + if "allowed_users=anybody" not in wrapper_config: + if "SUGAR_BUILDBOT" in os.environ: + print "\nPlease allow anybody to run the X server with \n" \ + " sudo dpkg-reconfigure x11-common" + else: + print "\nWe are going to allow anybody to run the X server" + ubuntu_tweaks = os.path.join(scriptdir, "ubuntu-tweaks") + subprocess.call(["sudo", ubuntu_tweaks]) + +def apply_distro_tweaks(distro): + if distro == "fedora": + apply_ubuntu_tweaks() + def warn_if_unsupported(distro): if distro == "unsupported": print "*********************************************************\n" \ @@ -405,5 +421,6 @@ xvfb_proc, orig_display = start_xvfb() run_checks(distro, checks) warn_if_unsupported(distro) +apply_distro_tweaks(distro) stop_xvfb(xvfb_proc, orig_display) |