When trying to use my company chat app “Rocket.Chat” i was struggling to get the desktop share to work. i’m using Rocket.Chat as a flatpak app on my manjaro machine. when i select a desktop to share the screen was always just black. this did not happen on a X11 session, so i got stuck on x11 until this problem will be fixed by me! today was the day…
a bit of googling brought me to the conclusion that i have to tell the electron app to use the
here’s my fairly easy way to achieve this.
find your currently used
.desktop file for rocket chat. mine was at
/var/lib/flatpak/exports/share/applications/chat.rocket.RocketChat.desktop and copy it to your users local applications dir:
# cp /var/lib/flatpak/exports/share/applications/chat.rocket.RocketChat.desktop ~/.local/share/applications
fire up an editor of your choice with the freshly created file (which takes precendence over the default one):
# nano ~/.local/share/applications/chat.rocket.RocketChat.desktop
and chat the executable line to:
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --file-forwarding chat.rocket.RocketChat @@u %U @@ --command=/app/bin/rocketchat-desktop --enable-features=WebRTCPipeWireCapturer
my resulting file looks like this:
[Desktop Entry] Name=Rocket.Chat #Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/rocketchat-desktop --file-forwarding chat.rocket.RocketChat @@u %U @@ Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --file-forwarding chat.rocket.RocketChat @@u %U @@ --command=/app/bin/rocketchat-desktop --enable-features=WebRTCPipeWireCapturer Terminal=false Type=Application Icon=chat.rocket.RocketChat StartupWMClass=Rocket.Chat MimeType=x-scheme-handler/rocketchat Comment=Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat Categories=GNOME;GTK;Network;InstantMessaging; X-Desktop-File-Install-Version=0.26 X-Flatpak-RenamedFrom=rocketchat-desktop.desktop; X-Flatpak=chat.rocket.RocketChat
restart rocket.chat and you’re good to go. you will see a new switcher which lets you choose what to share after the original one from rocket.chat.
this should work for any electron app.
note that in my case the
--command argument had to be the last one, otherwise my rocket.chat would not start…