vscode-qt-tools over SSH and X Server for Windows
mariuszmaximus opened this issue · 4 comments
Summary
On Windows I have installed xming ( X Server for Windows)
I start Visual Studio Code on Windows
over "Remote explorer" connect to remote linux over SSH
I try run "Edit in Qt Creator" on UI file but nothing happens
"qttools.creator": "/usr/bin/qtcreator",
"qttools.loglevel": "debug",
"qttools.searchMode": "path",
"qttools.useExternalBrowser": true
If i run in VSC console command "/usr/bin/qtcreator mainwindow.ui" I have correct qtcreator with my file on Windows
I looked at the code
And debug extension ,
public async launchCreator(filenames: string[] = [])
Everything looks correct application and parameters
In my opinion problem is missing DISPLAY environment variable in extension context
probably the extension or call spawn(...) did not inherit all the variables
I proved it's a problem with ENV
My temporary solution
- create /usr/bin/qtcreator_tmp.sh
- write to file
export DISPLAY=...
/usr/bin/qtcreator "$@"
- "qttools.creator": "/usr/bin/qtcreator_tmp.sh",
- And life is beautiful
Hi @mariuszmaximus 👋,
Is the display env var available in the remote terminal? It is strange that it is missing in the extension context.
EDIT: please try this as well.
You can also set remote env vars via 2 options . Would be very interesting to know if that set the env var in your remote environment. Any chance to test the 2 options on your side?
Is the display env var available in the remote terminal? It is strange that it is missing in the extension context.
Maybe it's a similar problem Why Are Environment Variables Different If I Use SSH?
ssh user@host
set
vs
ssh user@host set
this will return different results :)
I look at process tree on my linux with connected visual studio code from Windows
console in code is in different branch vs extensions
Proposed solution for consideration
run: "source /etc/profile; qtcreator .... files" ??