Operating System - HP-UX
1825801 Members
2831 Online
109687 Solutions
New Discussion

Xlib: Client is not authorized to connect to Server

 
SOLVED
Go to solution
V. Nyga
Honored Contributor

Xlib: Client is not authorized to connect to Server

Hi all,

a strange case (for me - maybe our UX gurus can help):
I want to start an application (xdriver from 3DConnexion - application to work with a space mouse).
Problem are following messages:
Xlib: connection to "cad18:0.0" refused by server
Xlib: Client is not authorized to connect to Server
Xlib: connection to "cad18:0.0" refused by server
Xlib: Client is not authorized to connect to Server

3Dconnexion (R)3D Device X Window Driver Version 4.55
(c) 1994 - 2003 3Dconnexion All rights reserved

[nyga,nyga]

Use the configuration from the
file: /usr/magellan/xdriver.ini
DISPLAY Variable nicht gefunden
< means: DISPLAY variable not found>

And:
env $DISPLAY says:
Keine Datei und kein Verzeichnis: cad18:0.0
< no="" file="" and="" no="" ="" 0.0="">
but - $DISPLAY is set correctly to cad18:0.0

This problem only occures with HP-UX11.11 and NIS users at a client.
No problems with HP-UX 11.0, no problems with local users.
Also no problems if I do an xhost + before starting xdriver.
My problems: I want to start xdriver automatically during login (start command in Xstartup file)
and
I've normally no local users.

Anyone can help?

Volkmar
*** Say 'Thanks' with Kudos ***
12 REPLIES 12
RAC_1
Honored Contributor

Re: Xlib: Client is not authorized to connect to Server

You can specify the ip_addresses/hosts that can have access to X. You specify it in /etc/dtc/config/Xacess file.

Anil
There is no substitute to HARDWORK
Zinky
Honored Contributor

Re: Xlib: Client is not authorized to connect to Server

Whatever mechanism you have to export your DISPLAY environment variable via the ini or some startup file does not seem to work. Since manually doing an xhost by your account seem to work, I will start with comparing your 11.0 and 11i environments. Also check your ini and startup files to make sure they match the SHELL (ksh, sh or csh) - most often this is where it is broke.
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Steven E. Protter
Exalted Contributor

Re: Xlib: Client is not authorized to connect to Server

It would appear that some kind of security measures have been implemented with regards to X Windows.

Files to check:

/var/adm/inetd.sec
/etc/rec.config.d/desktop

check the DESKTOP="" variable.

That may block access.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: Xlib: Client is not authorized to connect to Server

I missed a file to check for blocking:

/etc/dt/config/Xaccess

If you have to change Xaccess the following command forces a reset.
/sbin/init.d/dtlogin.rc reset

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Zinky
Honored Contributor

Re: Xlib: Client is not authorized to connect to Server

What essentially is the environment?

Is your Xserver a PC workstation running some X-Windows emulation or a UNIX Workstation with native X? I trust "cad18" is yoour end user's workstation and it is where the server based aplication is launched from?

Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
V. Nyga
Honored Contributor

Re: Xlib: Client is not authorized to connect to Server

Hi again,

thanks for your responses!
First:
At my 11.11 workstations is no Xaccess file.
Can I copy it from a 11.0?

And:
All my ws are HP-UX c-classes with 11.0 or 11.11. 'Xserver' is an application copied to local /usr.
And as I said - a local user can start it.

My environment? CDE and ksh for most users.

V.
*** Say 'Thanks' with Kudos ***
Zinky
Honored Contributor

Re: Xlib: Client is not authorized to connect to Server

Yes you can copy it or simply add "xhost localhost" to the local user's .profile or .login file -- assuming that your X-Windows application named "xdriver ?" is a LOCAL application to the workstation.

I thought you use your Workstation as simply an Xserver (or display) and that your application is remote -- ie. running on a poerful server).

Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
V. Nyga
Honored Contributor

Re: Xlib: Client is not authorized to connect to Server

Hi again,

I use the same Xaccess file at 11.11 like 11.0 now - no changes.
And no /var/adm/inetd.sec file at 11.x.

DESKTOP=CDE at all ws in /etc/rec.config.d/desktop.

I mixed up Xserver and xdriver in my last reply - sorry - my application is xdriver.

To set 'xhost localhost' doesn't work, only 'xhost +'.

I'm checking startlog now ...

V.
*** Say 'Thanks' with Kudos ***
Zinky
Honored Contributor

Re: Xlib: Client is not authorized to connect to Server

Your localhost probably does not resolve correctly. You can try xhost `hostname` .

Or

xhost workstationhostname.domain.com

xhost + is a security hole.

You can also create an /etc/X0.hosts with 127.0.0.1 and/or the workstations hostname as the contents.

Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
V. Nyga
Honored Contributor

Re: Xlib: Client is not authorized to connect to Server

Hi again,

xhost `hostname` is working, but then the user has to do it, that's not the way I like to do it.
How to specify it in /etc/dt/config/Xaccess file?
It seems like all is allowed because there's a '* CHOOSERS BROADCAST' in it.

The following is in my /var/dt/Xerrors:
AUDIT: Tue Nov 9 10:39:27 2004: 1838 X: client 13 rejected from IP port 50706
Auth name: MIT-MAGIC-COOKIE-1 ID: -1

Does anybody know what it means?
What can I do?

V.
*** Say 'Thanks' with Kudos ***
Robert-Jan Goossens_1
Honored Contributor
Solution

Re: Xlib: Client is not authorized to connect to Server

Hi Vo,

Could you check the file /etc/dt/config/Xconfig
and uncomment the line
Dtlogin*authorize: False

reread your CDE config files after above action.
/usr/dt/bin/dtconfig -reset

Best regards,
Robert-Jan

V. Nyga
Honored Contributor

Re: Xlib: Client is not authorized to connect to Server

Thanks a lot RJ - it works now!!
I'm sorry that I only can give 10 pts. :-))
Also thanks to the rest.

I'm still wondering why I don't have to uncomment this line in 11.0.

Only one point - /usr/dt/bin/dtconfig -reset doesn't work for this, I needed:
sbin/init.d/dtlogin.rc reset
So also SEP's tip was very good!
Reset also works with 'init 2' and then 'init 3' - or simply a reboot. ;-)

V.
*** Say 'Thanks' with Kudos ***