rm  -f  $BOOST_LOCK
if    module_installed  NVIDIA;  then  lin  NVIDIA;  fi
if    module_installed  pango;  then  lin  -c  pango;  fi 
if    module_installed  fontconfig; then lin -c fontconfig; fi

if ! grep -q '. /etc/profile' /etc/X11/xdm/Xsession; then
  sedit 2s:#:.\ /etc/profile: /etc/X11/xdm/Xsession
fi

# run xfs only on unix socket:
if [ -f /etc/X11/fs/config ] ; then
  if ! grep -q "no-listen = tcp" /etc/X11/fs/config ; then
    cat >> /etc/X11/fs/config <<EOF

# more secure: do not listen on tcp ports
no-listen = tcp

EOF
  fi
fi

if   !   [  -d  /usr/lib/pkgconfig  ]
then  mkdir -p /usr/lib/pkgconfig
fi 

ln -sf /usr/X11R6/lib/pkgconfig/xft.pc /usr/lib/pkgconfig &&
ln -sf /usr/X11R6/lib/pkgconfig/fontconfig.pc /usr/lib/pkgconfig &&

message "Running fc-cache please be patient" &&
/usr/X11R6/bin/fc-cache -f 
