-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flatpak installed vscode's integrated terminal not having desired behaviour #44
Comments
Probably the real issueOk so I found out that the installation of Vscode considers only some apps in the /usr/bin/*. So if you do in the integrated terminal of vscode:
It will work. But if you do:
It won't work saying This behavior seems weird. I thought at first that it could be because haxe is a x-sharedlib but python is the same and it works. Does the manifest determine what apps from usr/bin/ can be added ? Is there a way to tell it to use everything or just some apps.(looked in the docs and doesn't seem so) |
The main feature of Flatpak is sandboxing and there is no way to disable it. |
So how can vscode-extensions use outside components ? I talked about haxe but vscode can't use pylint either since it's limited to what is present in the Sdk. Setting their path in the user settings doesn't work either. |
possible? |
@allo- No, they could have conflicting files. |
Is there another way to get vscode to work? Internal terminal doesn't seem to be usable for debugging and whitelisting /usr isn't visible inside the jail. At least putting an xterm inside would be helpful. |
For the terminal to run on the host requires modifications to how the terminal works. |
I guess running inside the jail would be the nicer solution, but for the moment I would like anything which allows me to test vscode with gdb debugging (Compiling a sample project and then pressing F5 should work ;-)). |
Well Really IDEs just need to be designed to be sandbox friendly which I know isn't helpful now. |
For developing is better to use snap IDEs like visual studio or pycharm. |
For reference, I am using fedora silverblue with toolbox and I added the following to my settings: "terminal.integrated.shellArgs.linux": [
"/var/home/thiblahute/bin/my-devtools/vscode-enter"
], where the vscode-enter script contains: #!/bin/sh
flatpak-spawn --host toolbox enter This actually works pretty well for me :-) |
^ that is a bit more robust for me. But the shell spawning time is really bad... |
@thiblahute @Ablu Where/How did you add those settings? I am getting weird behaviour in flatpak VSCode terminal as well. |
After looking at it a little more, I think the above settings are described here. |
Just to improve your tip, @Ablu :
|
vscode is now deprecating the "terminal.integrated.profiles.linux": {
"Flatpak Escape": {
"path": "flatpak-spawn",
"args": [
"--host",
"toolbox",
"run",
"bash"
],
}
},
"terminal.integrated.defaultProfile.linux": "Flatpak Escape" |
It says end of the file expected. |
Check your JSON syntax. You might need a comma before or after the block you've pasted into your config file. |
I use this: "terminal.integrated.profiles.linux": {
"BASH": {
"path": "/usr/bin/flatpak-spawn",
"args": ["--host", "--env=TERM=xterm-256color", "bash"]
},
"ZSHELL": {
"path": "/usr/bin/flatpak-spawn",
"args": ["--host", "--env=TERM=xterm-256color", "zsh"]
},
"Flatpak": {
"path": "/bin/bash"
}
}, The zshell works out of the box with themes, just colors are little of (especially yellow). I also run flatpak bash to get into the isolated env. Hope it help ;) //update |
After 1 day, here is my working solution for ZSH shell on Elementary OS 6
|
The recommendation of using "terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/usr/bin/flatpak-spawn",
"args": ["--host", "--env=TERM=xterm-256color", "bash"]
},
}, Launching a terminal still brought up a The only thing which did work was adding: "terminal.integrated.shell.linux": "/bin/bash", I'm not satisfied with that, though, since this is deprecated. I'd like to get the more future-proof profile method working if possible. |
For what it's worth the "solution" I m using now is to spawn the terminal and manually run the appropriate |
What version are you running? There is issue with newer versions, 1.64+. |
I'm on version 1.66.1, so I suppose that would be affected. |
Yeah, seems like the 1.66 doesn't even start the default profiles at all. Running manually the spawn, it works. |
This is what worked for me #315 (comment) |
EDIT (21/01/2025)
|
Linux distribution and version
Debian 9 strecth
Flatpak version
Flatpak 0.8.9
Description of the problem
microsoft/vscode-cpptools#1550
The fact that the app is virtualized makes it so that you can't run : flatpak run org.godotengine.Godot
or any flatpak command in the integrated terminal of vscode. You can't also use gnome-terminal as your integrated terminal in vscode because of this. This makes it also troublesome when trying to use external apps that are used by the extensions.(i.e. My haxe extensions in vscode can't find haxe in my path even though it is installed).
Haxe is available in /usr/bin/ so I guess vscode should detect it.
Steps to reproduce
Potential solution:
Adding --filesystem=/bin/ access to vscode ? Are there any reasons for not doing this ? What would be the work around.
The text was updated successfully, but these errors were encountered: