From 81ce12d92765d8c5bfe4cc503bd5d9b7888f3708 Mon Sep 17 00:00:00 2001 From: "lambroslambrou@chromium.org" Date: Thu, 2 Aug 2012 01:06:43 +0000 Subject: Add ability to customise Virtual Me2Me X session. This avoids the need for editing the script, which is impractical when it is installed from a Debian package. BUG=131245 Review URL: https://chromiumcodereview.appspot.com/10823109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149551 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/tools/me2me_virtual_host.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'remoting') diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py index cc46325..bdb4837 100755 --- a/remoting/tools/me2me_virtual_host.py +++ b/remoting/tools/me2me_virtual_host.py @@ -490,6 +490,18 @@ def choose_x_session(): if XSESSION_COMMAND is not None: return XSESSION_COMMAND + # Use a custom startup file if present + startup_file = os.path.expanduser("~/.chrome-remote-desktop-session") + if os.path.exists(startup_file): + # Use the same logic that a Debian system typically uses with ~/.xsession + # (see /etc/X11/Xsession.d/50x11-common_determine-startup), to determine + # exactly how to run this file. + if os.access(startup_file, os.X_OK): + return startup_file + else: + shell = os.environ.get("SHELL", "sh") + return [shell, startup_file] + # Unity-2d would normally be the preferred choice on Ubuntu 12.04. At the # time of writing, this session does not work properly (missing launcher and # panel), so gnome-session-fallback is used in preference. -- cgit v1.1