Recently I started to use Plex for music streaming. At first I’ve used it via browser, but then decided to use their desktop app. Wanted to move away from the browser, so my music wouldn’t stop, when I quit the browser.
Installed their app using snap, tried to run it, but it would crash at start up:
$ snap run plex-desktop
qt.scenegraph.general: Using QRhi with backend OpenGL
Graphics API debug/validation layers: 0
QRhi profiling and debug markers: 0
Shader/pipeline cache collection: 0
qt.scenegraph.general: Using QRhi with backend OpenGL
Graphics API debug/validation layers: 0
QRhi profiling and debug markers: 0
Shader/pipeline cache collection: 0
xkbcommon: ERROR: Couldn't process include statement for 'us(euro-hu)'
xkbcommon: ERROR: Abandoning symbols file "(unnamed)"
xkbcommon: ERROR: Failed to compile xkb_symbols
xkbcommon: ERROR: Failed to compile keymap
[44758:44800:0228/142127.312652:FATAL:xkb_keyboard_layout_engine.cc(640)] Keymap file failed to load: us-euro-hu
Trace/breakpoint trap (core dumped)
It didn’t like my keyboard layout… what an odd error isn’t it?!
To tackle this issue, I’ve created a start up script that would first change keyboard layout and then start the app.
#!/bin/bash
setxkbmap us && /snap/bin/plex-desktop
This changes keyboard layout globally, so that is no fun. Next step, lets reset the keyboard layout, after plex passed its critical moment in startup. Today’s final version:
#!/bin/bash
(setxkbmap us && /snap/bin/plex-desktop) &
setxkbmap -layout us -variant euro-hu -option ctrl:swapcaps
Yay! The End :)