Steam Deck

Steam Deck

saorsa Jan 20, 2023 @ 9:54am
2
Guide: Enhancing the desktop experience
Introduction.

While Valve has made some considerable progress with the Steam Deck within the last year of being available for purchase, some may feel that the desktop experience has fallen short of its mark in comparison to contemporary Linux distributions. That is fine as Valve never set out to design or market SteamOS with multipurpose use in mind. Today we will explore a few options available to expand our capabilities in desktop mode to enhance the user experience.

Pre-configuration.

Before we proceed onward, ensure that you have already set a password for the root and deck accounts. Pull up Konsole and follow the instructions below on how to do so if you haven't already.

(deck@steamdeck ~)$ passwd Changing password for deck. New password: Retype new password: passwd: password updated successfully

The password will appear blank when typed but it is being registered. When finished run sudo -s and do the same for the root password then exit when finished.

(deck@steamdeck ~)$ sudo -s [sudo] password for deck: (A)(root@steamdeck deck)# passwd New password: Retype new password: passwd: password updated successfully (A)(root@steamdeck deck)# exit exit (deck@steamdeck ~)$

Getting started.

Now we've got that out of the way we can get to the fun stuff. Double-check that you are not root before copying and pasting everything from the code block below into Konsole.

echo Installing Distrobox and Podman for the containierization environment. curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- --prefix ~/.local curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/extras/install-podman | sh -s -- --prefix ~/.local echo Appending the nessessary paths to .bashrc recognize distrobox. echo " " >> ~/.bashrc echo "#Distrobox Configuration." >> ~/.bashrc echo "export PATH=$HOME/.local/bin:$PATH" >> ~/.bashrc echo "export PATH=$HOME/.local/podman/bin:$PATH" >> ~/.bashrc echo "xhost +si:localuser:$USER" >> ~/.bashrc

The forum's formatting is being difficult for one particular section so I have provided it in a Pastebin[pastebin.com]. Just copy and paste everything from there into your terminal then continue along with the rest.

echo Creating a containerized Arch Linux environment on SteamOS. distrobox-create -i docker.io/library/archlinux:latest -I -n Arch distrobox-enter -n Arch -- 'sudo pacman -S nano xorg-xhost --needed base-devel'

Entering the above commands into a terminal installs Distrobox[github.com] and podman[podman.io] to the .local folder in your home directory. Distrobox is a set of shell scripts that we will be using for the management and integration of our containers. Podman[wiki.archlinux.org] is the containerization[www.ibm.com] software that Distrobox leverages as a backend to create Linux Distributions within a containerized environment. As Distrobox was designed to be used on Linux distributions with read-write permissions, a few workarounds are required to enable our terminal to recognize the collection of shell scripts provided by Distrobox in /home/deck/.local/bin/ as valid commands.

By creating the two new folders and a file within .config and appending the file with the path listed above we can set an environment variable within KDE Plasma to automatically load the path whenever we log in to desktop mode. The two entries written to the .bashrc are what automatically loads the variable and allow GUI applications to be used from desktop shortcuts. The final two commands create the container with our Linux distribution of choice then load into said container automatically running Pacman to install two important packages.

Congratulations, you now have an Arch Linux environment running beneath SteamOS! You can install and run native packages within the container as you normally might on any other typical Linux distribution. The container itself doesn't have to be Arch Linux either if you prefer using Ubuntu or another distribution. Simply switch out the container image[github.com] for one you prefer and install the equivalent package for xhost from that Linux distribution's repository.

Packages installed in the container may be accessed from your desktop by running the command distrobox-export --app and the name of the package you wish to use. Due to their containerized nature, these packages cannot be used as non-steam games in gaming mode. To get around that, simply create a script from the template below and include your desired package between the apostrophes as shown in the example.

#!/bin/sh export PATH=${PATH}:/home/deck/.local/podman/bin:/home/deck/.local/bin xhost +si:localuser:$USER gamescope -W 1280 -H 800 -b -- distrobox-enter -n Arch -- 'dolphin-emu &U'

This will launch the desired application from within the container in Game Mode through Gamescope. The resolution may start with some jank until you enter fullscreen but is otherwise comparable to a package natively installed with very little overhead. Though for the sake of continuity and keeping with the theme of extending SteamOS' capabilities we will continue to use our Arch Linux environment as the example. But what if you wanted to do the opposite? For those who aren't afraid of living on the wild side, they can use the script[gist.github.com] below to launch desktop mode inside game mode. Fair warning though, it may cause some instability on your system under certain circumstances but is otherwise useful for smaller tasks that may require one.

#!/bin/sh # Remove the performance overlay, it meddles with some tasks unset LD_PRELOAD ## Shadow kwin_wayland_wrapper so that we can pass args to kwin wrapper ## whilst being launched by plasma-session mkdir $XDG_RUNTIME_DIR/nested_plasma -p cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper #!/bin/sh /usr/bin/kwin_wayland_wrapper --width 1280 --height 800 --no-lockscreen \$@ EOF chmod a+x $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper export PATH=$XDG_RUNTIME_DIR/nested_plasma:$PATH dbus-run-session startplasma-wayland rm $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper

