Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Commit 130c6eb

Browse files
committed
DISPLAY env variable will only be set with X-Window installed.
For OS has no X-Window installed(e.g.: MacOS), you need to set a fake DISPLAY env for the auto open in browser function working.
1 parent 9b6c13b commit 130c6eb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,18 @@ export VSCODE_EXTENSIONS_DIR="$HOME/.vscode-insiders/extensions"
8686
By default, VS Code changes on the remote server won't be synced back
8787
when the connection closes. To synchronize back to local when the connection ends,
8888
pass the `-b` flag.
89+
90+
91+
### Auto open in browser trouble shooting
92+
93+
sshcode detects if you're under GUI mode via checking environment variable `DISPLAY`.
94+
If `DISPLAY` is not empty, then it will try to open romote vscode url in browser app mode.
95+
96+
But the `DISPLAY` environment variable will only be set with X-Window installed.
97+
98+
For OS doesn't have X-Window installed (e.g.: MacOS),
99+
export following environment variable for enabling auto open in browser feature.
100+
101+
```bash
102+
export DISPLAY=":0"
103+
```

0 commit comments

Comments
 (0)