wgscott
01-13-2003, 01:15 AM
On 4 separate machines I found that I could not use x11.app with any user account other than the one used to install the application.
I finally tracked the problem down to a file and directory in /tmp that is created when x11.app opens. These are supposed to be deleted when the application is quit or when you log out of the console (thus quitting the application). On my computers this wasn't happening.
Manually deleting the
/tmp/.X0-lock
and
/tmp/.X11-unix/
files and directory solved the problem, but I wanted to have this done automatically.
The way to do this is as follows:
Add a -LogoutHook switch to the console line of the /etc/ttys file. Then after -LogoutHook put in the absolute path to a shell script that contains the following:
#!/bin/csh
chmod a+w /tmp/.X0-lock
chmod -R a+w /tmp/.X11-unix
rm -f /tmp/.X0-lock
rm -f -R /tmp/.X11-unix
exit
The -LoginHook and -LogoutHook are documented here. This was pointed out to me by Gary Kerbaugh.
http://developer.apple.com/techpubs/macosx/Essentials/SystemOverview/BootingLogin/Customizing__Procedures.html
I had to restart to get it to work but I imagine that there is a more elegant way.
I finally tracked the problem down to a file and directory in /tmp that is created when x11.app opens. These are supposed to be deleted when the application is quit or when you log out of the console (thus quitting the application). On my computers this wasn't happening.
Manually deleting the
/tmp/.X0-lock
and
/tmp/.X11-unix/
files and directory solved the problem, but I wanted to have this done automatically.
The way to do this is as follows:
Add a -LogoutHook switch to the console line of the /etc/ttys file. Then after -LogoutHook put in the absolute path to a shell script that contains the following:
#!/bin/csh
chmod a+w /tmp/.X0-lock
chmod -R a+w /tmp/.X11-unix
rm -f /tmp/.X0-lock
rm -f -R /tmp/.X11-unix
exit
The -LoginHook and -LogoutHook are documented here. This was pointed out to me by Gary Kerbaugh.
http://developer.apple.com/techpubs/macosx/Essentials/SystemOverview/BootingLogin/Customizing__Procedures.html
I had to restart to get it to work but I imagine that there is a more elegant way.