Change exec= line in OBS .desktop file

Hey how are you guys doing? I just switched to Wayland and I’m having problems to make OBS Studio work. After searching on the internet on how to make it work I figured out that I must open OBS with QT_QPA_PLATFORM=xcb so I decided to add this line in /usr/share/applications/com.obsproject.Studio.desktop but if I change the line from obs to QT_QPA_PLATFORM=xcb obs the application disappears from search. Is there anyway to outline this? Thanks!

Are you using an Nvidia GPU? If so, this may be related:

OBS fails to start on Wayland

Did you install OBS from Manjaro repos, or from the AUR? I just installed OBS (on Manjaro KDE, Wayland, amdgpu) using:

sudo pacman -S obs-studio

It launches without issue.

copy this to ~/.local/share/applications
Then edit the exec, but change it to something like

/usr/bin/sh -c "QT_QPA_PLATFORM=xcb obs"
1 Like

I did the same command when I installed.

Working perfectly. Thanks.

Note this is the preferred way to prepend environment variables without applying them globally, or any modification of the default launchers really - it will take precedence and not be overwritten upon an update. (see also: hardware acceleration on firefox, etc)
Less likely in the case of simple scenarios like here with just “obs”, it may sometimes be necessary to go back and check the original .desktop file for any changes to be incorporated into the local one.

2 Likes

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.