Help - Search - Members - Calendar
Full Version: Xhost
Linuxhelp > Support > Technical Support
zoechman
I've installed RedHat Linux AS 2.1
Now I want to start xhost + when the server is comming up.
But I don't know how to do this.

To start xhost + in /etc/rc5.d does not work.
Is there a file where I can insert to start xhost?
Joey
Try placing the command in /etc/rc.d/rc.local
zoechman
QUOTE (Joey @ Jul 16 2003, 10:25 AM)
Try placing the command in /etc/rc.d/rc.local

I want to start xhost before the Oracle instance comes up.
Oracle sarts /etc/rc5.d/S96oracle

Do You have another idea?
Joey
I'm not familiar with screwing around with init scripts but why not just disable oracle from starting up automatically and then have it run from rc.local after xhost starts.
JRandomHacker
Hello,

QUOTE
To start xhost + in /etc/rc5.d does not work.


When you created the file in /etc/rc5.d, did you give the script a lower number that S96? In other words, create a file called S95xhost in /etc/rc5.d with the following.

#!/bin/bash
xhost +


The Sxx prefix on the filename sets the order in which things come up, so by prefixing the file S95, it should come up before Oracle.
hughesjr
Also you don't necessarily have your full PATH in startup scripts ... so use the full path to the executable in the script ...

To find the full path to xhost, use the command:

which xhost from the command prompt...mine is at:

/usr/X11R6/bin/xhost

then change the line in the rc5.d script to :

/usr/X11R6/bin/xhost +

---------------------
I assume that you are locating the actual script ... called something like xhost, in /etc/init.d and then creating a link to the file like this from within /etc/rc5.d

ln -s ../init.d/xhost S95xhost
---------------------

If the startup of xhost is tied to oracle (and the oracle user) ... then you must do it as the oracle user ... you must either change the xhost script to do it like this:


QUOTE
#!/bin/bash
su - oracleuser -c '/usr/X11R6/bin/xhost +'


OR

edit the /etc/init.d/oracle script and add it as a line in the start section of that script....the line would be:

/usr/X11R6/bin/xhost +
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.