Allow Flatpaks to Access Your SD Card With Flatseal


Flatpak is the main way to install apps on your Steam Deck. It’s an awesome system and there are tons of apps for you to install!

The problem is that Flatpak sandboxes your apps, using a fine-grained permission system, similar but much more advanced than what you might see on your smartphone OS.

Because of this, Flatpak apps might not have access to some resources on your Steam Deck. The most obvious example is an emulator like RetroArch or a game launcher like Heroic not being able to access your SD card. Don’t worry: there is a way to enable whatever permission you might need with the help of a simple app called Flatseal.

Install Flatseal

If you’ve installed other Flatpak apps already, this should be familiar: go to desktop mode, open up the Discover app center, search for Flatseal and install it.

Alternatively, from the terminal:

flatpak install com.github.tchx84.Flatseal

How to use it

Before starting up Flatseal, make sure the app you want to modify the permissions for is closed.

Once you open up Flatseal you’ll see the main window, showing a list of your apps on the left, and the permissions for the selected app on the right.

In the top right corner of the window you’ll notice a button labeled Reset. If you mess up anything while tinkering, select your app and press this Reset button, it will revert its permissions to the default values.

Let’s get started by selecting an app, for instance RetroArch.

There are lots of permissions here, and for this tutorial you shouldn’t care about most of them. What you should care about is the section labeled Filesystem. Scroll down in the right view until you find it.

To allow apps to read your SD card, as well as other external storage you might attach, like external drives, all you should need to do is give them permission to read and write the following path: /run/media.

To do so, in Other files, click on the Add folder icon on the right.

This will create a new row with a text entry, showing a yellow danger icon (similar to this: ⚠).

In this text entry, you should enter the following: /run/media:rw.

This allows the app to read and write to the /run/media folder, a system folder where your external drives are mounted.

Now you can open up your app, and you should be able to use your external drives like your SD card like normal. Let’s see a couple of examples. As an external drive I’ll be using a USB thumb drive called CARRY, the same applies for your Steam Deck SD card.

Example 1: RetroArch

I’ll put some ROMs on my external drive and access them from RetroArch. Once I set up the permission with Flatseal, I just open it up and select Import Content, then Scan Directory.

I can immediately see a list of directories RetroArch can access, among those there’s one called /run/media/gabmus.

In your particular case, you’ll see a folder called /run/media followed by your username. Select it.

As you can see my thumb drive called CARRY is listed right there. I can select it and then select <Scan This Directory> to add any games I have in this drive to my RetroArch.

Let’s move on to another example: the Heroic Games Launcher

Example 2: Heroic Games Launcher

I want to set my external drive as the default installation folder in Heroic. This way I can store my games there and save space in my internal drive.

Opening up Heroic, go to Settings, then look at the entry labeled Default Installation Path. Click on the folder icon on the right side of the entry.

This will open up a file selector dialog. You should see your external drive in the sidebar. Select it and you should be good to go.

That should be it for this tutorial, hopefully it will help you. If I missed anything or if something isn’t working right, make sure to let me know and I’ll try my best to figure it out and update this article.

Hey there!

I run this website without any ads and without tracking, because I love to share these little bits of knowledge and help people that are just starting out.

If you'd like to thank me, or you'd like this work to be sustainable and continue on in the future, consider sending a donation via Liberapay. Thank you!

Hide this message

Enter your instance's address

More posts like this

RPCS3: PS3 Games on Your Deck

2022-03-19 | #app #emulator #flatpak #playstation #ps3 #rpcs3 #sony #tutorial

Continuing the trend of emulator tutorials, today we’ll look at RPCS3, an emulator for the PlayStation 3. Let’s get started with the installation. Install RPCS3 Installing RPCS3 is really easy by using Flatpak. Go to desktop mode, open up the Discover app center, search for RPCS3 and install it. Alternatively, you can run this command in the terminal: flatpak install net.rpcs3.RPCS3 Configuring RPCS3 Opening up RPCS3, we’ll be greeted by this window:

Continue reading 

Play Retro Games on Steam Deck With RetroArch

2022-03-18 | #app #emulator #flatpak #retroarch #tutorial

Retro gaming is hugely popular these days, and playing your old games on the go on the Steam Deck is a very attractive idea. Today we’ll take a look at RetroArch, an all in one solution for emulating your old games from different consoles of yesteryear. Install RetroArch RetroArch can be installed directly through Steam, although from what I understand the version that’s on Steam is not on par with other releases.

Continue reading 