[GRASSLIST:2538] Xlib - no protocol specified error

Hello, strange error this time.
I start grass 5.7 and everything is fine. If I type d.m to start a new
display manager from the terminal it gives me the following error
message:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Application initialization failed: this isn't a Tk applicationcouldn't
connect to display ":0.0"
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Error in startup script: this isn't a Tk applicationcouldn't connect to
display ":0.0"
    while executing
"load /usr/lib/tk8.4/../libtk8.4.so Tk"
    ("package ifneeded" script)
    invoked from within
"package require Tk 8.0"
    ("package ifneeded" script)
    invoked from within
"package require -exact BWidget 1.2.1"
    (file "/usr/local/grass5.7src/dist.i686-pc-linux-gnu/etc/dm/d.m.tcl"
line 2)

If I try to start a new monitor "d.mon start=x1" from the terminal it
gives me a similar error:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

ERROR: Graph_Set: can't open Display :0.0
No socket to connect to for monitor <x1>.
Problem selecting x1. Will try once more
No socket to connect to for monitor <x1>.

All this also happens in grass5.3 (with d.mon and d.dm), and in both
cases ONLY when the command is given from the terminal. If I start a
monitor or the display manager from the tcltk interface in 5.3 it is
fine.
Any ideas? (I am running tk8.4 on Linux Mandrake 10)

Thanks guys,
Francesco Pirotti
CIRGEO - University of Padua

francesco pirotti wrote:

Hello, strange error this time.
I start grass 5.7 and everything is fine. If I type d.m to start a new
display manager from the terminal it gives me the following error
message:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

This is an X authentication error. This indicates that
$HOME/.Xauthority (or the file referenced by $XAUTHORITY, if that is
set) is, in some sense, invalid.

One common reason for this is if $HOME isn't set correctly. Try
running "xauth list" to view the list of authentication credentials
which are available to Xlib.

--
Glynn Clements <glynn.clements@virgin.net>

Thanks Glynn,

You are certainly right, about xauth.
I did not yet find a solution: I found though that if I try to call a
tcltk object directly from a terminal I get the
__________________-
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
____________________--
error BUT if I run the GRASS shell as root I get the diplay manager
without problems ...
I am not an expert on X so I doubt I will be able to solve this
mystery...
If anybody has any ideas, I'll be glad to try them out.
Cheers,
Francesco Pirotti
CIRGEO - University of Padua

On Tue, 2004-02-10 at 15:18, Glynn Clements wrote:

francesco pirotti wrote:

> Hello, strange error this time.
> I start grass 5.7 and everything is fine. If I type d.m to start a new
> display manager from the terminal it gives me the following error
> message:
>
> Xlib: connection to ":0.0" refused by server
> Xlib: No protocol specified

This is an X authentication error. This indicates that
$HOME/.Xauthority (or the file referenced by $XAUTHORITY, if that is
set) is, in some sense, invalid.

One common reason for this is if $HOME isn't set correctly. Try
running "xauth list" to view the list of authentication credentials
which are available to Xlib.

--
Glynn Clements <glynn.clements@virgin.net>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.571 / Virus Database: 361 - Release Date: 26/01/2004

francesco pirotti wrote:

You are certainly right, about xauth.
I did not yet find a solution: I found though that if I try to call a
tcltk object directly from a terminal I get the
__________________-
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

In that situation, I would expect you to get the same result for
running any X program from the terminal.

error BUT if I run the GRASS shell as root I get the diplay manager
without problems ...

Check the ownership and permissions on the ~/.Xauthority file; it
should be owned by you.

--
Glynn Clements <glynn.clements@virgin.net>

An elegant fix to the problem...
I reinstalled a 9.1 mandrake version instead of the beta 10 version...
Thanks!
Francesco

At 23.17 12/02/2004 +0000, Glynn Clements wrote:

francesco pirotti wrote:

> You are certainly right, about xauth.
> I did not yet find a solution: I found though that if I try to call a
> tcltk object directly from a terminal I get the
> __________________-
> Xlib: connection to ":0.0" refused by server
> Xlib: No protocol specified

In that situation, I would expect you to get the same result for
running any X program from the terminal.

> error BUT if I run the GRASS shell as root I get the diplay manager
> without problems ...

Check the ownership and permissions on the ~/.Xauthority file; it
should be owned by you.

--
Glynn Clements <glynn.clements@virgin.net>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.583 / Virus Database: 369 - Release Date: 10/02/2004