Recommended optimizations.

Now that we have the environment all set up and raring to go, it's about time we get to install a few useful utilities. First; the Chaotic Arch user Repository[aur.chaotic.cx]. Chaotic-AUR is a useful repository that provides pre-built binaries for popular packages found within the Arch User Repository. This may prove to be tremendously helpful by reducing the resource usage and battery drain that typically comes with compiling a package from source. To set it up, make sure to double-check that you are still in your container before continuing.

  1. sudo pacman-key --init
  2. sudo pacman-key --recv-key FBA220DFC880C036 --keyserver keyserver.ubuntu.com
  3. sudo pacman-key --lsign-key FBA220DFC880C036
  4. sudo pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst' --noconfirm
  5. sudo sed -i "88i \#[multilib-testing]" "/home/deck/Desktop/test.sh"
  6. sudo sed -i "89i \#Include = /etc/pacman.d/mirrorlist" "/home/deck/Desktop/test.sh"
  7. sudo sed -i "90i \ " "/home/deck/Desktop/test.sh"
  8. sudo sed -i "91i \[multilib]" "/home/deck/Desktop/test.sh"
  9. sudo sed -i "93i \Include = /etc/pacman.d/mirrorlist" "/home/deck/Desktop/test.sh"
  10. sudo sed -i "94i \ " "/home/deck/Desktop/test.sh"
  11. sudo sed -i "95i \[chaotic-aur]" "/home/deck/Desktop/test.sh"
  12. sudo sed -i "96i \Include = /etc/pacman.d/chaotic-mirrorlist" "/home/deck/Desktop/test.sh"
  13. sudo sed -i "97i \ " "/home/deck/Desktop/test.sh"
  14. sudo pacman -Syyu --noconfirm

In the commands above we initialize Pacman as it isn't done by default then add and sign a new key for the repository we're adding. Pulling from their repository, we install the chaotic-keyring package necessary for validating the authenticity of packages from the repository then add two new repositories before finally refreshing the repositories and updating the system.

Note: The multilib repository won't by listed by default in the container. We recommend adding it alongside the chaotic AUR as I have done in the above example for package compatibility. Now that we have everything properly configured, we can go about performing a full system update to refresh the repositories with sudo pacman -Syyu. After which, you should be able to install select packages from the AUR with Pacman instead of Yay or Paru. Though you may encounter a package that isn't available on the Chaotic-AUR so it may be best to keep one handy.

sudo pacman -S yay sudo pacman -S paru

Now, what if you aren't keen on using a command line for an extended period of time? f you've gotten this far then you could probably stand to learn a thing or two by sticking around. Though if that just isn't your bag then you can grab Octopi from the AUR.

sudo pacman -S octopi

Octopi is a graphical user interface for the management of packages on Arch Linux. While there are better alternatives, Octopi is less prone to cause instability and has a better track record[manjarno.snorlax.sh] than the developers of Pamac.

Finishing up.

Hopefully, my novel insight into distrobox[github.com] and shell scripting can help more people leverage the power of their Steam Deck until Valve can address some of the issues of using SteamOS as a read-write operating system. There are plenty of other cool Steam-deck-related tools or solutions out there that I would've loved to showcase and cover in-depth, though for the sake of the guide I wanted to stick with something light that doesn't require any modification made to your file system.

Cheers for reading, and have a good one. o/

Resources.

Distrobox command documentation.[github.com]
Passwords and user groups.[wiki.archlinux.org]
What is root?[wiki.archlinux.org]
Familiarising yourself with Sudo.[wiki.archlinux.org]
Arch Linux overview.[wiki.archlinux.org]
How the desktop mode script came about.
Containerization 101.[www.ibm.com]
Podman, the backbone of Distrobox.[wiki.archlinux.org]
Package management and Pacman.[wiki.archlinux.org]
Xhost, what is it?[wiki.archlinux.org]
The Arch User Repository, it is probably best you read before using it.[wiki.archlinux.org]
Tools to help with navigating and using the Arch User Repository.[wiki.archlinux.org]
An introduction to Octopi.[tintaescura.com]
Chrooting 101.
Chrooting with Arch Linux on SteamOS.
Drawbacks of chrooting.[github.com]

Related threads.
Suggestions and opportunities for future versions of SteamOS.
jupiter-hw-support is borked on non-SteamOS distributions.
Better 'Desktop Mode' intergration with SteamOS.
Enable posting to the "guides" section.
Switching from SteamOS.
Steam Deck: The handheld of missed opportunities.


Curation Notice.
The following guide is currently out-of-date and will eventually be replaced with a new guide focused on extending SteamOS for intermediate to advanced users and Linux hobbyists. The material of the guide may still hold relevancy, but please use updated instructions whenever prompted.

Last edited by saorsa; Feb 21, 2024 @ 9:54am
< >
Showing 16-20 of 20 comments
saorsa May 27, 2023 @ 5:16pm 
Originally posted by Ben Bernanke:
I tried to do this today. It didn't work for me.

