Skip to content

[Feedback] How to run Visual Studio (VS) Code Remote over SSH on FreeBSD 13 and 14 - /en/blog/2024-06-14-how-to-run-visual-studio-vs-code-remote-over-ssh-on-freebsd-13-and-14/ #9

@stesser

Description

@stesser

Seems the instructions are incomplete, at least they did not work for me using vscode 1.92.2 on macOS as the client.

I have applied the following command in my ~/.vscode-server directory:

cd ~/.vscode-server 
find . -type f | xargs file | grep -w SYSV | cut -d: -f1 | xargs brandelf -t Linux

In addition to installing the devel/linux-rl9-libsigsegv port, I have created the following symbolic link:

mkdir -p /compat/linux/usr/local/bin
cd /compat/linux/usr/local/bin
ln -s ../../../bin/bash .

Without that link, the RemoteShell option made SSH start the Linux bash, but then the FreeBSD bash was started from /usr/local/bin/bash and the installation of the vscode server failed since uname reported FreeBSD when invoked by the FreeBSD bash.

In settings.jsonI have added the following parameters:

    "remote.SSH.enableRemoteCommand": true,
    "remote.SSH.useExecServer": false,
    "remote.SSH.useFlock": false,

I'm not sure that all of those are required, but at least enableRemoteCommand is needed (else the RemoteShell option in ~/.ssh/config is ignored).

After these additional steps I got the vscode server working on FreeBSD-CURRENT - thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions