0

I have a Windows 10 PC (WinPC) connected directly to a Raspberry Pi (RPi) via Ethernet LAN. How can I connect to the RPi with an X11-enabled SSH session using Visual Studio Code?

In the following screenshot, you can see my Visual Studio Code on the WinPC, where I am already connected via Remote-SSH to the RPi. What should I type to check if X11 forwarding works?

enter image description here


WinPC:

  • Windows 10 Pro 22H2
  • Visual Studio Code 1.94.2

RPi:

  • Raspberry Pi 4 Model B Rev 1.1

  • PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

  • Linux raspberrypi 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux

3
  • 1
    Which Pi? What OS is installed (detail including version)?
    – Milliways
    Commented Oct 22 at 7:59
  • hey milliways, thanks for reply, i edited my question. best regards Commented Oct 22 at 8:18
  • Note that Win 11 can easily be set up to be an X11 server. Commented Nov 22 at 7:43

1 Answer 1

0

By default Raspberry Pi OS Bookworm DOES NOT use X11 but Wayfire (although X is used on older devices with insufficient memory but you can configure it to use X). raspi-config can show/change what is used.

The following script shows network system (but not protocol).

#! /bin/sh
# Check status of networking
checkactive () {
if [ $(systemctl is-active $1) = 'active' ]; then
    echo $1 'active'
fi
}
checkactive 'systemd-networkd'
checkactive 'dhcpcd'
checkactive 'NetworkManager'
checkactive 'wpa_supplicant'

echo
echo "Network devices"
ls /sys/class/net/

ps -e | grep X should show if X active.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.