Chromium Code Reviews| Index: remoting/host/linux/linux_me2me_host.py |
| diff --git a/remoting/host/linux/linux_me2me_host.py b/remoting/host/linux/linux_me2me_host.py |
| index 6050ee8546aedc16514a1d86bec1566f52193038..b77c367f56620f9c6d2ef5030d9a87614c2c2ff1 100755 |
| --- a/remoting/host/linux/linux_me2me_host.py |
| +++ b/remoting/host/linux/linux_me2me_host.py |
| @@ -518,6 +518,7 @@ class Desktop: |
| self.child_env["XAUTHORITY"] = x_auth_file |
| devnull = open(os.devnull, "r+") |
| display = self.get_unused_display_number() |
| + use_xorg = USE_XORG_ENV_VAR in os.environ |
| # Run "xauth add" with |child_env| so that it modifies the same XAUTHORITY |
| # file which will be used for the X session. |
| @@ -534,7 +535,7 @@ class Desktop: |
| x_session[1] == "/usr/bin/gnome-session --session=ubuntu-2d"): |
| extra_x_args.extend(["-extension", "Composite"]) |
| - if USE_XORG_ENV_VAR in os.environ: |
| + if use_xorg: |
| self._launch_xorg(display, x_auth_file, extra_x_args) |
| else: |
| self._launch_xvfb(display, x_auth_file, extra_x_args) |
| @@ -574,6 +575,16 @@ class Desktop: |
| if retcode != 0: |
| logging.error("Failed to set XKB to 'evdev'") |
| + # Xorg+dummy will default to a resolution that is the maximum of all |
| + # specified widths by the maximum of all the specified heights (which might |
| + # even be a mode that wasn't specified by the user). Instead, we want to |
| + # mimic the behavior we have with Xvfb, where the first size in the list is |
| + # used as the initial size. Note: The session's settings daemon might change |
| + # to a different resolution when it starts. |
| + if use_xorg: |
| + subprocess.call(["xrandr", "--size", "%dx%d" % self.sizes[0]], |
| + env=self.child_env) |
|
Lambros
2016/05/17 00:08:14
Should redirect stdout/stderr (as in the code belo
rkjnsn
2016/05/17 21:58:45
Is there a reason we wouldn't want an error messag
Lambros
2016/05/18 00:13:49
I suppressed the errors originally because Xvfb-ra
|
| + |
| if not self.server_supports_exact_resize: |
|
Lambros
2016/05/17 00:08:14
You currently set this to False for Xorg+dummy, wh
rkjnsn
2016/05/17 21:58:45
I agree that ‘server_supports_exact_resize’ probab
Lambros
2016/05/18 00:13:49
Sounds good.
|
| return |