favicon here hometagsblog

VSCodium Flatpak on openSUSE Aeon

#workflow #container #aeon #kalpa #flatpak

Soc Virnyl Estela | 2023-07-14 | updated: 2023-07-15 |reading time: ~3min

Prerequisites§

To start, you must have an immutable linux desktop distribution such as openSUSE Aeon. In this short post, I will explain how to set up VSCodium Flatpak in an immutable linux desktop. Some of the steps can be imitated to other immutable distros such as Fedora Silverblue and VanillaOS.

Reason§

There are ongoing issues and questions amongst Linux users and skepticisms regarding the usability of immutable desktops and the push for an all flatpak (or snap, if you prefer that,) immutable desktop distribution.

This post, however, only debunks misinformation of how to use VSCodium Flatpak (or even VSCode Flatpak) properly in this kind of system.

The Guide§

Setting up Flatpak§

openSUSE Aeon already has flatpak set up out of the box but it's system-wide. If you prefer user-wide installations, you can do:

flatpak --user remote-add \
        --if-not-exists flathub \
        https://dl.flathub.org/repo/flathub.flatpakrepo

Installing VSCodium Flatpak§

Assuming you use openSUSE Aeon, you can install VSCodium Flatpak through GNOME Software. If you love to use the CLI, you can do the following:

User-wide install§

flatpak --user install com.vscodium.codium

System-wide install§

flatpak install com.vscodium.codium

Then install Open-Remote-SSH Plugin for VSCodium - https://github.com/jeanp413/open-remote-ssh.

Setting up distrobox§

openSUSE Aeon comes with distrobox out of the box 😜

Distrobox is a podman frontend much like toolbx. I prefer distrobox because it's way more flexible in my experience.

To create my own container, I run the following command

distrobox-enter tumbleweed

This will create a podman container named as "tumbleweed". I advise you to set a custom HOME directory though. You can do that by using the command

distrobox-create -n tumbleweed -H somedir/you/really/want/to/set/as/HOME/for/that/container

For more information, check out the documentation at https://distrobox.privatedns.org/usage.

Setting up SSH and SSHD in your container§

After entering your container (here we use "tumbleweed"), do


sudo /usr/sbin/sshd-gen-keys-start
# assuming you have vim installed in the podman container
# I use vim here
sudo vim /etc/ssh/sshd_config

Then add the following to your /etc/ssh/sshd_config in that container

Port 10000
ListenAddress localhost
PermitEmptyPasswords yes
PermitUserEnvironment yes
X11Forwarding yes

Next, run the sshd command like so

sudo /usr/sbin/sshd

Make sure the container is running during all of your sessions. Distrobox does it by default.

Then in your host system, edit ~/.ssh/config with the following content

Host tumbleweed
  HostName localhost
  Port 10000

Finally, use your Open-Remote-SSH plugin in VSCodium to connect to that container and set up your development environment!

Conclusion§

Setting up VSCodium flatpak is complicated but not that hard as long as you are familiar with how containers work and how to choose the right plugins. I believe that a development environment that is mostly SSH-ing to containers bring benefits that outweighs its disadvantages:

  • clean base system; install dev dependencies in the container
  • throw the container away to start fresh if desired
  • allows developers to install only the necessary stuff on their base system
  • encourages the use of flatpaks, a universal distribution/packaging format
  • explores possibilities of making immutable desktops as a viable development environment

Articles from blogs I follow around the net

Perma-Vuln: D-Link DIR-859, CVE-2024-0769

Recently Sift caught an interesting payload. As it turns out, the exploit was CVE-2024-0769, which is now tagged here: D-Link DIR-859 Information Disclosure Attempt . This vulnerability is a path traversal leading to information disclosure. But, perhaps mo…

via GreyNoise LabsJune 25, 2024

Synergy Greg

Synergy Greg would like to see you in His office, it is the one down the hall, past the cubicles and dreary faces, uplifted only when He deigns to venture forth. You will know Him when you see Him, He is the one composed, of a thousand writhing forms,…

via LudicityJune 22, 2024

Status update, June 2024

Hi all! This status update will be shorter than usual because I had a lot less free time for my open-source projects than usual this month. Indeed, I recently joined SNCF Réseau (the company responsible for the French railway infrastructure) to work on OSR…

via emersionJune 18, 2024

Why People are Angry over Go 1.23 Iterators

NOTE: This is based on, but completely rewritten, from a Twitter post: https://x.com/TheGingerBill/status/1802645945642799423 TL;DR It makes Go feel too “functional” rather than being an unabashed imperative language. I recently saw a post on Twitter showi…

via Articles on gingerBillJune 17, 2024

My RSS feed has been upgraded ✨

I did some integration work to include posts written for other publications in my RSS feed. Apologies if you see some duplicated items! 📪

via Rob O'LearyJune 15, 2024

Programming at the edge with Fastly Compute

So you’ve heard about computing at the edge, and you’ve heard that Fastly let’s you run JavaScript, Go, Rust and any other language that compiles to Wasm at the edge… well, let’s take a look and while we’re at it let’s try and understand how caching works …

via Posts on integralistJune 12, 2024

Generated by openring-rs