Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Unified Diff: remoting/tools/me2me_virtual_host.py

Issue 10823109: Add ability to customise Virtual Me2Me X session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, and change custom session filename Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/tools/me2me_virtual_host.py
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index 6b4095fd8d940485919b3dde9877fbd20acd07a5..0d5e3acb2f1b99e073b1a16b65a88de8d0b60da6 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698