1830194 Members
7061 Online
109999 Solutions
New Discussion

Importing Display

 
Shahul
Esteemed Contributor

Importing Display

Hi

When I am giving xhost + command on my workstation, It is giving the following errors.
Xlib: Connection to "system:0.0" refused by server
Xlib: Client is not autorized to connect to server
xhost: Unable to open display :system:0.0"

IP address and loopback is set in host file properly. Display is exported as usual.

$echo $DISPLAY
system:0.0

Can someone give me the quick solution for this?

TIA
Shahul
9 REPLIES 9
Alan Casey
Trusted Contributor

Re: Importing Display

This is a known problem if Xauthentication through MIT-MAGIC-COOKIE is enabled on your system. By default, MIT-MAGIC-COOKIE-1 is set to 'True'; therefore, the following steps will allow you to disable this setting:


Copy the /usr/dt/config/Xconfig file to the /etc/dt/config directory:

cp /usr/dt/config/Xconfig /etc/dt/config/Xconfig

NOTE: If the /etc/dt/config/Xconfig file already exists, the following modifications can be made to the end of the existing file.


Uncomment the following line in /etc/dt/config/Xconfig file:

Dtlogin*authorize: False


Execute the following command to tell the desktop (window-based) login process to re-read its configuration files and incorporate these changes:

/usr/dt/bin/dtconfig


Log out of CDE.

Log back into CDE.
Nicolas Portais
Frequent Advisor

Re: Importing Display

Hi,

what are you doing exactly ? do you use CDE ?

and can you give me more information about:
- hostname
- OS version

the result of the following commands (on your workstation):
$ /usr/contrib/bin/X11/dr_dt
$ ioscan -fnC la
$ cat /etc/hosts
$ cat /etc/nsswitch.conf
$ cat /etc/resolv.conf

Nicolas
Dietmar Konermann
Honored Contributor

Re: Importing Display

Hi!

Is that the exact error message of xhost? I'm confused by the single '"' in it...

Maybe somthing weird in the DISPLAY var? What's the result of:

echo "$DISPLAY" | vis

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Shahul
Esteemed Contributor

Re: Importing Display


Hi

I have copied the /usr/dt/config/Xconfig to /etc/dt/config directory and uncommented the mentioned line. Executed dtconfig command, logged out and in. Still problem exists as it is..

What could be the reason?

TIA
Shahul
Nicolas Portais
Frequent Advisor

Re: Importing Display

Hi,

can you give us informations about your network ? OS version ? workstation model ?

Nicolas
Shahul
Esteemed Contributor

Re: Importing Display


Hi

My OS is 11.00, Model is B132L. I have 10 Base T n/w card and it is working fine. IP address and loop back is set in hosts file.

nsswitch entry for hosts

hosts: dns files

I hope these information will help U to trace te problem.

TIA
Shahul
Alex Glennie
Honored Contributor

Re: Importing Display

It maybe because although you've changed the resource in Xconfig the Xserver (local) has not re-read it : dtconfig -reset may work but I'd advise you run :

/sbin/init.d/dtlogin [stop,start] to be sure !

nb the Xserver is controlling host/user based access not CDE !

If that fails can you cut and paste the exact errors and commands you are using to see this problem please : include the h/w and hostname details if possible.

Dietmar Konermann
Honored Contributor

Re: Importing Display

I'm wondering, why disabling MIT-MAGIC-COOKIE is this thread's consense?. Authorization is a must from a security point of view... actually no security is present otherewise, using xhost +. You could also give everyone your root password.

Shahul, I assume that you can login successfully into the workstation's CDE. You can startup X clients from that session... so there must be a valid cookie in your login user's HOME/.Xauthority file.

As a 1st test you can copy that file to the HOME directory of the user that tries to run xhost.

You can also extract the cookies of your local CDE user, e.g.:

xauth extract :0.0 $DISPLAY

When you copy to the other usrer's $HOME/.Xauthority then all should be fine.

See man xauth(1).

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Shahul
Esteemed Contributor

Re: Importing Display

Hi

Thanks for the reponses. My problem has been solved and it was a funny reason. I was not having the correct permission on my default shell.

Thanks
Shahul