diff options
author | Daouda Lo <daouda@mandriva.com> | 2005-03-01 12:41:12 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2005-03-01 12:41:12 +0000 |
commit | 882223c3a6a276071b5ce727146716bf6075e649 (patch) | |
tree | 17fbffc6def99923f7b155f064bf29efb80412f5 /perl-install/any.pm | |
parent | 3ff980e216f65b8111d6be355ccbd903aef8856d (diff) | |
download | drakx-backup-do-not-use-882223c3a6a276071b5ce727146716bf6075e649.tar drakx-backup-do-not-use-882223c3a6a276071b5ce727146716bf6075e649.tar.gz drakx-backup-do-not-use-882223c3a6a276071b5ce727146716bf6075e649.tar.bz2 drakx-backup-do-not-use-882223c3a6a276071b5ce727146716bf6075e649.tar.xz drakx-backup-do-not-use-882223c3a6a276071b5ce727146716bf6075e649.zip |
- check and launch browser according to wm
Diffstat (limited to 'perl-install/any.pm')
-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) = @_; |