Bug 142806

Summary: startkde should check lnusertemp return values
Product: [Plasma] ksmserver Reporter: Moritz Muehlenhoff <jmm>
Component: generalAssignee: Lubos Lunak <l.lunak>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch to check return values of lnusertemp in startkde

Description Moritz Muehlenhoff 2007-03-10 23:59:34 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Unspecified Other
OS:                Linux

The following was filed as Debian bug #292078, it still applies to 3.5.6, please consider the provided patch: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=292078

The default startkde script provided with KDE does not seem to check any 
exit values for lnusertemp:

    165 # Link "tmp" resource to directory in /tmp
    166 # Creates a directory /tmp/kde-$USER and links $KDEHOME/tmp-$HOSTNAME to    166  it.
    167 lnusertemp tmp >/dev/null
    168
    169 # Link "socket" resource to directory in /tmp
    170 # Creates a directory /tmp/ksocket-$USER and links $KDEHOME/socket-$HOST    170 NAME to it.
    171 lnusertemp socket >/dev/null
    172
    173 # Link "cache" resource to directory in /var/tmp
    174 # Creates a directory /var/tmp/kdecache-$USER and links $KDEHOME/cache-$    174 HOSTNAME to it.
    175 lnusertemp cache >/dev/null

There are several reasons this is not correct, the most important being 
that if /tmp (or /var/tmp) are full and lnusertemp cannot do it's job 
(create a directory there), the startkde will happily keep on working even 
though the needed symlinks are not going to be there. 

IMHO the exit status of all of these actions should be tested, how about 
the attached patch to improve over the existing script? (it also includes a useful comment on how to prevent user files from ending up in /tmp or 
/var/tmp since KDE does not honor $TMPDIR)
Comment 1 Moritz Muehlenhoff 2007-03-11 00:01:08 UTC
Created attachment 19933 [details]
Patch to check return values of lnusertemp in startkde
Comment 2 Lubos Lunak 2007-03-12 19:05:00 UTC
I don't see the point of checking for lnusertemp, since it's run after other KDE executables, and the removed call to dcopserver_shutdown is probably an oversight, but the check for lnusertemp value is added now.