The script or set of commands I wrote for the guide is somewhat out of date. I've been meaning to update the shell script I made based on the guide with fancier syntax so I'll probably get around to updating this guide likewise once I've done that.
RueGorE Feb 20, 2024 @ 8:26pm 
I was able to power through getting things going despite this being somewhat out of date. I've got a working Arch container in Distrobox now as well as the Chaotic-AUR, although those sed commands seemed to do nothing (?) so I skipped them. Fwiw, I didn't even have a test.sh file on the Desktop.

Now that Arch is running, what are some recommended or must-have packages from the Chaotic-AUR? I'm still pretty new to this so I'm not sure what's useful from there to use on the Steam Deck.
Last edited by RueGorE; Feb 20, 2024 @ 8:30pm
tfk Feb 20, 2024 @ 10:30pm 
In my book there should always be room for feedback. No trolling and hate spreading, that isn't helpful at al. But feedback can help valve in their further development.

It is always good to write feedback from a data perspective. And leave feelings out. This way it is much more clear what the real issue is and how it should work from the user perspective.

Thanks for this guide.
saorsa Feb 21, 2024 @ 10:21am 
Originally posted by RueGorE:
I was able to power through getting things going despite this being somewhat out of date. I've got a working Arch container in Distrobox now as well as the Chaotic-AUR, although those sed commands seemed to do nothing (?) so I skipped them. Fwiw, I didn't even have a test.sh file on the Desktop.

Now that Arch is running, what are some recommended or must-have packages from the Chaotic-AUR? I'm still pretty new to this so I'm not sure what's useful from there to use on the Steam Deck.

That part of the guide had been somewhat incorrect and included a path to a file I had been experimenting on for the guide. It is important though that you add the following below in the /etc/pacman.conf in order to add the Chaotic AUR as a repository, though.

#[multilib-testing] #Include = /etc/pacman.d/mirrorlist [multilib] Include = /etc/pacman.d/mirrorlist [chaotic-aur] Include = /etc/pacman.d/chaotic-mirrorlist

As for software to use, I've included a couple of suggestions below for privacy-respecting free and open source alternatives to the common software we use.


Twitter.
https://nitter.net
https://outerheaven.club

YouTube.
https://invidious.lunar.icu/feed/popular
https://piped.video
https://joinpeertube.org

Google Map.
https://openstreetmap.org

Reddit.
https://libreddit.kavin.rocks
https://teddit.pussthecat.org
https://join-lemmy.org

TikTok.
https://tok.artemislena.eu

Google Search.
https://startpage.com

Google Translate.
https://translate.metalune.xyz

Imgur, Image storage site.
https://pixelfed.org

Wikipedia.
https://wikiless.org

Discord, Guilded, etc.
https://chat.techsaviours.org
https://xmpp.org/about
https://www.jabber.org/faq.html#jabber
https://www.mumble.info/about

Microsoft Teams, Slack, Zoom, etc.
https://jitsi.riot.im
https://opentalk.eu/en

Microsoft Word, Pages, etc.
https://www.onlyoffice.com/en/download-docs.aspx?from=default#docs-community
https://www.libreoffice.org/download/download-libreoffice

Internet Browsers.
https://floorp.app/download (Firefox-based)
https://github.com/ungoogled-software/ungoogled-chromium (Chromium-based)
https://brave.com (Chromium-based)

Password Managers.
https://vault.bitwarden.com/#/register?layout=default
https://keepassxc.org/download/#linux

Emails.
https://mailfence.com/registration
https://app.tuta.com/login?noAutoLogin=true&keepSession=true
https://proton.me

Package Management.
https://christitus.com/steamdeck-as-a-desktop/
https://nix-community.github.io/home-manager/index.xhtml#sec-install-standalone

Privacy guides.
https://www.privacyguides.org/en/about
https://thenewoil.org/en/about

Emulation.
https://www.emudeck.com

Useful services.
https://joinmobilizon.org/en/#what-is-mobilizon
https://joinbookwyrm.com
https://cryptpad.org/about
https://microbin.eu
https://vikunja.io
RueGorE Feb 21, 2024 @ 2:01pm 
Originally posted by Falaichte:
That part of the guide had been somewhat incorrect and included a path to a file I had been experimenting on for the guide. It is important though that you add the following below in the /etc/pacman.conf in order to add the Chaotic AUR as a repository, though.

#[multilib-testing] #Include = /etc/pacman.d/mirrorlist [multilib] Include = /etc/pacman.d/mirrorlist [chaotic-aur] Include = /etc/pacman.d/chaotic-mirrorlist

Ah, I see. Thanks for the clarification. As it's been some time, I didn't expect a reply back so soon.

For anyone else following the guide to setup Distrobox, you absolutely need to refer to the Distrobox github repository as the rootless install instructions have changed. It's not that big of deal really, but worth noting the instructions above are outdated obviously.

Since my interest is more focused on things that would benefit the gaming experience and desktop usability, nearly all of those software suggestions don't do it for me, but they may for others so thank you for taking the time to compile a nice list. I'll be on the lookout for other interesting software.
< >
Showing 16-20 of 20 comments
Per page: 1530 50

Date Posted: Jan 20, 2023 @ 9:54am
Posts: 20