Package: debianutils
Version: 2.8.4
Followup-For: Bug #194278

this bug makes lynx fail ("Badly formed address") when 
lynx is the default web browser.

The attached patch try to solve the problem but it's very basic, some better 
solution must exist.

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages debianutils depends on:
ii  coreutils                   5.2.1-2      The GNU core utilities
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an

-- no debconf information
--- /usr/bin/sensible-browser   2004-07-13 01:29:16.000000000 +0200
+++ ./sensible-browser  2005-09-12 23:25:35.132117088 +0200
@@ -20,20 +20,23 @@
        exit 1;
 }
 
+my @program;
 if (exists $ENV{DISPLAY}) {
        if (-e '/usr/bin/x-www-browser') {
-               exec '/usr/bin/x-www-browser', $url;
-               exit 1;
+               @program = ('/usr/bin/x-www-browser');
        }
        elsif (-e '/usr/bin/x-terminal-emulator' && -e '/usr/bin/www-browser') {
-               exec "x-terminal-emulator", "-e", "/usr/bin/www-browser", $url;
-               exit 1;
+               @program = ("x-terminal-emulator", "-e", 
"/usr/bin/www-browser") ;
        }
 }
 elsif (-e '/usr/bin/www-browser') {
-       exec '/usr/bin/www-browser', $url;
-       exit 1;
+       @program = ('/usr/bin/www-browser');
+}
+if ($url) {
+       push (@program, $url);
 }
+       exec { $program[0] } @program ;
+       exit 1; 
 
 print STDERR "Couldn't find a suitable web browser!\n";
 print STDERR "Set the BROWSER environment variable to your desired browser.\n";

Reply via email to