Index: remoting/host/linux/linux_me2me_host.py |
diff --git a/remoting/host/linux/linux_me2me_host.py b/remoting/host/linux/linux_me2me_host.py |
index 42a954704952b34c702289ae7ea15434083bcaee..af694064c3ccefa60edf92e05c32c953ee1ee9aa 100755 |
--- a/remoting/host/linux/linux_me2me_host.py |
+++ b/remoting/host/linux/linux_me2me_host.py |
@@ -56,6 +56,7 @@ CHROME_REMOTING_GROUP_NAME = "chrome-remote-desktop" |
HOME_DIR = os.environ["HOME"] |
CONFIG_DIR = os.path.join(HOME_DIR, ".config/chrome-remote-desktop") |
SESSION_FILE_PATH = os.path.join(HOME_DIR, ".chrome-remote-desktop-session") |
+SYSTEM_SESSION_FILE_PATH = "/etc/chrome-remote-desktop-session" |
X_LOCK_FILE_TEMPLATE = "/tmp/.X%d-lock" |
FIRST_X_DISPLAY_NUMBER = 20 |
@@ -80,7 +81,8 @@ g_host_hash = hashlib.md5(socket.gethostname()).hexdigest() |
def is_supported_platform(): |
# Always assume that the system is supported if the config directory or |
# session file exist. |
- if os.path.isdir(CONFIG_DIR) or os.path.isfile(SESSION_FILE_PATH): |
+ if (os.path.isdir(CONFIG_DIR) or os.path.isfile(SESSION_FILE_PATH) or |
+ os.path.isfile(SYSTEM_SESSION_FILE_PATH)): |
return True |
# The host has been tested only on Ubuntu. |
@@ -530,14 +532,9 @@ def choose_x_session(): |
the first parameter of subprocess.Popen(). If a suitable session cannot |
be found, returns None. |
""" |
- # 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. |
- # So it's necessary to test for these files here. |
XSESSION_FILES = [ |
SESSION_FILE_PATH, |
- "~/.xsession", |
- "~/.Xsession" ] |
+ SYSTEM_SESSION_FILE_PATH ] |
for startup_file in XSESSION_FILES: |
startup_file = os.path.expanduser(startup_file) |
if os.path.exists(startup_file): |