From 130c6eb3e68b91cfc09cb66f37324502852230ca Mon Sep 17 00:00:00 2001 From: "toki.kanno" Date: Fri, 3 May 2019 12:08:25 +0800 Subject: [PATCH] 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. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 7d42339..7182145 100644 --- a/README.md +++ b/README.md @@ -86,3 +86,18 @@ export VSCODE_EXTENSIONS_DIR="$HOME/.vscode-insiders/extensions" By default, VS Code changes on the remote server won't be synced back when the connection closes. To synchronize back to local when the connection ends, pass the `-b` flag. + + +### Auto open in browser trouble shooting + +sshcode detects if you're under GUI mode via checking environment variable `DISPLAY`. +If `DISPLAY` is not empty, then it will try to open romote vscode url in browser app mode. + +But the `DISPLAY` environment variable will only be set with X-Window installed. + +For OS doesn't have X-Window installed (e.g.: MacOS), +export following environment variable for enabling auto open in browser feature. + +```bash +export DISPLAY=":0" +```