Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

automating xhost + at boot

0 views
Skip to first unread message

Gary Quiring

unread,
Sep 20, 1999, 3:00:00 AM9/20/99
to
I want to automate xhost + at boot on a SCO 5.0.5 server. My Informix apps
need this open for the apps to run. I can't find the right place to stick
the xhost + command.

sys.startxrc file is only executed after you login to the console.
I tried inittab NG: xh:2:once:/usr/bin/X11/xhost +

I tried placing the users in the X0.hosts. That also did not work.

Gary Quiring


Adam Price

unread,
Sep 21, 1999, 3:00:00 AM9/21/99
to

Gary Quiring wrote in message <37e8894b...@news.netlabs.net>...
Don't do it, if informix apps really require this then bin them.
If you must, then the right place to do this is in a wrapper
around each of the Informix apps, such that they do an xhost +`hostname`,
start the app in the background, do an xhost -`hostname` then wait for
the app or something... but don't just leave the Xserver open to the world.

Hope this helps
Adam
PS if you want an answer to your question as given, then find the startup
script that starts X and make your mods there.

Gary Quiring

unread,
Sep 21, 1999, 3:00:00 AM9/21/99
to
On Tue, 21 Sep 1999 05:42:54 +0100, "Adam Price"
<adam+...@pappnase.demon.co.uk> wrote:

>
>Gary Quiring wrote in message <37e8894b...@news.netlabs.net>...
>>I want to automate xhost + at boot on a SCO 5.0.5 server. My Informix apps
>>need this open for the apps to run. I can't find the right place to stick
>>the xhost + command.

>>


>Don't do it, if informix apps really require this then bin them.
>If you must, then the right place to do this is in a wrapper
>around each of the Informix apps, such that they do an xhost +`hostname`,
>start the app in the background, do an xhost -`hostname` then wait for
>the app or something... but don't just leave the Xserver open to the world.

The informix apps are windows binaries. The db server is SCO. I need to
automate this, as we like to boot our server at least once a week. Now it
requires someone to have access to the console to launch this manually.

Gary Q


Bernd Strieder

unread,
Sep 21, 1999, 3:00:00 AM9/21/99
to
Hi,

I'm not sure if I understood you correctly. Especially what apps run
where and where they need to be displayed.

If you have X apps you want being displayed on the Windows boxes:

Try ssh. Although this might seem as overkill, it has great benefits. It
does automatic X forwarding, even onto Windows boxes if you have an X
Server on windows. You need a ssh-client for Windows and ssh for UNIX.
Ssh gives you possibilities to remote access your network in a secure
manner.

If you have Windows apps to be displayed on the Server, there might be
something called VNC that could help you, if it has been ported to SCO.

After all, if you need automation, why not using cron-jobs on the server
to reboot the database engine. There should be ways to do this cleanly
without having to use a client box.

Regards,

Bernd Strieder

DanH

unread,
Sep 21, 1999, 3:00:00 AM9/21/99
to
Gary Quiring wrote:
>
> On Tue, 21 Sep 1999 05:42:54 +0100, "Adam Price"
> <adam+...@pappnase.demon.co.uk> wrote:
>
> >
> >Gary Quiring wrote in message <37e8894b...@news.netlabs.net>...
> >>I want to automate xhost + at boot on a SCO 5.0.5 server. My Informix apps
> >>need this open for the apps to run. I can't find the right place to stick
> >>the xhost + command.
>
> >>
> >Don't do it, if informix apps really require this then bin them.
> >If you must, then the right place to do this is in a wrapper
> >around each of the Informix apps, such that they do an xhost +`hostname`,
> >start the app in the background, do an xhost -`hostname` then wait for
> >the app or something... but don't just leave the Xserver open to the world.

> The informix apps are windows binaries. The db server is SCO. I need to
> automate this, as we like to boot our server at least once a week.

Why? UNIX is made to stay running. Don't get into the WIN habit of
rebooting, you don't need to. What causes you to reboot? If you have a
process running away, kill it and then restart it, don't reboot.

Reboot once a week? Our WIN people have to do that, the Solaris, HP,
DEC, AIX, SCO boxes just stay on and get rebooted when the kernel is
upgraded (about once or twice a year with security patches.)

Don't put that wear and tear on your machines, the OS doesn't need it
and you'll wear out the equipment faster.

