LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-27-2004, 12:20 AM   #1
Sinope
Member
 
Registered: Aug 2004
Location: Chicago
Distribution: Debian testing/unstable
Posts: 82

Rep: Reputation: 15
Control over parent of processes?


I use X, XDM and Fluxbox. Slackware 10, kernel 2.6.8.1, nothing bizarre.

When I look at a process tree, I expect see all my X apps as children of .xsession, so that I could kill Fluxbox and run TWM if I wanted, or if I kill .xsession, they will all terminate. This is not what happens, though.

I see some of my apps (thunderbird, gaim, xterm, firefox) as children of Fluxbox. This isn't really a problem since I'm never out of Fluxbox, but it's not ideal.

The real issue is that many apps (artsd, juk, ksysguard, gvim, everything docked in the slit i.e. wmweather) seem to somehow "escape" X altogether and are children of init. This *is* a problem, because it means that if I end my fluxbox session without closing these, they will not be shut down properly if at all. For instance, if I logout and log back in, juk will still be running somewhere in the ether and won't open a new instance until I manually kill the old one from a terminal. Also, artsd sometimes terminates and sometimes doesn't, so if I logout and log back on, the sound sometimes doesn't work. ARGH!

I'm not sure why some apps behave differently from others. The only thing I can think of that the init-children have in common is that they are apps that are specially made for window managers that I am not using (KDE, Gnome, WindowMaker), while the Fluxbox-children are "generic" X programs like xterm and gaim.

I want EVERYTHING I run under fluxbox be a child of .xsession, so that these processes be killed correctly when I log out. Right now, NOTHING I run is a child of .xsession, with the exception of Fluxbox and xscreensaver, which are actually called by .xsession.

How do I fix this? Thanks!

If it helps:

Code:
~$ cat .xsession
#!/bin/bash

# start xscreensaver
xscreensaver -no-splash &

# run dockapps
~/.fluxbox/dockapps.sh &

# start window manager and get PID
fluxbox &
WMPID=$!

# set up background and get PID
`cat ~/.rootcommand` &
ROOTPID=$!

# wait for WM
wait $WMPID

# kill root command
kill $ROOTPID
~$
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
monitoring active processes and identifying the required processes. gajaykrishnan Programming 2 08-13-2004 01:58 AM
Parent child processes signal sharing iftiuk Programming 8 06-24-2004 01:32 PM
Looking for the file that control what processes are loaded! sjia Linux - Software 1 04-08-2004 12:21 AM
parent and child processes skora Programming 5 11-02-2003 10:41 AM
FPU and SSE control word and processes proberts9999 Linux - General 0 08-20-2003 10:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration