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. |