VSCodium / vscodium

binary releases of VS Code without MS branding/telemetry/licensing
https://vscodium.com
MIT License
25.43k stars 1.1k forks source link

Problem with terminal, especially zsh #1980

Open IvanIsak2000 opened 3 months ago

IvanIsak2000 commented 3 months ago

Hello!

My question: how can I set zsh terminal as default Vscodium terminal? I try many times to set it, but it's hell not working.

Inforation: image

My settings.json:

{
    "files.autoSave": "afterDelay",

    "gopls": {
        "ui.semanticTokens": true
      },
    "go.useLanguageServer": "explicit",
    "go.languageServerFlags": [],
    "go.toolsManagement.autoUpdate": "explicit",

    "cSpell.language": "en,ru",
    "files.exclude": {
      "**/*.pyc": {"when": "$(basename).py"}, 
      "**/__pycache__": true,
      "**/.venv":true,
      "**.idea":true,

    },
    "flake8.ignorePatterns": [
      "E501"
    ],
    "flake8.args": [
      "--max-line-length=120"
   ],
    "security.workspace.trust.untrustedFiles": "open",
    "editor.minimap.size": "fill",
    "editor.minimap.showSlider": "always",
    "git.autofetch": true,
    "git.openRepositoryInParentFolders": "never",
    "[python]": {
      "diffEditor.ignoreTrimWhitespace": true
    },
    "files.associations": {
      "*.py": "python"
    },
    "editor.stickyScroll.enabled": false,
    "interactiveWindow.executeWithShiftEnter": true,
    "gigacode.inlineColor": "pink",
    "workbench.colorCustomizations": {
      "editorGhostText.foreground": "#FF47E9"
    },
    "gigacode.common.wholeLineCompletion": false,
    "editor.suggest.showStatusBar": true,
    "workbench.colorTheme": "Default Dark+",
    "git.suggestSmartCommit": false,

    "terminal.integrated.profiles.linux": {
        "zsh": {
            "path": "/usr/bin/zsh",
            "args": [],
            "icon": "terminal-zsh"
        }
    },
    "terminal.integrated.defaultProfile.linux": "zsh",
    "terminal.external.linuxExec": "zsh"

}

It is definitely setted as zsh, but when I click New terminal I can select only two terminal's profiles: image

How is working?

intact commented 3 months ago

Is that path "/usr/bin/zsh" really OK? (you can try to run something like which zsh)

IvanIsak2000 commented 3 months ago

Is that path "/usr/bin/zsh" really OK? (you can try to run something like which zsh)

Answer from standard terminal:

➜  ~ which zsh
/usr/bin/zsh

Answer from Vscodium:

sh-5.2$ which zsh
which: no zsh in (/app/bin:/app/bin:/app/bin:/usr/bin:/home/iwan/.var/app/com.vscodium.codium/data/node/bin:/home/iwan/.var/app/com.vscodium.codium/data/cargo/bin:/home/iwan/.var/app/com.vscodium.codium/data/python/bin:/home/iwan/.var/app/com.vscodium.codium/data/gem/ruby/3.2.0/bin)
daiyam commented 3 months ago

.var/app so it seems to be sandboxed by flatpak.

Desktop (please complete the following information):

IvanIsak2000 commented 3 months ago

.var/app so it seems to be sandboxed by flatpak.

Desktop (please complete the following information):

  • OS: [e.g. Mac OS, Ubuntu 20.04, etc]
  • Architecture [e.g. x64, ia32, arm64]
  • Version [e.g. 1.33.0]
  • App Manager [e.g. Winget, Homebrew, Snap, AUR, RPM, Nix, ...]
  • Sandboxed [e.g. no, Flatpak, Snap]

Version: 1.91.1 Release: 24193 Commit: 8512cb3341b26a5dba985a9a17eed8d7c3362886 Date: 2024-07-11T18:37:10.462Z Electron: 29.4.0 ElectronBuildId: undefined Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Linux x64 6.9.10-arch1-1 Sandboxed: flatpak installed

firefoxic commented 1 month ago

This solution worked for me:

  1. Install host-spawn, e.g. sudo dnf install host-spawn
  2. Add this lines to codium settings.json:
    {
    "terminal.integrated.defaultProfile.linux": "zsh",
    "terminal.integrated.profiles.linux": {
        "zsh": {
            "path": "/app/bin/host-spawn",
            "args": ["zsh"],
            "icon": "terminal-bash",
            "overrideName": true
        }
    }
    }

    image