-1

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

1 Answers1

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.

Milliways
  • 62,573
  • 32
  • 113
  • 225