I have seen .xinitrc scripts which are supposed to do "cleanup" after a session ends... can't say if it works or not, because I never looked too closely to see; the basic approach is to end your .xinitrc with the following:

/usr/X11R6/bin/twm
rm whatever

(substitute your window manager of choice for twm -- this is just an example)

Notice that the window manager is *NOT* preceded by exec and that it is *NOT* followed by &.
What should happen is that the shell script which starts up your X apps stays running, waiting for the window manager to terminate. Once it does, the next lines are executed in the script.

The downside that I can see is (1) the shell program (most likely /bin/sh) stays resident in memory -- not too big of a deal on modern machines with lots of memory, and (2) I don't know if the commands get executed if the window manager crashes (i.e. doesn't exit cleanly)...

Maybe someone more familiar with shells and scripting can answer the second one.


On Friday, January 10, 2003, at 02:04 PM, [EMAIL PROTECTED] wrote:

To: [EMAIL PROTECTED]
From: Jonas Steverud <[EMAIL PROTECTED]>
Organization: The Deciples of Albericht Nibelungen
Date: Fri, 10 Jan 2003 19:18:45 +0100
Subject: [Fink-users] Re: X11 and multiple users

William Scott <[EMAIL PROTECTED]> writes:

I think I have found out how to use X-windows with multiple users.

The X11 session creates a file and a directory with another file in
/tmp, i.e.,
[...]
If you delete these manually before logging out, then X11 can be
started with another user's account.

I am afraid I don't know how to tell Apple OS X to do delete these
automatically upon logging out (/etc/csh.logout was wrong).
Silly question: I assume you do not do a "exec bash" in your .cshrc
and you do not use any other shell then (t)csh as your login shell?
I.e. do you really modify the correct logout file? (I assume so, but
it is very easy to overlook the obvious.)

Benjamin Riefenstahl had the following to say in the "Help: ISPELL and
Aqua EMACS (OSX)" thread in gnu.emacs.help:

--8<----
The environment for the loginwindow and thus the Finder can be
statically configured in ~/.MacOSX/environment.plist, see <URL:
http://developer.apple.com/techpubs/macosx/Essentials/SystemOverview/ BootingLogin/Customization_Techniques.html>
--8<----

If you select "Show frames", and look at the "Customize the login and
logout" section, there is one solution. I really don't think this is
the Right Way, it is a bit of a kludge to solve your problem, but you
asked for "any advice"... ;-)

The only other way I can think of, from the top of my head, is to write
a wrapper script, which is used to start X11.app, and then waits for
it to terminate and then removes the files. How to sit and wait in a
good way, I do not know. Applescript?

--
( http://hem.bredband.net/steverud ! Wei Wu Wei )
( Meaning of U2 Lyrics, Roleplaying ! To Do Without Do )



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to