Operating System - HP-UX
1832757 Members
2962 Online
110045 Solutions
New Discussion

Re: xhost-global file/placement

 
SOLVED
Go to solution
Steven Buschman_1
Occasional Contributor

xhost-global file/placement

I'm looking for the "best" place to open up the display.
Currently I'm using users' .dtprofile, exporting localhost:0, and xhost +
I want to get it system, not user defined. Man pages poin to the use
of /etc/X0.hosts but I haven't guessed the correct syntax.
In the future, I'd like to open it to a domain (*.mydomain.com) but
currently I want it corporate-wide (no dns currently used).
6 REPLIES 6
Klaus Crusius
Trusted Contributor

Re: xhost-global file/placement


Look in /etc/dt/config or /usr/dt/config.

Klaus
There is a live before death!
Wodisch
Honored Contributor

Re: xhost-global file/placement

Hello Steven,

I guess your want to enable access to your CDE when
you write about "open up"?
That would be the config files "/etc/dt/config/Xaccess",
and "/etc/dt/config/Xconfig". The first to enlist the
hostnames or IP-addresses of those stations which are
permitted to "get" an XDMCP login screen, and the other
to enable/disable the use of "MIT-MAGIC-COOKIES" and
the "xauth(1)" command and data-file.

HTH,
Wodisch
Steven Buschman_1
Occasional Contributor

Re: xhost-global file/placement

I'm still having trouble finding documentation on the syntax of what
belongs in the config files for the Xserver to run with "open"
permissions (allowing other systems or users to use the display).
I have made the following modifications based off what I have read:
1)copied /usr/dt/config/Xaccess to /etc/dt/config/Xaccess
2)Modified /etc/dt/config/Xaccess by
adding the line
%hostlist localhost
commenting out the line
* CHOOSER BROADCAST
3) Creating the file /etc/dt/config/Xconfig (did not previously exist)
and the file consists of the line
/etc/dt/config/Xaccess
with the thought being that when xauth gets run it looks to see, if
this file exists, where to get it's access list from.

I'm sure there is more involved, even if it is a syntax issue, but I have
not seen anything in the man pages with an example of the syntax.

Thanks again!
Wodisch
Honored Contributor
Solution

Re: xhost-global file/placement

Ok Steven,

it seems you do need lots of details...

1) Go to your X-Windows config directory:
cd /etc/dt/config
2) check what's in there - on a freshly installed system
you already have:
C Xaccess Xconfig Xfailsafe Xlangsetup Xreset Xservers
Xsession.d Xsetup Xstartup
so you do NOT have to create one of them (IIRC)
3) The files you will hacve to modify are only
Xconfig: modify just that line (no comment any more):
Dtlogin*authorize: False
Xaccess: (append the ip-addresses you want):
1.2.3.4
192.168.1.1
192.168.2.3
4) send a signal HUP (i.e. "-1") to the "dtlogin" process
running with the lowest PID (process id):
export UNIX95=x
pid=$(ps -C dtlogin -o pid | sort -n | grep -v PID)
[ "$pid" -gt 0 ] && kill -1 $pid

5) try to use that X-Display (means: screen) again.

HTH,
Wodisch
Charles Slivkoff
Respected Contributor

Re: xhost-global file/placement

Using /etc/X0.hosts is a BAD idea. It can cause the Xserver to be significantly delayed on startup.



If the desire is to issue "xhost +", then simply add "-ac" to the X server startup command in /etc/dt/config/Xservers. Since this would defeat all the security of the Xserver, I would not recommend this.



For a system-wide equivalent of ".dtprofile", create a script in /etc/dt/config/Xsession.d with the "xhost" commands contained within. Be sure to set execute permission on this file. Evidence of this being run will log to ~/.dt/startlog, as it does for all the /{usr|etc}/dt/config/Xsession.d scripts.



Steven Buschman_1
Occasional Contributor

Re: xhost-global file/placement

The last suggertions were perfect!
Thanks to all, as now I also have a couple alternatives
for the issue and will probably use most of them based
off the uses for each system. Thanks again!