How to override the default program for a specific file?

HI,

New to the Forums :slight_smile:

Have dabbled in linux for a couple of years but am still a NEWB.
Have installed the latest Manjaro on my home HTPC- used for watching streaming services, videos etc. Much prefer it to other distros.
Have a background in sound engineering so am enjoying the felixibiity of pipewire.
The particular problem I have is, in order to process the sound of different ( web )sources independently, I need to be able to override the default application for some of the weblinks.

To explain:

First, the majority of my sources are webpage shortcuts with the exception of recordings.
The vast majority are shorcuts from Brave browser- which is set as my default browser.
The audio feed from the browser ( via pipewire ) has its dynamic range heavily reduced , so that I don’t have the usual ‘’ but the dialogue is so quiet compared to the effects’’ syndrome :slight_smile:
Now the problem is for audio sources that are just music ( i.e Amazon music ), I need to open ( AUTOMATICALLY ) the web link with a different browser ( Firefox ) so that the audio from that browser ( via pipewire ) can be treated differently, i.e not at all.

It is easy to set the audio up in pipewire so the applications are treated separately.

So … for most of the web page links, and the video recordings, I am happy using the default Browser and media player.
BUT, for music only website links, I need to open the link with FIREFOX, NOT Brave!

Is there a simple way to achieve this on XFCE?
I have tried opening properties of the link and pointing to Firefox, and it works, but it is not permanent and needs to be done every time, reverting back to default otherwise.
Bear in mind this is a family set up and family will not want to do that .They just want to pick the relevant shortcut icon and have the relevant application open it without any further work on there half.

Phew- many thanks for any ideas - please bear in mind my newbness.

Cheers

Pootler

Are you saying you save each of these links to the desktop ?
What does one of those files look like ?

Hi

Thanks for replying.
Yes, basically our tv consists of a number of icons which are weblinks to streaming services.
here is what the properties say for the Netflix shortcut via Brave;

Name brave-eppojlglocelodeimnohnlnionkobfln-Default.desktop

kind desktop entry

location /home/xxxx/desktop

Launcher details:

Command /opt/brave.com/brave-beta/brave-browser-beta --profile-directory=Default --app-id=eppojlglocelodeimnohnlnionkobfln

allow this file to run as a .desktop file

set this file as trusted

hope that is useful

Pootler

In case it is useful, the shortcut produced by firefox has slightly different properties
for example the amazon music properties for the link does not have a “launcher” tab but instead a “link” tab which has a URL link

So wait … I’m confused.
You can create ones for firefox … do those not work?

the shortcut created by firefox is opened by the default browser Brave

not sure what country you are in? - but I am in the uk, so need to get some sleep :slight_smile:

will catch up tomorrow - thanks again for replying

Pootler

Ok … the saved desktop files from firefox assume firefox is the default browser and so only use the link attributes.
To get around this we can copy the way firefox launches itself and add the link from the file.
So opening the .desktop file in a text editor we may see something like this:

[Desktop Entry]
Icon=text-html
Name=https://support.mozilla.org/en-US/kb/create-desktop-shortcut-website
Type=Link
URL[$e]=https://support.mozilla.org/en-US/kb/create-desktop-shortcut-website

Then you can change the ‘type’ to Application, and specify the string you want including any flags and the destination URL. (do note I will include optional flags I use for hardware acceleration here, to be instructive in the case you need to apply similar options)

[Desktop Entry]
Icon=text-html
Name=How-To-Create-FF-Shortcut
Type=Application
Exec=/usr/bin/sh -c "MOZ_DRM_DEVICE=/dev/dri/card0 GTK_USE_PORTAL=1 /usr/lib/firefox/firefox https://support.mozilla.org/en-US/kb/create-desktop-shortcut-website"

they assume brave is the default.

will look at this tomorrow thanks

I am not certain, I understand what you mean.

In XFCE: Settings-Default Applications- Web Browser- Is it set to FF?
Screenshot_2023-04-21_07-34-53

Take a look at mimeapps.list in your .config folder, maybe.

for music only website links, I need to open the link with FIREFOX, NOT Brave!

A desktop launcher like this should launch Firefox and open a specific URL

[Desktop Entry]
Type=Application
Name=Amazon Music
Exec=/usr/bin/firefox --new-window https://music.amazon.co.uk/
Icon=org.xfce.webbrowser
Terminal=false

Thank you nikgnomic.
That worked .
Also thanks to Jrichard and cscs - apologies if I didn’t make things very clear.

Pootler

Both @nikgnomic and my response do the same thing … create/edit the desktop file to specifically call firefox.