sorry i should have mentioned you need wireplumber as well
i suppose its a trade off installing the packages as dependency for kde
missing functionality versus more dependencies
i suppose the other issue is making sure they are only installed for wayland and not x11
you could modify the firefox.desktop entry
1) create the following directory
Code:
mkdir -p ~/.local/share/applications
2) create the firefox.desktop file
Code:
vi ~/.local/share/applications/firefox.desktop
3) add the following code to the firefox.desktop entry file
Code:
[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
Comment=Browse the World Wide Web
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=sh -c 'pipewire &; /usr/local/libexec/xdg-desktop-portal -r &; /usr/local/libexec/plasma6-xdg-desktop-portal-kde -r &; firefox %U'
Terminal=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=NewWindow;NewPrivateWindow;
[Desktop Action NewWindow]
Name=Open a New Window
Exec=sh -c 'pipewire &; /usr/local/libexec/xdg-desktop-portal -r &; /usr/local/libexec/plasma6-xdg-desktop-portal-kde -r &; firefox -new-window'
[Desktop Action NewPrivateWindow]
Name=Open a New Private Window
Exec=sh -c 'pipewire &; /usr/local/libexec/xdg-desktop-portal -r &; /usr/local/libexec/plasma6-xdg-desktop-portal-kde -r &; firefox -private-window'
i have stripped out non english languages for brevity
if you need other languages you can copy the existing firefox.desktop entry
and then change the 3 exec lines from the code above
Code:
cp /usr/local/share/applications/firefox.desktop ~/.local/share/applications
see if that works
but the issues with is it would try and run those commands everytime you start firefox
which is not what you want as you would be running multiple versions of the commands
so you could manually kill them after stopping firefox
Code:
killall -9 xdg-desktop-portal plasma6-xdg-desktop-portal-kde pipewire 2>/dev/null
the best solution would to be have a wrapper script
that checks if those processes are running and if not start them and then start firefox
and change the exec line to point to that script
the other option would be to use a Makefile
so when you run make it starts the following
Code:
pipewire &
/usr/local/libexec/xdg-desktop-portal -r &
/usr/local/libexec/plasma6-xdg-desktop-portal-kde -r &
and then use make clean to stop them
Code:
killall -9 xdg-desktop-portal plasma6-xdg-desktop-portal-kde pipewire 2>/dev/null