3
# Copyright 2002,2004 by Stefan Hornburg (Racke) <racke@linuxia.de>
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public
16
# License along with this program; if not, write to the Free
17
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23
# Source debconf library
24
use Debconf::Client::ConfModule qw(:all);
27
my @cbrowsers = grep {&available($_)} ('links', 'lynx', 'w3m');
28
my @xbrowsers = grep {&available($_)} ('epiphany', 'galeon', 'konqueror', 'mozilla', 'netscape', 'opera');
30
# Set selection list and defaults for both display types
31
subst('dhelp/www-browser-console', 'CBROWSERS', join(', ', @cbrowsers));
32
($status, $value) = get('dhelp/www-browser-console');
34
die "Couldn't get debconf value for dhelp/www-browser-console\n";
37
set('dhelp/www-browser-console', 'lynx');
40
subst('dhelp/www-browser-x', 'XBROWSERS', join(', ', @xbrowsers));
41
($status, $value) = get('dhelp/www-browser-x');
43
die "Couldn't get debconf value for dhelp/www-browser-x\n";
46
set('dhelp/www-browser-x', 'mozilla');
50
input('medium', 'dhelp/www-browser-console');
53
input('medium', 'dhelp/www-browser-x');
56
# Check for executable
60
for my $path ('/usr/bin','/usr/bin/X11') {
61
return 1 if -X "$path/$program";