Dan
--
UNIX - Not just for vestal virgins anymore
Linux - Choice of a GNU generation

Rev. Don Kool

unread,
Sep 26, 1999, 3:00:00 AM9/26/99
to

DanH wrote:

Dan, you're falling into the UNIX cut off my nose off to spite Bill
Gates trap. Rather than reply with a knee-jerk anti-Microsoft
reaction to everything, why don't you consider the alternatives?
There are situations where a reboot is a big deal and there are
situations where it isn't. In a 9 to 5 office setting a cron job to
reboot all the workstations once week after hours is no big deal.
While it offends the sensibilites of the UNIX-erati who measure
their manhood against uptime, in reality it cleans up the machine
and doesn't hurt a thing. If you contend, as you do above, that a
UNIX box can go 6 months before needing a reboot, then you must
admit that a box rebooted at 2AM every Sunday will probably never
crash during business hours.


Hope this helps,
Don


--
********************** You a bounty hunter?
* Rev. Don McDonald * Man's gotta earn a living.
* Baltimore, MD * Dying ain't much of a living, boy.
********************** "Outlaw Josey Wales"
http://members.home.net/oldno7

Alex Verstak

unread,
Sep 26, 1999, 3:00:00 AM9/26/99
to
In article <37ED8486...@home.com>, Rev. Don Kool wrote:
> There are situations where a reboot is a big deal and there are
> situations where it isn't. In a 9 to 5 office setting a cron job to
> reboot all the workstations once week after hours is no big deal.

But why reboot? I can understand ifconfig down to rehash some
web database, but reboot?

> While it offends the sensibilites of the UNIX-erati who measure
> their manhood against uptime, in reality it cleans up the machine
> and doesn't hurt a thing.

How does reboot clean up a machine? What does it do that cannot
be done with a cron job?

