Starting X-Windows via Background Process - RH 6.1

Starting X-Windows via Background Process - RH 6.1

Post by Beta Tec » Wed, 15 Dec 1999 04:00:00

In the past, we have run a program as a particular user (aptly named user)
that starts up the X-Windows interface and our own application (with
corresponding login box.)  This allows the user to get into the system
without his own Unix login ID, and keeps the box secure.

We just upgraded from RedHat 5.2 to RedHat 6.1, and am receiving a "You
don't have access to the console" message in a log.  Basically, in inittab,
we run a script that su - user ....  to become the user, user, with all the
normal setups.  This script runs a program (SystemMonitor) that reads out of
a database the programs that need to be run.  In this list is the script
/usr2/user/betacell for starting X-Windows.  (The script makes sure any
previous instances of X-Windows are dead, and then runs startx.)
SystemMonitor then starts our user interface.

With the upgrade to 6.1, without access to the console, I am not certain
what to do.  I can log into a virtual terminal as user and run betacell
without a problem, but I don't want our users to need to login to Unix.  I
have tried adding user user to the console group in /etc/group, but that
hasn't helped.  I have also tried adding SystemMonitor, betacell and startx
to /etc/security/console.apps, but it hasn't had any effect.  I could start
XDM and make the user login via X-Windows, or have both the XDM and our
interface on the screen, but I don't want that, either!  What else can I
possibly do?

Private e-mail prefered and I will post a response to the group with a
working answer, assuming I get one.

Terry Steyaert


1. Killing csh background process **AND** any unfinished processes (fg and background) it started


Does anybody know of a solution for killing a csh background process
**AND** any unfinished processes (fg and background) it started.

I know you guys think tcsh sucks but translating the csh code to bash is
not trivial task because of it's large volume of the case I have at

I should mention that when the csh script is started in the foreground
on a terminal and I do a ^C it behaves excellent in that it exits and
all the processes it started exit.

Things I considered (and didn't work for me):

   * Use the -q option of csh and kill with a signal: QUIT (3). Only
     kills the shell but not a process started by the shell in the
     foreground (actually another csh).
   * Use the csh onintr command and when interrupt time arrives the
     processes will be killed with signal INT (2) before the script
     exits. The same for the processes started. With the many scripts
     this becomes unfeasible. I'm hoping to add a line or two to each
     script, max.
   * Use the tcsh hup command and kill with a signal: HUP (1). Again,
     the process started by tcsh in the fg doesn't finish.
   * Set limits on cpu usage. Ugly and insufficient because a process
     might not take cpu but still get left behind.

After this mess is solved, I'll try to hook this all up to Python;-) And
never code in csh again?

Thanks for your time,

2. Passwd bug?

3. problems with starting X window on RH 6.1,description of error

4. Changing partiion from A/UX to Apple_HFS

5. Windows ME doesn't start with RH 6.1

6. Openbsd Wireless Node

7. Background Starting X-Windows w/o XWD

8. Where can I acquire libbsd.a?

9. Background Starting X-Windows

10. Background processes started via CGI

11. Can't start Control-panel via X-windows (Red Hat 3.2)

12. background on RH 6.1 X login screen

13. Capturing the Process ID of a Process started in Background in ksh