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

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: 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 34092427764d4333720328767670ea7bb15dad41..cde6cd96b9c9eb2c20efbf86bde0612d984327b2 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -487,6 +487,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("~/.me2me_session")
Sergey Ulanov 2012/07/31 21:09:41 maybe call it .crd_session or .chrome_remoting_ses
Lambros 2012/08/01 23:46:17 I've changed it to ~/.chrome-remote-desktop-sessio
+ 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")
Jamie 2012/07/31 21:08:06 Optional: test for undefined SHELL variable?
+ 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