Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8281 - KDE starts slow because of /tmp/.ICE-unix
Summary: KDE starts slow because of /tmp/.ICE-unix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: x86 Linux
: Lowest enhancement (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-23 21:15 UTC by Jan van Dijk
Modified: 2003-02-04 19:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan van Dijk 2002-09-23 21:15:48 UTC
When kde is started as user /tmp/.ICE-unix is created with owner user. KDE 
will start a lot faster when /tmp/.ICE-unix would be created as owner root. 
Could you change this? Or is there a reason for creating it as user and not as 
root? 
 
These are the error messages: 
_KDE_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root 
_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root 
 
As a test for speedup you could start KDE as root.
Comment 1 Jan van Dijk 2002-09-25 17:04:15 UTC
I now looked at a debian box there ICE-unix is owned by root, so i think it
could not be a security problem to do so. But on this Box no KDE was installed,
so something else creates it (XFree?) i asked in the Xfree channel on
openprojects.net, but nobody knew it. So please could you maintainer of kde at
gentoo reassign it to the correct maintainer? 
I know this is no real Bug, but Gentoo the fast penguin is known for speed and
for that reason it would be nice. Sorry that i dont know much about programming,
if so  i would apply a patch, because i use gentoo because of the speed of it.
It is really great. Maybe on your system it doesn't matter but i ensure you that
it does on some systems, like mine. Thank you.
Comment 2 Sloan Poe 2002-09-26 08:18:46 UTC
Where would this be changed?  In the kde configure?
Comment 3 Jan van Dijk 2002-10-02 10:22:55 UTC
Hi Sloan,
there are two ways, i think. 
1. one is to get X(or whatever) to make the owner of /tmp/.ICE-Unix root
2. one is to get KDE to not check or not wait when detecting that it is another
owner (of /tmp/.ICE-Unix) than root. 

The thing is only the ownership of this folder. I don't know who could change
it, or even which software creates it. But something of KDE checkes it and this
is time consuming (approx. 2-3 sec on my system), but i don't know why. 
Comment 4 Sloan Poe 2002-10-02 11:07:41 UTC
Sorry, I should have posted this earlier.

I simply added the following lines to /etc/conf.d/local.start
chown root:root /tmp/.ICE-unix
chmod 1777 /tmp/.ICE-unix


that worked like a charm. Of course this is assuming that the dir has already
been created.
Comment 5 Jan van Dijk 2002-10-02 11:38:07 UTC
Hi Sloan,

Yes, this works, when /tmp/.ICE-unix exists, but normaly after booting the
maschine it doens't. Or do you got there a hint for me?
I testet now to start only X or X with another WM/DE, it won't be created, so it
is something that is created from KDE, it will be created too if a
KDE-Application is started in another WM/DE (the time consumption is then
existing in the same way). I hope someone could fix it (the checking or the
creating of dir as user).
Comment 6 Jan van Dijk 2002-10-02 14:46:44 UTC
Ok, i searched on KDE an google and found several things:

Waldo Bastian (KDE):
----snip----
> _KDE_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root

This is only a warning and shouldn't be fatal. Your operating system should
provide you with a root-owned /tmp/.ICE-unix btw complain to your admin or
your vendor that they don't setup their system properly. The real problem is
something else. 
----snip----
http://bugs.kde.org/show_bug.cgi?id=33618
Oh, that was back in the year 2001 and the bug is closed for KDE.

Other people in a different discussion about the same problem in Gnome blame
libICE and the striped version of it in KDE.
Alan Cox wrote a workaround for it. It is posted in the same discussion:
http://mail.gnome.org/archives/gnome-hackers/2001-September/msg00194.html

So one blames another and it is not important for me who should make the problem
go away, but please someone just do it. 

I am no programmer i even couldn't test the workaround of Alan Cox, if someone
could, maybe this could be the solution.

Thank you for reading this and maybe more.

Jan van Dijk
Comment 7 Dan Armak (RETIRED) gentoo-dev 2002-10-04 11:50:47 UTC
OK... This is interesting. :-)      
      
Azarah: I'm bringing you in because a fix to xfree is possible.      
      
I've looked at the source for this (kdelibs/dcop/KDE-ICE/Xtransutil.c line      
525). There was once a 5-second sleep() call if root wasn't the owner of e.g.      
/tmp/.ICE-unix, but this has been removed (commented out) since kde 2.2.2 alpha      
2 (May 2001).      
      
There is however also the libICE of xfree86 itself. It still has the sleep      
calls active, which affects fex. gnome. It's unclear what purpose they might  
serve, and I think they can be commented out like the ones in kde's custom  
libICE derivative. All the discussions about this I could find reached the same  
conclusion. (See the one linked above fex.)    
    
Probably the X11 code makes a 5 sec delay on /tmp/.X11-unix?   
     
Other than that, we should probably make /tmp/.{ICE,X11}-unix owned by root.  
The question is, how? The discussions (on redhat, mdk and gnome lists) reached  
no good conclusion. Something is wrong somewhere because neither X nor the kde  
files that include the ICE code have to run as root.   
  
If these dirs aren't owned by root there's a secutiry problem, because the user  
that does own them has more privileges wrt. them than other users, although the  
only difference between these users are that one of them started X/kde before  
the others and so those dirs were created in his name.  
  
That's a bad explanation I know and I'm not sure how well I understand the  
situation myself, if someone can explain it better please do so.  
  
Azarah, what do you think? Regardless of the security situation the sleep calls  
don't server any purpose afaics, can we disable them in xfree 4.2.1? I wonder  
if they're still enabled in xfree 4.3 and what the xfree developers think...  
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-12 10:25:33 UTC
Create and fix permissions of /tmp/.{ICE,X11}-unix and also remove the
stupid delay.  This is in XFree-4.2.1.