Skip to content
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

use of --init-file prevents ~/bash.rc executing #9086

Closed
rbtcollins opened this issue Oct 9, 2023 · 2 comments
Closed

use of --init-file prevents ~/bash.rc executing #9086

rbtcollins opened this issue Oct 9, 2023 · 2 comments
Assignees

Comments

@rbtcollins
Copy link

Type: Bug

  1. disable 'terminal->integrated : inherit env to avoid vscode altering the login shell and breaking goenv / pyenv and other such tools

  2. connect to a remote ssh host

  3. start a shell

  4. customisations from ~/.bashrc have not been applied.

  5. look at ps fax and observe
    144050 pts/0 Ss 0:00 | _ /usr/bin/bash --init-file /home/robertc/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh

  6. inspect that script, which has a buggy implementation of bash init-file handling (buggy in that it runs either .profile or .bashrc, never both - which is not how bash operates

  7. file a bug

Reproduction aside, what I would like is for my shell setup - which is not strange or exotic - to work under vscode.

Symptoms: commands are not found in a terminal within vscode, until I start a nested shell that will cause ~/.bashrc to be sourced.

Extension version: 0.106.5
VS Code version: Code 1.83.0 (e7e037083ff4455cf320e344325dacb480062c3c, 2023-10-03T16:12:16.321Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Remote OS version: Linux x64 6.2.0-1014-azure
Remote OS version: Linux x64 5.13.0-52-generic

System Info
Item Value
CPUs AMD Ryzen Threadripper 2990WX 32-Core Processor (64 x 2994)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 127.87GB (21.19GB free)
Process Argv --crash-reporter-id d9f3c32e-60ca-4766-805a-fb437a111084
Screen Reader no
VM 0%
Item Value
Remote SSH: cognite-lifeless
OS Linux x64 6.2.0-1014-azure
CPUs AMD Ryzen Threadripper 2990WX 32-Core Processor (32 x 2994)
Memory (System) 61.30GB (58.33GB free)
VM 0%
Item Value
Remote SSH: tr2vm
OS Linux x64 5.13.0-52-generic
CPUs AMD Ryzen Threadripper 2990WX 32-Core Processor (64 x 2994)
Memory (System) 15.63GB (8.50GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627cf:30244335
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30856252
vscaat:30438848
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
282f8724:30602487
f6dab269:30613381
vscrp:30673768
showlangstatbar:30737416
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxptcf:30805731
pythonnoceb:30805159
copilotsettingc:30839828
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30821572
pythonmhint1:30842940
dsvsc015:30845448

@github-actions github-actions bot added the ssh Issue in vscode-remote SSH label Oct 9, 2023
@roblourens roblourens removed the ssh Issue in vscode-remote SSH label Dec 18, 2023
@meganrogge
Copy link

Disabling shell integration will likely fix this with terminal.integrated.shellIntegration.enabled : false

@Tyriar
Copy link
Member

Tyriar commented Dec 19, 2023

inspect that script, which has a buggy implementation of bash init-file handling (buggy in that it runs either .profile or .bashrc, never both - which is not how bash operates

AFAIK the script is working correctly here, profile runs on login shell (ie. OS login on Linux), rc runs in an interactive shell (ie. most terminals). You might be having problems with the fact that the remote windows don't run the profile when creating the server? #1671

@microsoft microsoft locked and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants