lynx : sh: line 1: test -n :0.0: command not found : mailcap, update-mime
Hi,
I've been digging around to find something (eg google),
but nothing came up.
I run testing/unstable.
when i was running lynx, (on my workstation, on which was installed X)
(behaves like that both in console and X)
I had the message :
sh: line 1: test -n :0.0: command not found
(for every web site)
after stracing i found that
lynx itself is forking to sh:
32603 fork() = 32617
32617 --- SIGSTOP (Stopped (signal)) @ 0 (0) ---
32617 rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0
32617 rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
32617 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
32617 execve("/bin/sh", ["sh", "-c", "\"test -n $DISPLAY\""], [/* 64 vars */]) = 0
[snip]
32617 stat64("./test -n :0.0", 0xbffff040) = -1 ENOENT (No such file or directory)
32617 rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
32617 rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_IGN}, 8) = 0
32617 rt_sigaction(SIGCHLD, {SIG_DFL}, {0x8079e63, [], SA_RESTORER, 0x4007e5f8}, 8) = 0
32617 write(2, "sh: line 1: test -n :0.0: comman"..., 44) = 44
32617 _exit(127) = ?
this test came from /etc/mailcap,
where i could find things like :
test=test -n "$DISPLAY"
(application/ghostview; /usr/bin/X11/gv '%s'; test=test -n "$DISPLAY")
test=test -z "$DISPLAY"
test=test "$DISPLAY" != ""
i replaced test -n "$DISPLAY" by test=test "$DISPLAY" != ""
everywhere i found.
lynx worked without a warning.
thoses -n come from different packages,
/etc/mailcap is regenerated by update-mime,
using /usr/lib/mime/packages/*
an exemple of package using -n is imagemagick :
grep -l -- 'test -n' /usr/lib/mime/packages/*
acroread-debian-files
bittorrent
freewrl
galeon
gnumeric
gv
imagemagick
mozilla-browser
mplayer-686
timidity
vrwave
xloadimage
a package not using it :
konqueror :
text/html; konqueror %s;test=test "$DISPLAY" != ""; priority=5
grep -l '"$DISPLAY" != ""' *
abiword-common
gnome-apt
kate
konqueror
metamail
openoffice.org
realplayer
xmms
Is there a need for standardisation ?
what went wrong on my side ?
thanks
--
xavier
Reply to: