How to setup development environment on Steam Deck

Steam Deck is not released officially in my country, but thanks to my old friend, I could get one in my hand a few days ago.

I love gaming, but I’m also in love with almost every device which is running on Linux.

So I wanted to test if it could be a nice development envirionment, especially for programming languages and tools I prefer.

My questions were like:

  • Can I install neovim and its plugins on Steam Deck?
  • Can I install asdf-vm and several programming languages with it?
  • With the things above, is it possible to do ‘productive’ tasks in desktop mode?

Answers to these questions?

Spoiler alert: Yes, I can be productive in Steam Deck!


Preparation

Steam Deck’s root file system is protected as read-only.

For installing and tweaking things on it, it needs to be unlocked.

First, I had to change password in Konsole:

$ passwd

and then turn the protection off with:

$ sudo steamos-readonly disable

Also I had to do following for using pacman:

$ sudo pacman-key --init
$ sudo pacman-key --populate archlinux
$ sudo pacman -Syu base-devel

Install asdf-vm

asdf-vm is a kind of ‘version manager’ for various programming languages and tools.

There are many guides for installation, but on Steam Deck:

$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2

was the most handy way for me.

My favorite thing of asdf-vm is that all the files managed by it are saved under $HOME/.asdf/ directory.

Steam Deck’s SteamOS is known to wipe out personal changes on OS updates.

It is originally built for gaming, so I’m okay with that; but the files in home directory (including installed games) are not wiped out across OS updates, so all the files installed by asdf-vm will be preserved unless I make up my mind to reinstall the OS.

Profit!

Install programming languages

Now with asdf-vm, I could install my favorite programming languages.

With a .tool-versions file (mine for example) placed in the home directory:

# golang
$ asdf plugin golang
$ asdf install golang

# janet
$ asdf plugin add janet
$ asdf install janet

# rust
$ asdf plugin add rust
$ asdf install rust

installed programming languages with specific versions.

Install Neovim

neovim is my daily driver for writing things.

It can be compiled from source files, or installed with asdf-vm:

$ asdf plugin add neovim
$ asdf install neovim

After installation, with my init.lua file, I could install plugins with :PackerSync.

Troubles

While installing janet and neovim plugins, I met errors complaining about missing header files like stdio.h and stdint.h.

Can stdio.h file ever be missing in Linux? How?

I searched for similar cases and found this article: Valve seems to delete some files from default packages for keeping the size of SteamOS fitted in 5GB.

So packages with missing header files needed to be installed again with:

$ sudo pacman -S glibc linux-api-headers

After this, errors were gone and I could get everything without any issue.


Wrap-Up

On-screen keyboard of SteamOS is not that comfortable for typing serious stuffs, so additional keyboards or mice would be needed for more productivity.

Docking stations like this thing might be useful, but I’ll keep it in my wishlist for now.

Anyway, my Steam Deck can be a gaming gear and also a development machine at the same time!