reCAPTCHA WAF Session Token
Programming Languages

How to Transfer Game Builds to a Steam Deck

The Steam Deck is a handheld gaming computer developed by Valve that runs SteamOS, a special flavor of Arch Linux. The open nature of the Steam Deck makes it easy to target for when creating games and applications, much more so than any console out there. Of course, you can’t hook up a USB cable like you would with an Android or iOS device and expect to transfer files that way.

My aim with this tutorial is to show you how you can push your game builds to your Steam Deck fast and automatically. In this tutorial, you’ll discover:

  • The different options for transferring files to a Steam Deck.
  • How to start and set up Desktop Mode.
  • The steps required to install and set up Syncthing
  • A workflow to copy files over your local network.
  • How to run Linux and Windows game builds on the Steam Deck.

Materials Download

The materials for this tutorial are optional. You can download them at the top or bottom of this page. They contain two project builds to test gamepad input I created with Godot. One of the builds is for Linux, while the other is for Windows. You can use these to test out how to run your own Linux and Windows executables on the Steam Deck if you don’t have any of your own yet.

Getting Started

As a game developer you want to iterate fast, so you’ll probably run the game on your desktop PC or laptop while developing. When targeting a device like the Steam Deck, or any device with lower specifications for that matter, it’s crucial to test your game builds on the device itself. Doing so helps you identify specific issues and optimize the game for the hardware it’s going to run on.

Of course, you’re going to need some way of transferring the game files to the Steam Deck. I’ve tried a lot of options out there and I’ll briefly share my thoughts on each of these before giving my recommendation:

  • USB Drive: I’m sure most of us have a USB flash drive or an external HDD/SSD laying around. This one of slowest options by far as it involves plugging it into your development PC, transferring the files, plugging it into your Steam Deck, switching to desktop mode and finally copying the files over to the right place. What a slog!
  • Developing on the Steam Deck itself: By cutting out the “middle man”, you can develop your games on the Steam Deck itself, brilliant! In reality, for this option to be viable you need to attach a keyboard, a mouse and preferably an external display. Even then, most game engines require a lot of CPU and GPU power, even more so if you want 3D graphics. It might work, but a decent desktop PC will handle the development much better. However, if you want to develop on the go, this might be the option for you.
  • SCP/SFTP: Both SCP (Secure Copy Protocol) and SFTP (SSH File Transfer Protocol) are network protocols that use SSH (Secure Shell). These can copy files over a network, either via command line or via an application like WinSCP. This is a great option if you know what you’re doing, as you can remotely push files to the Steam Deck via SSH from your development machine, even via scripting. The downside is that you need to enable SSHD and secure it using a key, or remember to only start the service when you need to push files as the default settings are unsecure, leaving your Steam Deck open to potential attacks. If you want to go this route, I highly recommend reading through this guide.
  • Warpinator: Warpinator is a popular option for copying files over a local network to the Steam Deck as you can install it via the Discover Store. You can copy files from a Windows or Linux machine to the Steam Deck and vice-versa. I found this works fine most of the time, but if you’re a macOS user, you’re out of luck. Each transfer has to be manually started and confirmed on the other device, making it a bit tedious.
  • Syncthing: Its developers describe Syncthing as a continuous file synchronization program that synchronizes files between two or more computers in real time. For game development, this is the best option by far as it allows you to push new builds to a local folder and the application will take care of the rest. Once set up, you just have to make sure Syncthing is running and your Steam Deck is connected to the internet.

For most regular file transfers I recommend SFTP or Warpinator, while continuously changing data like game builds or save files benefit greatly from a synchronization application like Syncthing. The latter is powerful and versatile, as you can use it to make your own local cloud storage, sync saved games across devices and make backups in realtime.
In the next section I’ll explain how to switch to Desktop Mode on the Steam Deck and make it easier to work with before moving on to setting up Syncthing.

Desktop Mode

Under the hood, the Steam Deck is a fully-featured PC running SteamOS, Valve’s custom Linux distribution based on Arch Linux. The default interface where you select your games and change settings is called Gaming mode, and it’s optimized to focus all its horsepower towards efficiently running games. By switching to Desktop Mode, you can use your Steam Deck as a traditional PC with a KDE-based desktop.

On your Steam Deck, press the STEAM button at the lower left to open the menu screen. Next, select the Power option to open the Power menu. You can also hold down the Power button at the top of the Steam Deck to open the Power menu straight away.

Now select Switch to Desktop. This will close Gaming mode and load the desktop after a short while.

Switch to Desktop

You’ll now be greeted by a Linux desktop that looks similar to mine.

Desktop

Desktop Navigation

At this point I highly recommend to connect a mouse and keyboard, either via a USB-C hub or Bluetooth. If you don’t have those, or prefer not to connect any extra devices, you can navigate Desktop Mode with the Steam Deck’s controls:

  • Tap the touch screen to select UI elements and double-tap to open applications
  • Move your finger on the right touchpad to move the cursor around and press on it to perform a click
  • The left touchpad can be used as a scrollwheel by swiping up and down
  • Left-click using R2 and right-click using L2
  • Press the STEAM and X buttons together to bring up a virtual keyboard
  • Hold the Menu (≡) button to switch between desktop and gamepad controls

If this is the first time you’ve used a controller to navigate a desktop, it will feel awkward, but I assure you that you’ll get used to it. :]

Password Setup

I suggest setting up a password for your Steam Deck if you haven’t done so already. This allows you to run elevated commands in case you need to fix file and folder permissions down the line and it’s good practice in general for extra protection.
Click on the Steam Deck logo at the bottom left to open the application menu.

Application menu button

From there, hover over the System category and click on Konsole. This will open a terminal emulator, similar to the command shell on Windows or the Terminal on macOS.

System Konsole

In the Konsole window, type the following, followed by Enter:

passwd

Note: If you’re not using a keyboard, remember you can open the virtual keyboard by holding the STEAM button and pressing X.

This will prompt you to type a new password. There are no restrictions, so you can make it as simple or complex as you want. Just make sure it’s something you’ll remember and it’s not too long so it won’t be too much of a hassle when you need it.
Type your new password and press Enter. Next, type the same password a second time to confirm.

Change password

That’s it! From now on, you can use the password you set up to grant yourself sudo (superuser do) rights. This allows you to do all kinds of things like setting up external storage, adding plugins and tweak the desktop to your heart’s content. Most importantly in the context of this tutorial, it will allow you to fix file and folder permissions in case something goes wrong.

With your desktop ready to go, it’s time to download and set up Syncthing!

Syncthing Setup

The first step is to download Syncthing. There’s a Syncthing-GTK Flatpak version in the Discover store, but me and other users have reported issues with it, even more so if you’ve been playing around with the Steam Deck and installed Decky Loader like myself. The Flatpak version also has limited access to your filesystem, making it a pain to configure. For those reasons, you’ll be using the newest version from the official website, which comes with a web interface to set the application up.

Syncthing needs to set up on all devices that you want to transfer files between. First up is the Steam Deck.

Steam Deck Side Installation

Open your web browser of choice on the Steam Deck. If you don’t have a browser installed yet, click the Firefox icon in the taskbar to open the Discover store.

Firefox discover store

Now click the Install button at the top right to start the installation. After a short while, Firefox will be installed and the Install button will be replaced by a Remove and a Launch button. Click the Launch button to launch Firefox.

Launch button

With Firefox opened, navigate to Syncthing’s download page: https://syncthing.net/downloads. Next, scroll down to the Base Syncthing section.

Syncthing download page

Here you’ll see an overwhelming amount of download options, as Syncthing runs on just about anything, which is a good thing. :]For the Steam Deck, you’re going to need the first Linux option, 64-bit (x86-64). Go ahead and click that link to start downloading the tar.gz file.

Note: A tar file (short for Tape ARchive) packs files and folders into a single file. When this file is then compressed using an application like gzip, you get a tar.gz file, similar to a zip file.

x64 Syncthing Linux link

After the download is complete, click the folder icon at the top, next to the filename. This will open Dolphin, the KDE file manager in the Downloads folder. You can also manually open Dolphin and navigate to /home/deck/Downloads.

Download Folder button

You should now see the file you just downloaded.

Syncthing targz

To extract its contents, right-click the .tar.gz file and select Extract ▸ Extract archive here, autodetect subfolder.

Extract menu

This will create a new folder next to the tar file. You’ll now need to move its contents to a more appropriate location, so it’ll be easier to (auto) start later on.
Open the folder, select all files and folders and copy them to your clipboard. You can do this by dragging a rectangle over the files and folders, followed by right-clicking one of them and selecting Copy in the context menu. If you have a keyboard connected, you can press CTRL+A followed by CTRL+C instead.

Copy files and folders

Next, navigate to the Home folder by clicking the Home button on the left hand side, below Places.

Home button

Now create a new folder by right-clicking an empty space and selecting Create New ▸ Folder… in the menu.

Create New Folder

Name this new folder “Syncthing” and click OK to confirm.

Syncthing

To copy over the files, navigate inside the folder, right-click an empty space and select Paste 6 Items to paste your clipboard contents here. If you have a keyboard, feel free to press CTRL+V instead.

Paste items

With the files in place, double-click the syncthing executable to test if it starts correctly. A web browser window should open after a short while at the address 127.0.0.1:8384.

Syncthing in web browser

Great! Syncthing is now running in the background and can be set up further using its web interface, which is the next step.

Steam Deck Side Setup

You’ll need to change a few things on the Steam Deck to make it ready to accept file transfers. Up first is choosing whether you want to allow the usage reporting.

Usage reporting

It’s up to you to choose Yes or No here. The data will help the developers to improve Syncthing, but if you’re not comfortable with sharing your usage data, feel free to click No.
Now that you can access the full interface, click OK at he bottom left of the GUI Authentication reminder.

User authentication ok

If you’re running Syncthing on a shared device like a family computer, setting up a username and password can help safeguard your files from prying eyes. However, this isn’t necessary on the Steam Deck.
Next, remove the Default Folder by clicking on it, selecting Edit and clicking the Remove button at the bottom left. Confirm the deletion by clicking Yes in the pop-up window.

Remove folder

That’s all you need to do for Syncthing on the Steam Deck for now. Make sure to keep your Steam Deck nearby and leave the browser window open as you’ll need it later on in the tutorial. If you accidentally closed it, open a web browser and navigate to http://127.0.0.1:8384.

Auto Start Syncthing

In this optional section, I’ll explain how to make it so Syncthing automatically starts when you boot your Steam Deck, even in Gaming mode. The application hardly uses any system resources, so the impact while gaming will not be noticeable unless you’re playing an online game while syncing a huge amount of files. You can disable the auto starting or temporarily stop Syncthing via the terminal at any time.

Feel free to skip to the next section if you don’t want Syncthing to be running in the background or don’t want to bother setting that up now.

Note: The steps here will be a bit more advanced and involve manipulating files and executing terminal commands. I strongly recommend hooking up a keyboard and mouse for this part. Consider opening this tutorial in a web browser on your Steam Deck for easy copy-pasting.

To make Syncthing run after the system boots, it needs to be set up as a systemd service. Systemd is a popular Linux initialization system and service manager that provides system components for Linux operating systems like Ubuntu and SteamOS. It allows services to be set up using a systemd service file that contains information on what process to start. Systemd parses this file at startup and creates and supervises the process. In short, you need to tell systemd what to do by supplying a file with some information.

Luckily, Syncthing comes with a template systemd service file you can use. Open Dolphin and open the Syncthing folder. From there, open the etc/linux-systemd/user folder, inside of which is a single file named syncthing.service.

Syncthing service file

