flathub / com.visualstudio.code

https://flathub.org/apps/details/com.visualstudio.code
150 stars 69 forks source link

vscode is not able to detected bash as terminal #39

Open ghost opened 6 years ago

ghost commented 6 years ago

I set bash to be the standard terminal in the settings: "terminal.integrated.shell.linux": "/bin/bash" but it doesn't work. I only have this problem with the flatpak version of vscode. Is this because of flatpaks sandbox? vscodebug

OS: Kubuntu 18.04 LTS

mundusnine commented 6 years ago

This works on debian 9; You have to restart your terminal for it to work. Press th kill terminal and open a new one.

ghost commented 6 years ago

Thank you for your response but restarting the terminal or vscode does not fix this problem.

lsahn-gh commented 6 years ago

Replace the path with /usr/bin/bash or use the value which is showed with command, which bash.

parithy commented 5 years ago

this doesn't work due to the pseudo root file structure for the flatpak apps, I see home is bind mounted. need similar solution for using system commands

peteruithoven commented 5 years ago

A similar, but seemingly more informed discussion: https://github.com/flathub/com.visualstudio.code.oss/issues/5

ricvelozo commented 5 years ago

Edit the settings of shell, i.e:

"terminal.integrated.shell.linux": "flatpak-spawn",
"terminal.integrated.shellArgs.linux": ["--host", "bash"],
seongs1024 commented 4 years ago

Edit the settings of shell, i.e:

"terminal.integrated.shell.linux": "flatpak-spawn",
"terminal.integrated.shellArgs.linux": ["--host", "bash"],

Thanks, @ricvelozo. But there are some messages of bash...

bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

image

Do you know how can it be fixed?

ricvelozo commented 4 years ago

@seongs1024 You can ignore the messages or use faltpak-spawn for just the external tools, instead of full terminal.

noonsleeper commented 4 years ago

Edit the settings of shell, i.e:

"terminal.integrated.shell.linux": "flatpak-spawn",
"terminal.integrated.shellArgs.linux": ["--host", "bash"],

Thanks, @ricvelozo. But there are some messages of bash...

bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

image

Do you know how can it be fixed?

add export TERM=xterm to .bashrc or .zshrc

darkbasic commented 3 years ago

add export TERM=xterm to .bashrc or .zshrc

$TERM is already set but I still get the warning:

[niko@fedora server]$ echo $TERM
xterm-256color
vwalek commented 3 years ago

Try this.

    "terminal.integrated.defaultProfile.linux": "zsh",
    "terminal.integrated.profiles.linux": {
        "zsh": {
          "path": "/usr/bin/env",
          "args": ["--", "flatpak-spawn", "--host", "--env=TERM=xterm-256color", "zsh"]
        }

The same works for bash

    "terminal.integrated.defaultProfile.linux": "bash",
    "terminal.integrated.profiles.linux": {
        "bash": {
          "path": "/usr/bin/env",
          "args": ["--", "flatpak-spawn", "--host", "--env=TERM=xterm-256color", "bash"]
        }    
FossPrime commented 3 years ago
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

This was caused by me using an abandoned version of code-oss

sudo flatpak remove com.visualstudio.code.oss
sudo flatpak install flathub com.visualstudio.code-oss
FossPrime commented 3 years ago

Try this.

    "terminal.integrated.defaultProfile.linux": "zsh",
    "terminal.integrated.profiles.linux": {
        "zsh": {
          "path": "/usr/bin/env",
          "args": ["--", "flatpak-spawn", "--host", "--env=TERM=xterm-256color", "zsh"]
        }

The same works for bash

    "terminal.integrated.defaultProfile.linux": "bash",
    "terminal.integrated.profiles.linux": {
        "bash": {
          "path": "/usr/bin/env",
          "args": ["--", "flatpak-spawn", "--host", "--env=TERM=xterm-256color", "bash"]
        }    

Does not work on Debian Buster... Screenshot 2021-06-23 12 15 22

vwalek commented 3 years ago

@rayfoss - I think that's problem with "flatpak-spawn" and not the linux profile. I wouldn't say it is major issue, just annoying message. It shouldn't affect the bash. Do you see prompt after the message?