0

I use several chat/IM application on my work laptop, and would like to link-clicks from one chat application or from link-clicks in the terminal to open in Chromium, and from the other chat applications to open in Firefox.

The chat applications themselves don't have anything in the settings to set this behaviour. Is that possible on another level? If so, how?

  • Unless the chat applications have this functionality, then it's likely they're calling whatever default browser is in use. There'd be no way to customize that on a per-application basis to my knowledge in the GUI. – Thomas Ward Dec 10 '18 at 16:19
0

I solved this by creating an alternative xdg config directory, and changing the .desktop file for the chat app that I wanted to have open in a different browser (specifically, Telegram)

Steps to solve:

  1. Create a new directory on your home mkdir $HOME/.config-alt and created a mimeapps.list file it (touch $HOME/.config-alt/mimeapps.list)

  2. Edit this file to use the alternate browser, e.g.:

text/html=Firefox.desktop;
x-scheme-handler/http=Firefox.desktop;
x-scheme-handler/https=Firefox.desktop;
x-scheme-handler/about=Firefox.desktop;
x-scheme-handler/unknown=Firefox.desktop;
  1. Change the .desktop file that opens your application to add an XDG related environment variable - e.g., telegram.desktop (usually in /etc/share/applications or $HOME/.local/share/applications/, but depends on your setup) Change Exec=/path/to/bin to Exec=env XDG_CONFIG_HOME=$HOME/.config-alt/ /path/to/bin

  2. Restart the app through its shortcut, it should open links in your browser of choice without messing with the other apps

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.