Operating System - HP-UX
1829752 Members
1795 Online
109992 Solutions
New Discussion

xhost: where to save a list of allowed clients?

 
SOLVED
Go to solution
Mihails Nikitins
Super Advisor

xhost: where to save a list of allowed clients?

Hi,

I run a graphical application on HP-UX machine locally (it serves both as X client and X server).

I can't find where a list of allowed X clients is stored (i get some list when trying to run graphical apps). After 'xhost +' command everything is OK.

Manual pages for 'xhost' mention configuration file /etc/X*.hosts, but I don't have such files. BTW, what are possible meanings of '*"?

Thanks and points in advance!

BR,
Mihails
KISS - Keep It Simple Stupid
4 REPLIES 4
Mark Grant
Honored Contributor

Re: xhost: where to save a list of allowed clients?

When you run xhost with an argument of a name, that name gets added to the list of hosts given X access so at the very least you could do

for i in `cat my_list_hosts`
do
xhost $i
done

On the other hand, /etc/X*.hosts will be any file that begins with an X and ends with ".hosts"

Hope this helps
Never preceed any demonstration with anything more predictive than "watch this"
Pete Randall
Outstanding Contributor
Solution

Re: xhost: where to save a list of allowed clients?

Mihails,

I believe you can place the list in a file called "/etc/dt/config/Xsession.d/0010.xhost". Entries look like this:

/usr/bin/X11/xhost +localhost
/usr/bin/X11/xhost +
...etc...


Pete


Pete
Peter Nikitka
Honored Contributor

Re: xhost: where to save a list of allowed clients?

Hi,

the syntax /etc/X*.hosts refers to the display specific access control of X11:
/etc/X0.hosts for display :0
/etc/X1.hosts for display :1 ...

So if you put the relevant hostnames in
/etc/X0.hosts, access to your display (which is nearly always :0) ist granted.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Mihails Nikitins
Super Advisor

Re: xhost: where to save a list of allowed clients?

To Peter:

I also believed so and tried using the files, but this didn't work for me. Thank you!
KISS - Keep It Simple Stupid