Configure web browser? #509
Replies: 6 comments 1 reply
-
It currently uses the default system browser, using python's webbrowser.open function. You can override it by setting the e.g. for linux you could use one of these:
|
Beta Was this translation helpful? Give feedback.
-
On 21/11/2024 11:09, Ivan Habunek wrote:
You can override it by setting the |BROWSER| environment variable to the
executable of the browser you want to run.
e.g. for linux you could use one of these:
|export BROWSER=firefox
export BROWSER=~/.local/bin/firefox > export BROWSER=chromium-browser |
Hmm. I just tried
(export BROWSER="/home/dan/.guix-profile/bin/icecat -P \"toot\""; toot tui)
and it's still using Gnome Web (which isn't even set as Gnome's default
browser app).
|
Beta Was this translation helpful? Give feedback.
-
On 21/11/2024 12:03, Daniel Hatton wrote:
Hmm. I just tried
(export BROWSER="/home/dan/.guix-profile/bin/icecat -P \"toot\""; toot tui)
and it's still using Gnome Web (which isn't even set as Gnome's default
browser app).
However, after reading the docs for the Python webbrowser module, I tried
(export BROWSER="/home/dan/.guix-profile/bin/icecat -P \"toot\" %s";
toot tui)
which seems to work. (Except now I need to suss out the magic
redirection formula to send all the guff IceCat wants to print to STDOUT
and STDERR to /dev/null)
|
Beta Was this translation helpful? Give feedback.
-
Cool. When you figure it out can you tell me and I'll put it into the documentation. |
Beta Was this translation helpful? Give feedback.
-
On 21/11/2024 15:24, Ivan Habunek wrote:
Cool. When you figure it out can you tell me and I'll put it into the
documentation.
Hah! You'd think it'd be easy, but if I just put >/dev/null 2>&1 at the
end, IceCat snaffles up ">/dev/null" and "2>&1" and parses them as two
more URLs to open in tabs, never letting the shell see them.
|
Beta Was this translation helpful? Give feedback.
-
On 22/11/2024 03:24, Daniel Schwarz wrote:
Write a tiny shell script that launches icecat with redirection as you
like it, and set the BROWSER variable to point at your script.
Yes: working as desired with
(export BROWSER="/home/dan/bin/launchIcecatFromToot %s >/dev/null 2>&1
&"; toot tui)
where /home/dan/bin/launchIcecatFromToot is the perl script
#!/usr/bin/perl
use strict ;
use warnings ;
my $argNumber = 0 ;
my $command ='/home/dan/.guix-profile/bin/icecat -P "toot"' ;
while ($ARGV[$argNumber]) {
$command = $command . " " . $ARGV[$argNumber] ;
$argNumber++ ;
}
system($command) ;
But that's probably a bit much for Ivan to put in the toot documentation.
|
Beta Was this translation helpful? Give feedback.
-
How do I configure which web browser toot tui launches, e.g. on pressing "v" to view a toot or following a link, please?
Beta Was this translation helpful? Give feedback.
All reactions