[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: kword problem
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-05-15 8:51:56
[Download RAW message or body]

On Wednesday 15 May 2002 10:44, Raoul Beauduin wrote:
> Hello,
> 
> I get this message when I run kword in a xterm. I don't understand
> it.
> 
> Thanks for your help.
> 
> RB
> 
> ---------------------------
> koffice (lib kofficecore): WARNING: Office/KOffice/kword.desktop: no
> X-KDE-NativeMimeType entry!
> koffice (lib kofficecore): ERROR: Couldn't find the native MimeType
> in kword's desktop file. Check your installation !

KWord version ? Compiled or RPM ?
If compiled: same prefix for koffice and for KDE ?
(if not, see instructions on koffice.org about editing kderc or $KDEDIRS).

To debug, use attached script - which I should rewrite in perl due to a bash
bug/misbehaviour.... :(

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KDE, Making The Future of Computing Available Today


["check_koffice_install.sh" (application/x-shellscript)]

#!/bin/bash
if ! kde-config ; then
  echo 'kde-config not found ! Aborting. You need a more recent KDE, or to fix your $PATH.'
  exit 1
fi

instance=kword
applnks=`kde-config --path apps`
found=0

function checkname()
{
  f=`echo $1 | sed -e 's,//,/,g'`
  if [ -f $f ]; then
    echo -n "Found: $f... "
    mimetypes=`grep ^MimeType $f|sed -e 's/.*=//;s/;/,/g;'`
    servicetypes=`grep ^ServiceTypes $f|sed -e 's/.*=//;s/$/,/g'`
    fulllist="$mimetypes,$servicetypes"
    if echo $fulllist | grep -q "KOfficePart,"; then
      echo "ok, this is a KOfficePart"
    else
      echo '**** KOfficePart not in list of types !'
      echo Service Types: $fulllist 
      cat $f
      exit 1
    fi
    nativemime=`grep X-KDE-NativeMimeType $f`
    echo Native mimetype : $nativemime
    if echo $nativemime | grep -q "application/x-$instance"; then
      found=1
    fi
  fi
}

IFS=:
for dir in $applnks; do
  f="$dir/Office/$instance.desktop"
  checkname $f 
done 

if [ $found = 0 ]; then
  echo
  echo Now looking by filename
  echo

  for dir in $applnks; do
    echo Looking under applnk dir: $dir
    find $dir -name kword.desktop | while read f; do
      checkname $f 
    done
  done
fi

if [ $found = 0 ]; then
  echo '***** Native mimetype not found !'
  echo $applnks
fi

echo

stfound=0
for dir in `kde-config --path servicetypes`; do
  echo Service Types dir $dir
  f=`echo $dir/kofficepart.desktop | sed -e 's,//,/,g'`
  if [ -f $f ]; then
    echo Found $f
    grep Native $f
    stfound=1
  fi
done

if [ $stfound = 0 ]; then
  echo '****** kofficepart.desktop not found!'
  kde-config --path servicetypes
else
  echo
  if [ $found = 1 ]; then
    echo "Everything looks ok"
  fi
fi


____________________________________
koffice mailing list
koffice@mail.kde.org
To unsubscribe please visit:
http://mail.kde.org/mailman/listinfo/koffice

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic