cover image

How to Set Up Elgato's Stream Deck on Ubuntu Linux 22.04

May 20, 2022


Popular with streamers everywhere in the world, the Elgato Stream Deck is a customizable device that works as an external input, and can be configured to trigger commands and shortcuts at the press of a button. Although the device is super popular with live streamers, it is also very useful for anyone who works with several applications in a desktop setting, since it greatly facilitates switching windows and running commands on your computer.

In this post I'll share how I set up my Stream Deck on an Ubuntu 22.04 system and which commands / tools I configured so far.


You'll need an Ubuntu 22.04 desktop system on a device you can plug in your Stream Deck. Unfortunately, the streamdeck-ui software doesn't support Wayland, so you'll need to disable it. The following short guide describes how to do so:

How to Disable Wayland on Ubuntu 22.04

This short guide shows how to disable Wayland on Ubuntu 22.04.

Step 1: Install streamdeck-ui

The streamdeck-ui program provides a Linux-compatible graphical user interface to control your Stream Deck, running on top of the Python Stream Deck Library. With this software you can set up each individual key by providing an icon, a command or a shortcut, and an optional title. It supports multiple pages, which means you are not limited to the physical slots in the device. As long as you use one or more keys to paginate through your icon pages, you can have as many buttons as you need.

Another interesting feature is the ability to import and export configuration files; this way, it is easier to "transfer" your setup to other Ubuntu systems or restore a previous configuration when reinstalling.

Screenshot of streamdeck-ui already configured

To get started, install the dependencies with the following command:

sudo apt install python3-pip libhidapi-libusb0 libxcb-xinerama0

Then, you'll need to set up special permissions that will allow you to use the application with a regular system user.

sudoedit /etc/udev/rules.d/70-streamdeck.rules

Paste the following content into this file:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", TAG+="uaccess"

Save and close the file. Then, reload udev rules with:

sudo udevadm control --reload-rules

The installation instructions advise you to unplug and plug again your device before continuing. Once you do that, run the following command to install streamdeck-ui:

pip3 install --user streamdeck_ui

Next, you'll need to make sure you have $HOME/.local/bin in your $PATH. If you are using regular bash, you should have a .bashrc file where your $PATH is defined. If you are using zsh, this should be .zshrc instead. For instance, I use zsh and this is how my $PATH is defined within my ~/.zshrc:

export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH

After updating your $PATH, you'll need to log out and in again to apply the change, or you can run the following:

su - $USER

This will log you into a "shell inside a shell", but it works seamlessly as if you've logged off and in again.

Now you can run streamdeck-ui from your terminal in background mode with:

streamdeck &

You should see a screen like that:

screenshot of streamdeck-ui with blank configuration

You can now start setting up each button.

Keep in mind that the program must be running all times for the buttons to be actually functional. It will be visible as a system tray icon on the top right of your screen.

It is recommended that you include the streamdeck command in your startup commands - on Ubuntu you can set this on the Startup Applications Preferences utility. Hint: type window and then Startup to find this program on Ubuntu:

Setting up streamdeck to start on login

Setting up command buttons

Setting up a button to run a command is pretty straightforward with streamdeck-ui. Having an icon is optional, since you can also use a simple text (just needs to keep it very short, as it doesn't support linebreaks). To try it out, configure your first button to open your file browser, called as nautilus:

Setting up a command button on streamdeck-ui

The update is effective immediately, so you can click on the button and you should see a new Nautilus window opening up.

Setting up shortcut buttons

You can also set up shortcuts to run when you click a button, although this may work inconsistently depending on which application is currently on focus. I use shortcuts to switch scenes on OBS, but then I have to first make sure I focus the OBS window and only then I hit the shortcut button.

To configure shortcuts, use the Press Keys text field to define the sequence of keys. To make it work with OBS, you'll first need to configure your OBS shortcuts on Settings -> Hotkeys (inside OBS).

Setting up a shortcut button

It is also possible to use commands to change which window is currently on focus, that's what we'll see next.

Manipulating windows with xdotool

To switch between windows, you'll need to install a tool called xdotool. On Ubuntu you can install it with the following command:

sudo apt install xdotool

This tool allows you to search for a window by title or class, which is an internal name used by each application. This information can be found with the built-in command xprop, which obtains information about active windows on your graphical interface.

To find out which class an application uses for its main window, you can run:

xprop | grep 'CLASS'

Then, you'll have to click on the window you want to obtain more information about. Make sure you click somewhere inside the window, not at the title bar.

For instance, if you want to find out the class name for your Firefox browser, after clicking somewhere in the Firefox window you'll get output like this:

WM_CLASS(STRING) = "Navigator", "Firefox"

The second string in the output is what we need. Once you know the class name for an application, you can move it to active / focused with the following command (in this case, we're activating the Firefox window):

xdotool search --desktop 0 --class Firefox windowactivate

So this is the command you'll have to set up within streamdeck-ui to be able to easily switch applications using your Stream Deck.

Here is a list with my own buttons that you can probably reuse on your setup in case you want similar functionality:


xdotool search --desktop 0 --class Firefox windowactivate

Terminal (Terminator)

xdotool search --desktop 0 --class 'Terminator' windowactivate


xdotool search --desktop 0 --class jetbrains-phpstorm windowactivate


xdotool search --desktop 0 --class obs windowactivate


xdotool search --desktop 0 --class Zoom windowactivate


xdotool search --desktop 0 --class slack windowactivate

This is what my current setup looks like:

Screenshot of streamdeck-ui already configured

And this is how it looks like on the device:

photo shows how this configuration looks like on the device itself

Finding icons

You can find default icons from the Ubuntu system and applications spread through several directories on /usr/share. Have a look at /usr/share/icons and you should find several subdirectories with icons - this might work but it can be difficult to find just the icon you want.

I personally prefer to look for icons on google images, and have set a local folder in my home directory where I keep these icons and reference them from streamdeck-ui. Icons must be in png format.

Importing / Exporting

Go to File -> Import to import a configuration file, or File -> Export to export your current configuration.

Just a reminder: you'll need to manually copy your icons and make sure all applications referenced are installed and responding to the shortcuts defined in the config.


I hope you have enjoyed this article and that it can help you customize your Stream Deck up to the minimal details, for a perfect setup :) Worth noting that the Stream Deck device is pretty handy for anyone working on a desktop, since it can speed up switching windows and running commands on your system.

This project is intended to document experiences with different kinds of hardware, gadgets, and software on Linux.

OnLinux by Erika Heidi is licensed under CC BY 4.0

cc cc

Built by Erika Heidi with Librarian. Back to top

Found an issue? Have suggestions? Join our discussions group on GitHub.