summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-05 01:52:06 +0000
committerlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-05 01:52:06 +0000
commitccfa8c552f2a224dfb2fa4868d6ac4906b4a8dce (patch)
tree676fa5d9a7b56f1d588aa44fcb2b546ca64ce682 /remoting
parent697589fa8dad9c45bab96982bbcab3f12d76247a (diff)
downloadchromium_src-ccfa8c552f2a224dfb2fa4868d6ac4906b4a8dce.zip
chromium_src-ccfa8c552f2a224dfb2fa4868d6ac4906b4a8dce.tar.gz
chromium_src-ccfa8c552f2a224dfb2fa4868d6ac4906b4a8dce.tar.bz2
Remove XSESSION_COMMAND from Me2Me script
This also removes the warning shown when running Unity 2D desktop - it's been working fine for quite a while. BUG=168374 Review URL: https://chromiumcodereview.appspot.com/11791002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rwxr-xr-xremoting/tools/me2me_virtual_host.py35
1 files changed, 6 insertions, 29 deletions
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index 005a1e2..b941e81 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -26,14 +26,6 @@ import tempfile
import time
import uuid
-# By default this script will try to determine the most appropriate X session
-# command for the system. To use a specific session instead, set this variable
-# to the executable filename, or a list containing the executable and any
-# arguments, for example:
-# XSESSION_COMMAND = "/usr/bin/gnome-session-fallback"
-# XSESSION_COMMAND = ["/usr/bin/gnome-session", "--session=ubuntu-2d"]
-XSESSION_COMMAND = None
-
LOG_FILE_ENV_VAR = "CHROME_REMOTE_DESKTOP_LOG_FILE"
# This script has a sensible default for the initial and maximum desktop size,
@@ -356,8 +348,12 @@ class Desktop:
# terminal, any reading from stdin causes the job to be suspended.
# Daemonization would solve this problem by separating the process from the
# controlling terminal.
- logging.info("Launching X session: %s" % XSESSION_COMMAND)
- self.session_proc = subprocess.Popen(XSESSION_COMMAND,
+ xsession_command = choose_x_session()
+ if xsession_command is None:
+ raise Exception("Unable to choose suitable X session command.")
+
+ logging.info("Launching X session: %s" % xsession_command)
+ self.session_proc = subprocess.Popen(xsession_command,
stdin=open(os.devnull, "r"),
cwd=HOME_DIR,
env=self.child_env)
@@ -472,18 +468,12 @@ class PidFile:
def choose_x_session():
"""Chooses the most appropriate X session command for this system.
- If XSESSION_COMMAND is already set, its value is returned directly.
- Otherwise, a session is chosen for this system.
-
Returns:
A string containing the command to run, or a list of strings containing
the executable program and its arguments, which is suitable for passing as
the first parameter of subprocess.Popen(). If a suitable session cannot
be found, returns None.
"""
- if XSESSION_COMMAND is not None:
- return XSESSION_COMMAND
-
# If the session wrapper script (see below) is given a specific session as an
# argument (such as ubuntu-2d on Ubuntu 12.04), the wrapper will run that
# session instead of looking for custom .xsession files in the home directory.
@@ -872,19 +862,6 @@ Web Store: https://chrome.google.com/remotedesktop"""
sizes.append((width, height))
- # Determine the command-line to run the user's preferred X environment.
- global XSESSION_COMMAND
- XSESSION_COMMAND = choose_x_session()
- if XSESSION_COMMAND is None:
- print >> sys.stderr, "Unable to choose suitable X session command."
- return 1
-
- if "--session=ubuntu-2d" in XSESSION_COMMAND:
- print >> sys.stderr, (
- "The Unity 2D desktop session will be used.\n"
- "If you encounter problems with this choice of desktop, please install\n"
- "the gnome-session-fallback package, and restart this script.\n")
-
# Register an exit handler to clean up session process and the PID file.
atexit.register(cleanup)