Double-click the file to open it in Kate (the KDE text editor) and find the ExecStart line in the [Service] section.

Exec start

This is the command that systemd will execute at startup. Right now it points to /usr/bin/syncthing, but it needs to point to the syncthing executable in the Syncthing folder you created earlier. To do that, replace this line:

ExecStart=/usr/bin/syncthing serve --no-browser --no-restart --logflags=0

With this:

ExecStart=/home/deck/Syncthing/syncthing serve --no-browser --no-restart --logflags=0

Save the file by pressing the Save button at the top or press CTRL+S and close Kate.
To make systemd use this file, you need to copy it to the systemd user folder. The easiest way of doing this is via the terminal, so switch to Dolphin and make sure you’re still in this folder: /home/deck/Syncthing/etc/linux-systemd/user/. Next, right-click on an empty space in the folder and select Open Terminal Here to open a Konsole window.

Open terminal here

To copy the syncthing.service file to its proper location, execute the following command:

cp syncthing.service ~/.config/systemd/user/syncthing.service

Verify that the file copied over successfully by running this command:

ls ~/.config/systemd/user/

The ls commands lists the contents of a folder, which should now contain syncthing.service:

Syncthing file ls

As a final step, enable the syncthing service by running this command:

systemctl --user enable syncthing.service

This in turn will return with this line:

Created symlink /home/deck/.config/systemd/user/default.target.wants/syncthing.service → /home/deck/.config/systemd/user/syncthing.service.

Congratulations, from now on Syncthing will start automatically whenever you boot your Steam Deck!
If you ever need to temporarily stop the service for some reason, you can do so with this command:

systemctl --user stop syncthing.service

If you ever want to disable the service, which prevents the automatic starting, use this command:

systemctl --user disable syncthing.service

Leave Syncthing running for now as you’ll need it further down.

PC Side Installation

Now that Syncthing is set up on your Steam Deck, switch over to your development machine. Just like on the Steam Deck, you’ll need to download the application and set it up.
Start off by opening a web browser and navigate to https://syncthing.net/downloads. Since your development machine can be running any operating system, here are my recommendations for what package to download depending on your OS:

  • Windows: Download and install SyncTrayzor, this is a wrapper for Syncthing that includes a desktop interface and a tray icon. It comes with the needed dependencies, which makes the set-up a breeze. You can find the installation instructions here.
  • macOS: Get syncthing-macos, a native macOS tray application bundle that wraps Syncthing. The instructions are detailed here.
  • Linux: For Linux distributions, I recommend following the same instructions as for the Steam Deck I laid out above.

Connecting Devices

After downloading and installing your flavor of Syncthing, start it up and navigate to the web interface on http://127.0.0.1:8384. Delete any default folders like you did on the Steam Deck. Next, you’ll need to create a connection between your device and Steam Deck. To do that, make sure the Steam Deck is powered on and connected to the internet first and then click the Add Remote Device button at the bottom right on your development device.

Add remote device

In the Add Device window, click on nearby device id, below the “You can also select one of these nearby devices” text.

Device nearby ID

If you don’t see a nearby device, make sure Syncthing is running on your Steam Deck and that’s it’s connected to the same Wi-Fi network as your development device. You can also manually input the device ID by clicking Actions ▸ Show ID on the Steam Deck and either copying it over by hand or sending it to yourself via email for example.
Once you have a Device ID filled in, click the Save button.

Save button

After doing this, an attempt to create a connection to your Steam Deck is made. Look at the Syncthing web interface on your Steam Deck, a prompt at the top of the page should ask if you want to add a new device. Click the Add Device button to confirm this.

New Device prompt

Next, you’ll be asked to rename the device. Fill in a different device name if you want and click Save.

Add device name

Your dev device and the Steam Deck are now connected to each other! In the next section, you’ll do the final part of the Syncthing setup: configuring what folders should be synced.

Folder Setup

The way Syncthing works is by reading any changed files (and folders) in a directory and sending those over the network to connected devices that have access to that folder.
Start by creating a new folder somewhere on your development device. In my case, I’ve created a new folder named Steam_Deck_Sync at the root of my U: drive.

Steam deck sync folder

Next, open the folder and copy the path to your clipboard, U:\Steam_Deck_Sync in my case. Now open the Syncthing web interface and click the Add Folder button below the Folders section on the left.

Add folder

This opens the Add Folder window. Give the folder a label in the Folder Label field and paste the path to the folder that’s in your clipboard in the Folder Path field. I chose Steam Deck Sync as the label and U:\Steam_Deck_Sync as the folder path.

Folder label and path

Now open the Sharing tab to choose what device(s) get access to this folder via syncing. Check the box before the name of your Steam Deck here and click the Save button.

Checkbox

On the Steam Deck side, you’ll get another prompt in Syncthing, this time asking if you want to add the folder you just created.

Add new folder prompt

Click the Add button to open the Add Folder window on your Steam Deck. All you need to set up here is the Folder Path, which points to a folder on your Steam Deck. You don’t have to create the folder first, as Syncthing will do this for you. I’ve changed my folder path to home/deck/Steam_Deck_Sync since I dislike spaces, especially on Linux. :] This will create a new folder named Steam_Deck_Sync in the home directory.

Folder path on steam deck

Click Save to create the folder and finish the setup. This new folder will now appear in the interface at the left, clicking it shows you more information about its status.

Steam deck folder info

Now the folder is set up on both devices, I think it’s time for a quick test run! You can drop any file in the folder on your development device and it should show up on the Steam Deck side. You can copy the two sample builds I provided in the materials zip file, any of your own builds or any random file. I put the sample build folders in there.

Sample build in windows explorer

After a few seconds, Syncthing will spring into action and start copying the files to the Steam Deck over the network. If you’re fast enough, you’ll be able to see this happening in the web interface as the folder information will change and the network rates will reflect the upload.

Syncthing during upload

After the sync is done, you can take a look at the synced folder on your Steam Deck and you’ll see the same folders and files.

Steam Deck folders

And there you have it, a two-way automatic sync between your devices that allows you to copy files with ease to your Steam Deck. By exporting builds from your favorite game engine to the synced folder, you can be testing changes in seconds as the sync will only upload changed files. All of that, without having to leave Gaming mode!

My preferred way of playtesting is adding the executable to Steam, switching to Gaming mode and test everything on the Steam Deck. If I need to push changes, I close the game on the Steam Deck, generate a new build over the previous one and start the game again. This allows for fast iteration without dropping a beat. If you’re in a team, you can even sync your new build across multiple devices at once after installing Syncthing on them. If you thought of another cool way to use Syncthing, be sure to share it in the discussion below.

If you already know your way around the Steam Deck and know how play games in Desktop mode and how to add Linux and Windows executables to Steam to play them in Gaming mode, you should be all set. To everyone else, stick around for a bit longer as I’ll show you how to test your builds.

Playing the Build

You can use the example builds I included in the materials zip to follow along as I’ll explain how to run both native Linux and Windows executables. If you haven’t done so already, extract the two GamepadTester folders from the materials zip and copy them to the synced folder on your development machine, making them accessible on the Steam Deck.

Native Linux Build

The most straightforward option is to run a native Linux build on the Steam Deck. While in Desktop mode, open the synced folder and from there open the GamepadTesterLinux folder. There are two files in there: GamepadTester.pck and GamepadTester.x86_64. The pck file is a resource pack holding the game’s data, while the x86_64 file is the executable. Double-click the executable to start the game.

If this is the first time you run the game, SteamOS will ask you if you’re sure you want to run the executable. Confirm this and the game should load. You’ll be greeted by some information on the top left, a wireframe cube at the top and a bunch of buttons at the bottom.

Game

