Re: Cannot run X over ssh (it's fine now)

On Thursday, September 29th, 2011 at 14:08:29h +0000, Vahis wrote:

But I'm puzzled with How exctly the authorization takes place.

The normal implementation of the Xorg X server is with an MIT magic
cookie file. When you login using the graphical display manager
a file is created in your ${HOME} directory


This is user based.

From <>



The MIT-MAGIC-COOKIE-1 authorization protocol was developed by the Massachusetts Institute of Technology.

At server startup, a magic cookie is created for the server and the user who started the system.

On every connection attempt, the user's client sends the magic cookie to the server as part of the
connection packet. This magic cookie is compared with the servers' magic cookie.

The connection is allowed if the magic cookies match, or denied if they do not match.


So where and how is this authorization controlled.

Access by other hosts (including other users on the same machine)
to your DISPLAY on the Xserver currently running
on your machine is controlled with the use of xhost.

xhost +local:

allows access to the DISPLAY via the named socket
so that network connections even from the local host
are denied.

xhost +local

allows access from what is usually the name for the
local non networked connected lo interface
so allows network access from other same host users

xhost +

allows absolutely anybody on any network machine to connect

xost -

turns off remote network access.

I'm getting nowhere when sometimes something works and sometimes not. Or
rather on some machines works, others not.

Is that a possibly maybe or maybe not, or only sometimes but never always?

I'm doing this wrong, I'm sure, but how is it supposed to be done?

Could be that your problem is your .Xauthority file has not been
created or has been deleted.

Without any definite information analysis of the problem is
probably always impossible, or sometimes maybe sometimes not.