Files in /var/spool/sockets/ICE?

Q: Is it OK to remove the files from /var/spool/sockets/ICE?

A: Yes, these files are leftover from running Xwindows (actually, running CDE). They are leftover when users do not logout and close their desktop (CDE) sessions properly.

If someone is running CDE, there will be a socket with the process ID number (PID). Those sockets should be left in place. To save time, here is a simple script to remove the unused files:

 #!/usr/bin/sh

 cd /var/spool/sockets/ICE

 /usr/bin/ls | while read X

 do

     kill -0 $X > /dev/null

     RTN=$?

     && rm $X

 done

Just put this into a file in /tmp and run it like this:

sh /tmp/ICEcleanup

As a note to the above:  kill -0 (that’s zero, not the letter o)  simply verifies that the PID ($X in the above code) exists.  If not, then $RTN will be non-zero.

This avoids removing active sockets.

– See more at: http://serviceitdirect.com/blog/files-varspoolsocketsice#sthash.g9cr7qWQ.dpuf


Tags: