Subject: pkg/15615: ns-remote: not running on display :0.0
To: None <>
From: None <>
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
>Originator:     Ben Wong
>Release:        NetBSD 1.5.1
System: NetBSD 1.5.2 NetBSD 1.5.2 (GENERIC) #0: Sat Nov 17 17:21:16 EST 2001 i386


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.


Install netscape or mozilla from pkgsrc. Run 'netscape'.


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
	echo "Netscape not already running. Spawning a new browser in the background." >&2

I have done a minimal check of the above code, and it seemed to work.