It does hurt the hardware. At least, the crappy hardware I usually
have. :(

> If you contend, as you do above, that a
> UNIX box can go 6 months before needing a reboot, then you must
> admit that a box rebooted at 2AM every Sunday will probably never
> crash during business hours.

I can't follow your logic here.

--
Drive^H^Hnk safely!
Alex Verstak averstak at vt dot edu
1078 Ambler Johnston East Virginia Tech
Blacksburg, VA 24060-0022 Tel. (540) 232-1389


Dmitry Gordov

unread,
Sep 27, 1999, 3:00:00 AM9/27/99
to
Another way is creating file /etc/X0.hosts with the hostnames authorized to
access to X-server.

Regards

"Rev. Don Kool" wrote:

> Alex Verstak wrote:
> > Rev. Don Kool wrote:
>
> > > You're missing the point. The question is not "why reboot" but why
> > > not.
>
> > Because you loose xhost+ entries, because you need to update boot
> > scripts after every change to configuration, ... Because you need
> > to set it up so it can reboot automatically, which is a lot more
> > involved and error-prone than a simple cron entry.
>
> Actually if you've set up your "/[etc/sbin/]/init.d" scripts
> properly, you've lost nothing save performance robbing garbage.
>
> [...snip...]


>
> Hope this helps,
> Don
>
> --
> ********************** You a bounty hunter?
> * Rev. Don McDonald * Man's gotta earn a living.
> * Baltimore, MD * Dying ain't much of a living, boy.
> ********************** "Outlaw Josey Wales"
> http://members.home.net/oldno7

--
Dmitry Gordov
Instructor
IBM Learning services
Russia

David Stanaway

unread,
Sep 27, 1999, 3:00:00 AM9/27/99
to
In article <slrn7usk1u...@averstak.campus.vt.edu>, Alex Verstak wrote:

>In article <37EE188A...@home.com>, Rev. Don Kool wrote:
>> You're missing the point. The question is not "why reboot" but why
>> not.
>
>Because you loose xhost+ entries, because you need to update boot

This is a good candidate for a reason not to reboot.. but using xhost+ entries
is not a necessity if you use things like ssh's X11 proxy, or more securely.
usage of Xauth cookies(Sorry.. don't know much about them).

>scripts after every change to configuration, ... Because you need
>to set it up so it can reboot automatically, which is a lot more
>involved and error-prone than a simple cron entry.

This is actually the basis of a very good argument in favour of regular
reboots. If you have a systems that configuration is not very static..
then it is a bad thing I think to leave all of these changes untested by
reboot. What happens if you get a disk faliure, and when you reboot.. all
of you init scrips (Well obviously not ALL.. but the important new ones you
should have added) dont work! If you only reboots are unscheduled ones.. then
you could wind up with a really stressfull afternoon with your boss breathing
down your back, while you are searching through your backup tapes for a
version of your system that boots properly.. and lets not forget the problem
that caused your unscheduled reboot.

I don't claim to be a Professional Sysadmin, but I imagine professional
sysadmins would value schedualled reboots.. especially on systems that change
their configuration quite regularly.. so that they can be sure that if
something bad does happen.. there are a few less things they have to worry
about when the system is coming back up.


>I have a PC running UNIX that I reboot once per three months for an
>upgrade. Same reasons--rebooting is too much trouble. It is not
>a requirement that a personal computer stays up 24/7, but it's pretty
>convenient if it does. The probability of me working at 2AM Sunday
>is *very* low, but when multiplied by a few hundred of employees and
>curved with respect to deadlines...

You probably have a resonably static installation and don't rely on daemons
starting up smoothly (Oh, and lets not forget shutting down smoothly.. I have
heard of cases of people not having the correct shutdown scripts to close their
database.. and having serious grief when they reboot).

>> kills zombie processes,
>
>Killing the parent will wipe them clean.

Situations do occur where Zombie processes have no parent (Well.. their
parent is init) Netscape seems to be a principle culprit in my domain.

>> unfragments memory,
>
>I can't tell the difference in performance.

This figure would be rather system dependant, and weighted by your ratio
of physical RAM to Swap, and .... (Probaly not much of an issue except on
heavily loaded systems).

.========================================================.
-------=| David Stanaway |System Administrator |=-------
-------=| da...@netventures.com.au |Sydney Light Enterprise Ltd. |=-------
`========================================================'

Timothy J. Bogart

unread,
Sep 28, 1999, 3:00:00 AM9/28/99
to

In article <37EE77BB...@home.com>, Rev. Don Kool <old...@home.com> wrote:

>
>
>Alex Verstak wrote:
>> Rev. Don Kool wrote:
>
>> > You're missing the point. The question is not "why reboot" but why
>> > not.
Well if that is your question fine, but it was not the original question.

>
>> Because you loose xhost+ entries, because you need to update boot

>> scripts after every change to configuration, ... Because you need
>> to set it up so it can reboot automatically, which is a lot more
>> involved and error-prone than a simple cron entry.
>

> Actually if you've set up your "/[etc/sbin/]/init.d" scripts
>properly, you've lost nothing save performance robbing garbage.
>
> [...snip...]

This doesn't have much to do with having to schedule around developers who
work odd hours, or are running long jobs to check for memory leaks, or admins
who are monitoring something going on somewhere...most of which can be automated
or logged, but it is more work to do this for each individual problem you might
be chasing. Further, anyone who gets interrupted even working on a report or
memo, only to have to reopen the application and document cause you got called
away near the end of the day.

Some reasons for reboot - change/add hardware to a machine that does not
support that hardware change while running.

You have such a sucky memory leaky OS that the only way you can keep it
running during working hours is to shut it down daily or weekly.

Required security/OS emergency patches - and at that, only on test machines
until you get the install correct and you know you can do the rest of
the machines properly.

You can't afford your electric bill, and you shutown operations for
a number of hours a day (rather than just rebooting). And that _does_
affect your lifecycle on the equipment.

Come to think of it, it isn't just developers that come in at odd
hours, and would seem to gain from not having random interruptions. Or
having to resetup a busy desktop...

Gary Quiring

unread,
Sep 28, 1999, 3:00:00 AM9/28/99
to
On Tue, 21 Sep 1999 18:26:07 +0200, Bernd Strieder
<stri...@student.uni-kl.de> wrote:


>> >
>> >Gary Quiring wrote in message <37e8894b...@news.netlabs.net>...
>> >>I want to automate xhost + at boot on a SCO 5.0.5 server. My Informix apps
>> >>need this open for the apps to run. I can't find the right place to stick
>> >>the xhost + command.
>>
>
>

>I'm not sure if I understood you correctly. Especially what apps run
>where and where they need to be displayed.

The app runs on Windows and the Informix database is on SCO. The Win apps
for some reason needs to write to the X device.

Gary Q


Gary Quiring

unread,
Sep 28, 1999, 3:00:00 AM9/28/99
to
On Mon, 27 Sep 1999 13:39:13 +0300, Dmitry Gordov
<dmitry...@ru.ibm.com> wrote:

>Another way is creating file /etc/X0.hosts with the hostnames authorized to
>access to X-server.
>

I tried that also, it does not work for some reason. What classifies a
host? All of my clients are Win95/98. They run NewERA which is an
Informix Windows language that hits the DB on the Unix server.

I tried placing the IP's of the Win boxes in /etc/hosts and then placing
the names in X0.hosts. No good. Still can't get access to the display on
SCO from Windows.

Gary Q

Gary Quiring

unread,
Sep 28, 1999, 3:00:00 AM9/28/99
to
On Tue, 21 Sep 1999 17:26:43 -0400, DanH <herr...@usa.net> wrote:

>Gary Quiring wrote:
>>
>> On Tue, 21 Sep 1999 05:42:54 +0100, "Adam Price"

>> <adam+...@pappnase.demon.co.uk> wrote:
>>
>> >
>> >Gary Quiring wrote in message <37e8894b...@news.netlabs.net>...
>> >>I want to automate xhost + at boot on a SCO 5.0.5 server. My Informix apps
>> >>need this open for the apps to run. I can't find the right place to stick
>> >>the xhost + command.

>


>Why? UNIX is made to stay running. Don't get into the WIN habit of
>rebooting, you don't need to. What causes you to reboot? If you have a
>process running away, kill it and then restart it, don't reboot.
>
>Reboot once a week? Our WIN people have to do that, the Solaris, HP,
>DEC, AIX, SCO boxes just stay on and get rebooted when the kernel is
>upgraded (about once or twice a year with security patches.)

I did an admin job once for Solaris for over 2 years. If we did not boot
that box at least once a week, forget it, it would crawl. The df command
was also busted always showing the wrong amount of disk space if the server
was not booted at least once a week.

>Don't put that wear and tear on your machines, the OS doesn't need it
>and you'll wear out the equipment faster.
>

I'm in a loaded warehouse running SCO with over 250 users. Most of my
servers I boot every night - ahhh what a pleasure. No weirdo problems, no
locked up terminals when I walk through the door every morning.

Booting a server if you have the luxury to do it, I do. Much less hassles.
I'm not proud - I'm practical. I'm not trying to run the Guiness book of
records!

Gary Q

Rev. Don Kool

unread,
Sep 28, 1999, 3:00:00 AM9/28/99
to

"Timothy J. Bogart" wrote:
> Rev. Don Kool <old...@home.com> wrote:
> >Alex Verstak wrote:
> >> Rev. Don Kool wrote:

> >> > You're missing the point. The question is not "why reboot" but why
> >> > not.

> Well if that is your question fine, but it was not the original question.

> >> Because you loose xhost+ entries, because you need to update boot
> >> scripts after every change to configuration, ... Because you need
> >> to set it up so it can reboot automatically, which is a lot more
> >> involved and error-prone than a simple cron entry.

> > Actually if you've set up your "/[etc/sbin/]/init.d" scripts
> >properly, you've lost nothing save performance robbing garbage.
> >
> > [...snip...]

> This doesn't have much to do with having to schedule around developers who
> work odd hours, or are running long jobs to check for memory leaks, or admins
> who are monitoring something going on somewhere...most of which can be automated
> or logged, but it is more work to do this for each individual problem you might
> be chasing. Further, anyone who gets interrupted even working on a report or
> memo, only to have to reopen the application and document cause you got called
> away near the end of the day.

No, it doesn't. It has to do with rebooting a machine that isn't
doing anything just because it's easier than stopping and restarting
a daemon by hand. Remember, "reboot" and "logout" are the same
number of keystrokes. Wanna restart the automounter, reboot. Wanna
restart the lp services, reboot. HTTPD stopped running, reboot.
Machine's been up over 100 days, reboot -- it could use it. If no
one is on the system, who cares? If the system doesn't come back
up, you've found out at a convenient time to fix it while no one
needed it rather than finding out when a power bump occurred in the
middle of the workday.

[...lame we never reboot because all our shit works;
you must reboot because yours doesn't rhetoric snipped...]

0 new messages