Clicking any of the buttons should light up the matching icon. However, you might notice it’s not doing anything yet. That’s because the default input configuration for the built-in gamepad is sending virtual keystrokes and mouse input. To switch to gamepad mode, hold the Menu (≡) button until a small popup appears informing you that you’ve entered Gamepad mode.
Now try pushing buttons and moving the joysticks around. If everything is working as it should, you’ll see the cube moving and button icons lighting up.

Gameplay

After you’re done testing the game, switch back to the desktop controller input by holding the Menu (≡) button again and close the game by clicking the little x icon at the top right.
The next step is adding the game to Steam, so you can play it in Gaming mode. You can do this by right-clicking the executable and selecting Add To Steam in the context menu.

Add To Steam

This will add the executable as a non-steam game to your library. Next, switch back to Gaming mode by double-clicking the Return to Gaming Mode shortcut on the desktop.

Return to Gaming Mode icon

After a short while, Gaming mode loads and you’ll see your recently played games. Next, open your game library by pressing the STEAM button and selecting Library.

Steam Deck Library

From the library, press R1 until you’re in the NON-STEAM category. This is where all games and applications you’ve added via the desktop mode end up.
Now find GamepadTester.x64_64 in the list and play it. For me it was at the bottom, below NEVER.

Gamepadtester x86_64

You can now play the “game” from Gaming mode. To quit the game, press the STEAM button and select Exit game. You can keep iterating your builds, as the reference to the x86_64 file will be preserved. This means you can test the game, exit, update the build and test the new version in minutes.

Next up is getting the Windows version to work.

Windows Build

The Steam Deck runs SteamOS, which comes with built-in Proton support. Proton is a compatibility layer that allows Windows games to run on Linux-based operating systems. This means the Steam Deck can run both Linux and Windows (game) executables. While Proton isn’t perfect, you’ll find that most Windows games will work out of the box. Some even perform better than their native counterpart.

To get started, switch to Desktop mode again. Getting Windows executables to work in Desktop mode is non-trivial, so I’ll skip ahead to adding and configuring it in Gaming mode.
Navigate to the GamepadTesterWindows folder in your synced folder and open it.

GamepadTesterWindows

In there, right-click the GamepadTester.exe file and select Add to Steam.

Add to Steam

This will add the executable as a non-steam game to your library. Next, switch back to Gaming mode by double-clicking the Return to Gaming Mode shortcut on the desktop.

Return to Gaming Mode icon

Now find GamepadTest.exe in your library like you did with the native build. Go ahead and try to play it. The game will almost instantly stop and return you to the screen with the big Play button. What gives?

Your Steam Deck will try to run any executable added to Steam as a native Linux executable by default, which in this case is incorrect. To fix this, you’ll have to force Steam to use Proton instead. Tap or select the cogwheel at the right side of the game menu to open the its settings.

Settings button cogwheel

Next, select Properties… in the menu that pops up to open the Properties screen.

Properties

Switch to the Compatibility tab on the left and check “Force the use of a specific Steam Play compatibility tool”. If this checkbox is grayed out and you’re unable to check it, restart your Steam Deck and try again. That’s a bug that creeps up from time to time.

Compatibility checkbox

A dropdown should now appear below the checkbox. Select it to get a list of all installed Proton versions. The size of your list will probably differ, as it depends on what games you have installed. Select Proton Experimental from the list.

Proton versions

As a final step, return to the game menu and try running the game again. This time, Steam will download a Proton compatibility tool first, after which the game should launch.

Note: If you briefly see a gray screen before it crashes to the game screen, try launching the game a few more times in a row. I’m unsure why this can happen, but once it fully launches once, it will keep working.

That concludes this tutorial! Syncthing truly makes transferring files easy as can be once it’s set up and I’m sure you’ll find a myriad of ways to use it now you’re familiar with it. I know I did. :]

Where to Go From Here?

Thanks for reading! You can find the link to the materials for this tutorial at the top or bottom of this page.
If you have any questions or comments, feel free to join the discussion below.


Source link

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
WP Twitter Auto Publish Powered By : XYZScripts.com
SiteLock