vscode: List of available terminals doesn't show up and the default profile not respected locally
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.66.0 (flatpak)
- OS Version: Red Hat Enterprise Linux release 8.5
Steps to Reproduce:
- Open vscode and click the drop down menu for the terminals
with current settings.json
as follows
{
"workbench.colorTheme": "Monokai",
"terminal.integrated.fontFamily": "DejaVuSansMono Nerd Font Mono",
"terminal.integrated.useWslProfiles": false,
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/usr/bin/bash",
"args": [],
"icon": "terminal-bash",
}
},
"terminal.integrated.defaultProfile.linux": "bash",
}
A similar behavior was reported for #143307 but dismissed due to VPN. Note that in my case this is happening locally. Similarly, flathub/com.visualstudio.code#288 was reported and linked to #143307 that is now closed.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 26 (11 by maintainers)
This inspired me to put together a PR that links
/var/run/host/etc/shells
to/etc/shells
incode.sh
, thanks!Thank you @jcdickinson! You fix works well, and solves the issue for the Flatpak - VSCode works perfectly again as a Flatpak. @meganrogge @Tyriar FYI this was the fix. Thank you for the great software!
If anyone finds this thread searching for a solution to this (and other) issues on the Flatpak build: Just added documentation for the Flatpak build of VSCode at https://github.com/flathub/com.visualstudio.code#readme for the first time.
Not as clean as your solution working out the box @sangsatori but better than nothing in the meantime 😃
Running within Flatpak, there’s
$FLATPAK_ID
environment variable that can be checked against.This could then be used to look up
/var/run/host/etc/shells
instead of/etc/shells
on https://github.com/microsoft/vscode/blob/57479a5f6be520ada8517ecbbca6a982b1f80ff3/src/vs/platform/terminal/node/terminalProfiles.ts#L303I’m thinking a Flatpak-specific patch could be made, and would best belong under https://github.com/flathub/com.visualstudio.code and applied at build time but seems their build process pulls the
.deb
from https://packages.microsoft.com/repos/code/pool/main/c/code with code already minified.Looks more difficult to patch it there than I had hoped for. 🤔
@meganrogge 1.63.2 still works smoothly out of the box on a standard Fedora 36 Workstation install and recognizes my local shells out of the box in the flatpak build.
Reproducible by downgrading to 1.63.2 which worked smoothly:
flatpak update --commit=ce7dece61857fe539f7964d5ca72f9645bea914d41b904471d01b58f2907bd2d com.visualstudio.code
and then updating to the newest version (currently 1.66.1) and the integrated shell config/environment will no longer be recognized:
flatpak update
Downgrade workaround reported here: https://github.com/flathub/com.visualstudio.code/issues/288
edit: 1.66.2 on testing didn’t solve the issue either FYI. Thank you so much for your efforts!
Thanks for the investigation. We don’t support the flatpak distribution. You should report this to them and then maybe they have an environment variable we should use instead.
I’m having the same issue (Flatpak on Fedora 35 Silverblue, VSCode v1.66.1).
Reading the Flatpak docs, looks like
/etc
gets mounted under/var/run/host
.I quickly checked from the VSCode integrated terminal and
/etc/shells
indeed exists at that path instead.Not that I’m aware of. Was it working for you in version 1.63?