From Fedora Project Wiki

< KDE

mNo edit summary
Line 65: Line 65:




[[Class:KDE]]
[[Category:KDE]]

Revision as of 18:21, 2 February 2015

Home directory on NFS (Network File System) with KDE might cause problems while desktop's IPC (Inter Process Communication) socket's are stored on networked disk and I/O-speed of network and storage itself doesn't match speeds that today's desktop systems can provide with local disk. This might appear as sluggishness and occasional hangups on desktop.

User's KDE IPC files under ~/.kde directory:

lrwxrwxrwx.  1 tuju tuju   22 Nov  5  2012 cache-wasa.netnix.ee -> /var/tmp/kdecache-tuju
lrwxrwxrwx.  1 tuju tuju   26 Feb  2 15:47 socket-wasa.netnix.ee -> /run/user/500/ksocket-tuju
lrwxrwxrwx.  1 tuju tuju   13 Nov  5  2012 tmp-wasa.netnix.ee -> /tmp/kde-tuju

Following user's environment variables can be used to change where these different IPC-files are stored and point them into local disk. To make them system-wide for every user, each setting can be put into own file and dropped into /etc/profile.d directory to get included into user's login process.

XDG_CONFIG_HOME

if [ -d /data/$USER/.config ]; then
  XDG_CONFIG_HOME=/data/$USER/.config
  export XDG_CONFIG_HOME
fi

XDG_CACHE_HOME

# could be more paranoid, and not accept any previously defined XDG_CACHE_HOME
if [ -z "${XDG_CACHE_HOME}" ] ; then
  XDG_CACHE_HOME="/var/tmp/xdgcache-${USER}"
  export XDG_CACHE_HOME
fi

if [ -d "${XDG_CACHE_HOME}" ]; then
  # verify existing dir is suitable
  if ! `test -G "${XDG_CACHE_HOME}" -a -w "${XDG_CACHE_HOME}"` ; then
    # else, make a new/secure one with mktemp
    XDG_CACHE_HOME="$(mktemp -d ${XDG_CACHE_HOME}-XXXXXX)"
    export XDG_CACHE_HOME
  fi
else
  mkdir -p "${XDG_CACHE_HOME}" 
fi


XDG_DATA_HOME

if [ -d /data/$USER/.local/share ]; then
  XDG_DATA_HOME=/data/$USER/.local/share
  export XDG_DATA_HOME
fi


KDEHOME

KDEHOME affects where .kde socket files are located.

# cat USE_LOCAL_DATA.sh 

if [ -d /data/$USER/.kde ]; then
  KDEHOME=/data/$USER/.kde
  export KDEHOME
fi

See Also