[OpenIndiana-discuss] installing oracle 11g
Jim Klimov
jimklimov at cos.ru
Mon Jun 4 10:13:11 UTC 2012
2012-06-04 9:30, Dave Koelmeyer wrote:
> On 05/24/12 10:20 AM, Alan Coopersmith wrote:
>>
>> The simplest workaround is to grant the Oracle user permission before
>> you su to
>> it:
>> xhost +si:localuser:oracle
>>
>
> Hi Alan/all,
>
> Out of interest, assuming I am granting a local user permission to use X
> in this manner, how do I make this persist across reboots?
> The man page implies I create an X0.hosts file at /etc containing
> "+si:localuser:oracle", but this doesn't work. I probably haven't got
> the format right, but any pointers?
I'd use the profile file for the X11 window manager your
interactive user uses (root or whoever). I don't use X11
interactively (on console) but rather as a TightVNC server -
there such settings can go into ~/.vnc/xstartup script.
Maybe this snippet would help your profile: it permits
the server's local zones and optionally some listed hosts
the right to access the GZ's VNC server for management
(i.e. installing the Oracle with its interactive wizard),
and this is a little breach because the VNC server is
fired up for such tasks and is normally disabled:
##########
# (C) 2008-2012 by Jim Klimov: allow local zones to this X11 server
# Permit the following hosts to use this VNC for display
XHOSTLIST="localhost `hostname`"
if [ -s "/etc/default/vncserver-xhosts" ]; then
XHOSTLIST="$XHOSTLIST `cat /etc/default/vncserver-xhosts`"
fi
if [ -x "/usr/sbin/zoneadm" ]; then
# This system contains some Solaris zones
# We simply presume that zone names are known (resolvable)
# as IP addresses via hosts file or DNS
XHOSTLIST="$XHOSTLIST `/usr/sbin/zoneadm list -cp | grep -v global
| while IFS=: read ZID ZNAME ZSTATE ZPATH; do /bin/echo \" $ZNAME\c\";
done`"
fi
echo "XHOSTLIST=$XHOSTLIST" >&2
if [ x"$XHOSTLIST" != x -a x"$XHOSTLIST" != "x " ]; then
for XHOST in $XHOSTLIST; do
echo "Adding XHost: $XHOST..." >&2
xhost + "$XHOST"
done
fi
##########
I guess it should be trivial to replace or expand this logic
with one needed for local users (i.e. as a list file in the
topmost clause).
HTH,
//Jim Klimov
More information about the OpenIndiana-discuss
mailing list