Update instructions for how to pipe UI to Chrome Remote Desktop
The previous instructions redirected output to the first display in the list. Somehow I ended up with displays :104, :20 (CRD) and :208, so this broke my setup. CRD chooses its display ID by starting with 20 and increasing until it finds a free ID [1]. This CL updates the instructions to hardcode DISPLAY to :20, which should work on the majority of cases. A better solution would be to retrieve the exact ID from some CRD CLI, but I'm not aware of any way to currently achieve that. [1] https://source.chromium.org/chromium/chromium/src/+/main:remoting/host/linux/linux_me2me_host.py;l=112;drc=464a632e21bcec76c743930d4db8556613e21fd8 Change-Id: I589c7ab3121a988e2a6821d6552cda77bd247ce6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5683389 Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Auto-Submit: Victor Vianna <victorvianna@google.com> Cr-Commit-Position: refs/heads/main@{#1324512}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
df58bf932a
commit
451142c246
@ -376,10 +376,12 @@ add this to your .bashrc / .bash_profile.
|
||||
|
||||
```shell
|
||||
if [[ -z "${DISPLAY}" ]]; then
|
||||
export DISPLAY=:$(
|
||||
find /tmp/.X11-unix -maxdepth 1 -mindepth 1 -name 'X*' |
|
||||
grep -o '[0-9]\+$' | head -n 1
|
||||
)
|
||||
# In reality, Chrome Remote Desktop starts with 20 and increases until it
|
||||
# finds an available ID [1]. So this isn't guaranteed to always work, but
|
||||
# should work on the vast majoriy of cases.
|
||||
#
|
||||
# [1] https://source.chromium.org/chromium/chromium/src/+/main:remoting/host/linux/linux_me2me_host.py;l=112;drc=464a632e21bcec76c743930d4db8556613e21fd8
|
||||
export DISPLAY=:20
|
||||
fi
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user