Re: .X0-lock and .X11-unix/
Re: .X0-lock and .X11-unix/
- Subject: Re: .X0-lock and .X11-unix/
- From: Steve Lidie <email@hidden>
- Date: Fri, 28 Feb 2003 02:38:59 -0500
On Friday, February 28, 2003, at 12:54 AM, Randy Ford wrote:
On Wednesday, February 26, 2003, at 10:10 AM, Eric Linton wrote:
Hi,
I have looked through the FAQs and the Archives and I know these
exist but how do I automatically get rid of them without rebooting on
a multiuser machine? I am running beta 0.2.1 and even when I quit via
the Quit menu command these files remain.
So does anyone have a suggestion or will this be fixed soon. I seem
to remember someone having a work around but I can not find it in the
archives.
You can modify the console entry in /etc/ttys to have a script ran
after every user logs out. Add "-LogoutHook /path/scriptname" inside
the quotes, but after the "loginwindow":
console
"/System/Library/CoreServices/loginwindow.app/Contents/MacOS/
loginwindow -LoginHook /etc/global_logout_script" ...
Use _caution_: the script runs as root, not the user. Fully specify
everything, set appropriate file permissions, etc. Don't do this if
you don't know enough about scripting, Unix security, troubleshooting,
etc.
I've tried this with -LoginHook, but not -LogoutHook. I'm assuming
that it works the same way (root, etc.) Test, test, test.
I saw this documented somewhere, but I can't seem to find it now. I'm
thinking it was an announcement of changes from version 10.2.x to
10.2.y.
(Eric, I'm not making any assumptions about your knowledge. I wanted
appropriate warnings for whoever would read this on the list and in
the archives.)
The archives should show how to do this, assuming this list is archived
(;
Here's one way to do it. First, the change to /etc/ttys simply adds the
-LoginHook option and the pathname of the program to execute (the
following is one long line):
console
"/System/Library/CoreServices/loginwindow.app/Contents/MacOS/
loginwindow -LoginHook /Users/Admin/bin/clean-X11"
vt100 on secure window=/System/Library/CoreServices/WindowServer
onoption="/usr/libexec/getty std.9600"
And the script /Users/Admin/bin/clean-X11 looks like this (with
permissions 755):
[lusol@Cube0:/Volumes/Backup/Users/admin/bin] more clean-X11
#!/bin/bash
cd /tmp
/bin/rm -fr /tmp/.X0* /tmp/.X11*
Seems to work fine on our public site iMacs (using Kerberos
authentication and AFS home directory).
Steve
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.