diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index f96322387..eef475791 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -1006,6 +1006,23 @@ sub running_window_manager() { undef; } +sub launch_browser_with_wm { + my ($link) = @_; + my $browser = $ENV{BROWSER} || $ENV{HELP_BROWSER} || find { -x "/usr/bin/$_" } qw(mozilla-firefox mozilla konqueror epiphany galeon); + my %h = ( + 'kwin' => "webclient-kde", + 'gnome-session' => "webclient-gnome", + 'other' => $browser, + ); + my $wm = any::running_window_manager(); + $wm = 'other' if !member($wm, 'kwin', 'gnome-session'); + my $cmd = $h{$wm} or return; + $cmd .= " $link"; + log::l("Loading URL: $link"); + system("$cmd &"); + 1; +} + sub ask_window_manager_to_logout { my ($wm) = @_; |