Subject: pkg/15615: ns-remote: not running on display :0.0
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Benjamin.Wong@cc.gatech.edu>
List: netbsd-bugs
Date: 02/14/2002 21:50:18
>Number: 15615
>Category: pkg
>Synopsis: ns-remote gives misleading information
>Confidential: yes
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Feb 14 18:51:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Ben Wong
>Release: NetBSD 1.5.1
>Organization:
>Environment:
System: NetBSD ursula.wongs.net 1.5.2 NetBSD 1.5.2 (GENERIC) #0: Sat Nov 17 17:21:16 EST 2001 toor@ursula.wongs.net:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
When running /usr/pkg/bin/netscape (mozilla or communicator), the
program exits immediately and the following error is sent to stderr:
ns-remote: not running on display :0.0
While this is sort of the correct behavior, it is confusing to people
who are used to other OSes, where 'netscape' isn't actually the
ns-open shell script.
>How-To-Repeat:
Install netscape or mozilla from pkgsrc. Run 'netscape'.
>Fix:
Change /usr/pkg/bin/netscape to check if there's a browser already
running before calling ns-remote. I think something like this (if put
somewhere around line 86) will work:
if ns-remote -noraise 2>/dev/null; then
if ns-remote $NS_REMOTE_ARGS ; then
exit 0
fi
else
echo "Netscape not already running. Spawning a new browser in the background." >&2
fi
I have done a minimal check of the above code, and it seemed to work.
>Release-Note:
>Audit-Trail:
>Unformatted: