home tags blog microbio cv tech cv

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

Decrypting FortiOS 7.0.x

Introduction Decrypting Fortinet’s FortiGate FortiOS firmware is a topic that has been thoroughly covered, in part because of the many variants and permutations of FortiOS firmware, all differing based on hardware architecture and versioning — we may have …

via GreyNoise Labs April 23, 2024

Copyleft licenses are not “restrictive”

One may observe an axis, or a “spectrum”, along which free and open source software licenses can be organized, where one end is “permissive” and the other end is “copyleft”. It is important to acknowledge, however, that though copyleft can be found at the …

via Drew DeVault's blog April 19, 2024

What Precious Things Does The Corporate World Steal From Us?

It has been about a year and a half of working three days a week in response to burnout. It took me six months to regain the ability to do anything beyond resting the moment I was done working, and in the past year I have recovered much of my ability to fu…

via Ludicity April 15, 2024

Generated by openring-rs