(Answer) (Category) Linux on PowerPC FAQ-O-Matic : (Category) PowerPC Linux :
/var/run/utmp is corrupted
The corruption is apparently caused by the version of xterm that comes with X11R6.3. One way to get around this problem is to run xterm with the -ut option. This prevents xterm from writing to /var/run/utmp, avoiding the problem with corruption.

You can alias xterm to xterm -ut, but this won't work on a multi-user system. Here's what I did:

1. Create a directory called "corrupted" in /usr/X11/bin, and put the corrupt version of xterm in there.

2. Write a shell script called 'xterm'. Here's mine:

[root@snowdon X11]# pwd
/usr/bin/X11
[root@snowdon X11]# ls corrupt
xterm
[root@snowdon X11]# ls -l xterm
-rwxr-xr-x   1 root     root          173 Aug 29 09:58 xterm
[root@snowdon X11]# file xterm
xterm: Bourne shell script text
[root@snowdon X11]# cat xterm
#!/bin/sh
##
## Use the -ut flag to _not_ write to utmp, since this xterm
## seems to corrupt the utmp file.
##
## fadushin 28 Aug 1997
##
/usr/X11/bin/corrupt/xterm -ut $*
[root@snowdon X11]# 
3. Remove your corrupted utmp and reboot (using the reboot command, since shutdown won't work).
fadushin@top.cis.syr.edu
Ouch!  Don't use reboot!  If you absolutely have to, sync first...
but a much better way is as follows:

1. cat /dev/null > /var/run/utmp
2. logout
3. log back in...

This should fix the utmp problem, at least until you do something
to corrupt the file again.

David
marsmail@globegate.utm.edu
[Append to This Answer]
Previous: (Answer) How do I get sound working on my LinuxPPC box?
Next: (Answer) OF tells me i have "too many extents"
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=286
[Search] [Appearance]
This is a Faq-O-Matic 2.718d.
Hosted by anduin.org and SourceForge Logo