VSCode on SteamDeck Bazzite

Overview of the underlying problem

In Bazzite and also the main SteamOS these are both 'read-only' operating systems. Now this is in name only as otherwise you wouldn't be able to persist obvious things like passwords etc, but the main core operating system itself is indeed locked to read-only.

This means that to install software you can't just install it normally using apt or yum, so to get around this both Bazzite and SteamOS supply the end user with the Software Management application 'Discover' with pointing to FlatPak repos.

So, that means that applications that a user installs are FlatPak versions, and to be fair this is absolutely fine, the FlatPak application will likely already ship with the various enabled settings it needs to expose the various permissions it requires out to the hosting operating system. A little more detail on that, these application installations are essentially containerised, so think 'like docker images'.

Now with thonny as a FlatPak, which is a simple to use IDE for Python and Micropython you can plug in a Raspberry Pico and it just works, but with vscode as a FlatPak for whatever reason, the micropico extension for it bounces off the security and privileges needed to access the Pico over serial USB. No amount of tweaking or playing with those permissions makes VSCode connect naturally to the Pico over serial USB (so to the /dev/ttyACM1 device).

I've played a fair amount with getting this to work, and had to resort to actually installing VSCode as an actual application, rather than as a containerised FlatPak.

Installation Steps

First off (and to be fair I don't know if this is needed or not, but certainly can't hurt) you need to add your user to the dialout group: fish sudo usermod -aG dialout $USER Next we need to apply the Microsoft Package key: fish sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-microsoft https://packages.microsoft.com/keys/microsoft.asc sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'

Then using rpm-ostree you can install VSCode properly as an available application.

fish sudo rpm-ostree install code

After that you will have a normally installed version of VSCode, so configure it to your initial liking (put that Primary Bar on the right, you heathen!) and now jump into Extensions, search and install micropico and you can directly program Pico's, too!