Re: Can I add parameters to the default browser setting?
Ralf Mardorf <[email protected]> Mon, 04 Nov 2024 19:38:09 +0100
| Newsgroups | gmane.comp.xfce.user |
|---|---|
| Message-ID | <[email protected]> |
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@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@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@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 _______________________________________________ Xfce mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce http://www.xfce.org