Can I add parameters to the default browser setting?
Ralf Mardorf
ralf.mardorf at alice-dsl.net
Mon Nov 4 19:38:09 CET 2024
On Mon, 2024-11-04 at 16:07 +0000, Chris Green wrote:
> Is i possible to add parameters to the default browser setting in
> xfce4?
>
> I want to prevent a new browser window popping up when I right click
> to open a link in a terminal window. I want the link to open a new
> tab in my existing browser window.
Hi Chris,
you can for example write a script that does launch an URL in a browser
(tab) and make this script the default browser, instead of making a
browser directly the default browser.
A very long time ago I used two very primitive scripts. I didn't use
those script much and never wrote a good script.
However, it does demonstrate the principle.
Is a browser already running? If so, then use this browser (either open
another instance of this browser or open a new tab), if not launch
a(nother) browser.
You might need to add a "--new-tab" option.
• rocketmouse at archlinux ~/.customization
$ cat default.browser.sh
#! /bin/bash
pidof xombrero
case $? in
0) xombrero $*; exit;;
esac
pidof opera
case $? in
0) opera $*;;
*) apulse firefox $*;;
esac
exit
• rocketmouse at archlinux ~/.customization
$ cat default.browser_no-apulse.sh
#! /bin/bash
pidof xombrero
case $? in
0) xombrero $*; exit;;
esac
pidof opera
case $? in
0) opera $*;;
*) firefox $*;;
esac
exit
• rocketmouse at archlinux ~/.customization
$ ls -hAltr default.browser*
.rwxr-xr-x rocketmouse rocketmouse 138 B Wed Dec 4 07:02:33 2013 default.browser_no-apulse.sh
.rwxr-xr-x rocketmouse rocketmouse 145 B Sun Jun 18 15:42:13 2017 default.browser.sh
Regards,
Ralf
More information about the Xfce
mailing list