summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-02 01:06:43 +0000
committerlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-02 01:06:43 +0000
commit81ce12d92765d8c5bfe4cc503bd5d9b7888f3708 (patch)
tree78395d8330e333b2567311e5038427f6b4d57026 /remoting
parenta515f3fbb078ae5d3d6fa89e58d2547fb808cb60 (diff)
downloadchromium_src-81ce12d92765d8c5bfe4cc503bd5d9b7888f3708.zip
chromium_src-81ce12d92765d8c5bfe4cc503bd5d9b7888f3708.tar.gz
chromium_src-81ce12d92765d8c5bfe4cc503bd5d9b7888f3708.tar.bz2
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
Diffstat (limited to 'remoting')
-rwxr-xr-xremoting/tools/me2me_virtual_host.py12
1 files changed, 12 insertions, 0 deletions
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.