Bug 19648

Summary: KControl: WARNING: No K menu group with X-KDE-BaseGroup=settings found ! Defaulting to Settings/
Product: kcontrol Reporter: smethegj
Component: generalAssignee: Daniel Molkentin <molkentin>
Status: CLOSED FIXED    
Severity: grave    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandrake RPMs   
OS: Other   
Latest Commit: Version Fixed In:

Description smethegj 2001-02-02 16:55:33 UTC
(*** This bug was imported into bugs.kde.org ***)

Package: kcontrol
Version: 2.1 Beta 2
Severity: grave
Installed from: RPMs for Mandrake 7.2 (on a x86 MDK 7.2 intall + updates)

Initially KControl worked fine but after altering the K 
menu using Mandrake 7.2's menudrake KControl started to 
not have any entries to select from at start up of 
KControl. Just an empty left window in KControl.
Complained of
WARNING: No K menu group with X-KDE-BaseGroup=settings 
found ! Defaulting to Settings/  
When I ran it from the command line.

Greg
smethegj@cs.wisc.edu


(submitted via bugs.kde.org)
Comment 1 Stephan Kulow 2001-02-02 18:16:58 UTC
smethegj@cs.wisc.edu wrote:
> 
> Package: kcontrol
> Version: 2.1 Beta 2
> Severity: grave
> Installed from: RPMs for Mandrake 7.2 (on a x86 MDK 7.2 intall + updates)
> 
> Initially KControl worked fine but after altering the K
> menu using Mandrake 7.2's menudrake KControl started to
> not have any entries to select from at start up of
> KControl. Just an empty left window in KControl.
> Complained of
> WARNING: No K menu group with X-KDE-BaseGroup=settings
> found ! Defaulting to Settings/
> When I ran it from the command line.
> 
Then I'd say you should report this to whoever wrote Mandrake's menudrake.
The settings.desktop file should have a X-KDE-BaseGroup entry.

Greetings Stephan

-- 
It's my true belief that people having wishes for the bug report tool
and report it to the author haven't got the idea behind open source.
                                             anonymous KDE developer
Comment 2 peter 2001-02-07 06:18:29 UTC
I keep experiencing this too.  I'm also running Mandrake 7.2 but I'm not 
using menudrake (which is horrible).  I installed the 2.1beta2 tarballs and 
the same thing happens after using kmenuedit.

I think it has something to do with permissions getting altered for 
settings.desktop.  I keep finding various .desktop files in my home directory 
belonging to root.  How this happens I don't know but it happens often enough 
for me to have cron run this every couple of hours:

for name in `who |gawk '{print $1}'|uniq`
do
[ -d /home/$name ] && chown -R $name.$name /home/$name/.directory
done

The bandage to get it working is it open 
$KDEDIR/share/applnk/Settings.desktop and 
~/.kde/share/applnk/Settings.desktop in kedit and make sure the contents are 
the same.
-- 
        ----------------------------------------------                  
        Peter Ruskin  Wrexham UK  <Peter@ruskin.greatxscape.net>     
                KDE 2.1beta2  --  almost fit for production machines.
          Linux 2.2.17-27mdkWin4Lin Uptime 3 days 16 hours 17 minutes
        ----------------------------------------------
Comment 3 Greg Smethells 2001-02-08 04:19:46 UTC
I recently had trouble with an empty KControl (no modules) and did not edit 
*any* menus between boots. I just came up into KDE and my menu had changed. 
This is with Mandrake 7.2 (as if that didn't seem to be the problem).

I do not have a Settings.desktop in either the locations mentioned below. 
Didn't previously and KControl wasn't empty then. I have been restoring my 
.kde dir my removing it and having KDE make a new one. Not the best way since 
you have to re-set all your settings but it works (for a while until the 
menu alters itself after 3-4 boots).

What should my Settings.desktop look like?

Greg

> The bandage to get it working is it open
> $KDEDIR/share/applnk/Settings.desktop and
> ~/.kde/share/applnk/Settings.desktop in kedit and make sure the contents
> are the same.
Comment 4 peter 2001-02-08 09:46:26 UTC
On Thursday 08 February 2001 04:19 Greg Smethells wrote:
> I recently had trouble with an empty KControl (no modules) and did not edit
> *any* menus between boots. I just came up into KDE and my menu had changed.
> This is with Mandrake 7.2 (as if that didn't seem to be the problem).
>
> I do not have a Settings.desktop in either the locations mentioned below.
> Didn't previously and KControl wasn't empty then. I have been restoring my
> .kde dir my removing it and having KDE make a new one. Not the best way
> since you have to re-set all your settings but it works (for a while until
> the menu alters itself after 3-4 boots).
>
> What should my Settings.desktop look like?
>
> Greg
>
> > The bandage to get it working is it open
> > $KDEDIR/share/applnk/Settings.desktop and
> > ~/.kde/share/applnk/Settings.desktop in kedit and make sure the contents
> > are the same.

Hi Greg

My mistake - it should have read "$KDEDIR/share/applnk/Settings/.directory and
~/.kde/share/applnk/Settings/.directory ;-(

My /home/peter/.kde/share/applnk/Settings/.directory says:
[Desktop Entry]
Icon=package_settings
Name=Preferences
X-KDE-BaseGroup=settings
[URL properties]
IconSize=32

It's worth checking all the other share/applnk .directory files to ensure 
they _don't_ have the "X-KDE-BaseGroup=" line.  If one has you end up with 
an empty pane.  Delete the duplicate line and your pane comes back - try it.
-- 
        ----------------------------------------------                  
        Peter Ruskin  Wrexham UK  <Peter@ruskin.greatxscape.net>     
                KDE 2.1beta2  --  almost fit for production machines.
             Linux 2.2.17-27mdkWin4Lin Uptime 14 hours 48 minutes
        ----------------------------------------------
Comment 5 Waldo Bastian 2001-02-11 03:08:35 UTC
Fixed for 2.1

Cheers
Waldo
Comment 6 Jeff Cottrill 2001-02-14 18:46:41 UTC
I'm using KDE 2.1 b2 and I still have the problem with the empty KControl.  I 
have blown away my /home/username/.kde directory as well as /tmp 
/kde-username and /tmp/ksocket-username.  After logging back in and getting a 
fresh KDE setup KControl worked ok the first time I ran it.  I made a few 
minor changes (color scheme screen saver) and quit.  Now it's back to being 
empty.  I can use the individual modules under the Configuration / KDE menu 
and I can run it from a terminal window su'd to root (although I get an 
"ERROR: KUniqueApplication: Trying to launch kdeinit" message).

What should I try next?

thanks!!
Comment 7 Jeff Cottrill 2001-02-14 18:47:49 UTC
I'm using KDE 2.1 b2 and I still have the problem with the empty KControl.  I 
have blown away my /home/username/.kde directory as well as /tmp 
/kde-username and /tmp/ksocket-username.  After logging back in and getting a 
fresh KDE setup KControl worked ok the first time I ran it.  I made a few 
minor changes (color scheme screen saver) and quit.  Now it's back to being 
empty.  I can use the individual modules under the Configuration / KDE menu 
and I can run it from a terminal window su'd to root (although I get an 
"ERROR: KUniqueApplication: Trying to launch kdeinit" message).

What should I try next?

thanks!!
Comment 8 Dave Green 2001-03-11 00:58:44 UTC
This bug has not gone away in the final release of KDE 2.1 that I have
downloaded today.

I've just reinstalled Mandrake 7.2 from stratch and formatted all linux
partitions (/ /usr/ /usr/local /home /var).
I did an expert install (selecting XFree86 4.01) and did not install any KDE
packages whatsoever (as these were KDE 2.0).

I've downloaded the KDE 2.1 RPMs for Mandrake 7.2 today from
ftp.sourceforge.net/pub/mirrors/kde/stable/latest/distribution/rpm/Mandrake/
7.2/i586/

I was getting error messages when I installed most of the KDE 2.1 RPM
packages. There was a problem with the file /etc/menu-methods/kde that is
put down by kdelibs-2.1-2mdk.i586.rpm. This was saying that the function
encode could not be found. In the end I found an /etc/menu-methods/kde file
for KDE 2.0 that I had in a backup. Using this file allowed all the RPMS to
install without errors. However the KDE 2.0 version of this file does not
use the encode that the KDE 2.1 file had.

I do not get any modules listed in Kcontrol and when I execute the command
that the KControl icon uses from a terminal window I get "WARNING: No K
menu group with X-KDE-BaseGroup=settings found ! Defaulting to Settings/"

I have also had similar problems with KDE Login Manager not executing and
the same error msg above and also a msg saying that System/kdm was not
found.

Here are the contents of the /etc/menu-methods/kde files that I mention
above.

/etc/menu-methods/kde (from KDE 2.1 Mandrake 7.2 RPMs downloaded from
ftp.sourceforge.net today)
============================================================================
====================


#!/usr/sbin/install-menu
compat="menu-1"

!include menu.h

function findicon($name)= \
                              ifelsefile("/usr/share/icons/mini/" $name \
                                          $name \
                        ifelsefile($name $name $name ))


function AppEntry($var)= \
       "[Desktop Entry]\n" \
       "Name=" ifelse($charset encode(title()$charset "utf8")title())
"\n" \
       "Comment=" ifelse($charset
encode(ifelse($longtitle$longtitle$title)  $charset "utf8") \
           ifelse($longtitle$longtitle$title)) "\n"\
       "Exec=" ifelse($kde_command $kde_command $command) "\n" \
        $var  \
        ifnempty($icon"Icon=" findicon($icon) "\n") \
ifnempty($kde_mimetype "MimeType=" $kde_mimetype"\n") \
ifnempty($kde_opt $kde_opt "\n") \
        "Type=Application\n" \
forall(languages() "lang" "Name[" $lang "]="
encode_translate($langtitle() "utf8") "\n") \
ifnempty($longtitle forall(languages() "lang" "Comment[" $lang "]="
encode_translate($lang$longtitle "utf8") "\n"))

function SubmenuEntry()= \
       "[Desktop Entry]\n" \
       "Name=" ifelse($charset encode(title()$charset "utf8")title())
"\n" \
       "Icon="  ifelse($iconfindicon($icon)"folder") "\n" \
       "Type=Directory\n" \
 ifnempty($kde_opt $kde_opt "\n") \
forall(languages() "lang" "Name[" $lang "]="
encode_translate($langtitle() "utf8") "\n") \
ifnempty($longtitleforall(languages() "lang" "Comment[" $lang "]="
encode_translate($lang$longtitle"utf8") "\n"))

supported
  x11=  AppEntry("Terminal=false\n")
  text= AppEntry("Terminal=true\n")
  kde= AppEntry("Terminal=false\n")
endsupported

genmenu=parent($section) "/" ifeqelse($kde_filename "" $title
$kde_filename) ifeqelse($command "" "/.directory" ".desktop") ""
startmenu=""
endmenu=""

rootsection=""

rootprefix="/usr/share/applnk"
userprefix=".kde/share/applnk"

treewalk="M"
#submenutitle="SUBMENUTITLE section=[" $section "] title=[" $title "]"
submenutitle=SubmenuEntry()

prerun="savekdemimetypes.sh;rm -rf " prefix() "/*"
postrun="/usr/bin/removekdesysmenu.pl; restorekdemimetypes.sh"
preoutput=""



/etc/menu-methods/kde (from KDE 2.0 on Mandrake 7.2 CD)
=======================================================


#!/usr/sbin/install-menu
compat="menu-1"

!include menu.h

function findicon($name)= \
                              ifelsefile("/usr/share/icons/mini/" $name \
                                          $name \
                        ifelsefile($name $name $name ))


function AppEntry($var)= \
       "[Desktop Entry]\n" \
        "Name=" title() "\n" \
        "Comment=" ifelse($longtitle$longtitle$title) "\n" \
       "Exec=" ifelse($kde_command $kde_command $command) "\n" \
        $var  \
        ifnempty($icon"Icon=" findicon($icon) "\n") \
ifnempty($kde_mimetype "MimeType=" $kde_mimetype"\n") \
    ifnempty($kde_opt $kde_opt "\n") \
        "Type=Application\n" \
forall(languages() "lang" "Name[" $lang "]="
encode_translate($langtitle() "utf8") "\n") \
ifnempty($longtitleforall(languages() "lang" "Comment[" $lang "]="
encode_translate($lang$longtitle "utf8") "\n"))

function SubmenuEntry()= \
       "[Desktop Entry]\n" \
       "Name=" $title "\n" \
       "Icon="  ifelse($iconfindicon($icon)"folder") "\n" \
       "Type=Directory\n" \
 ifnempty($kde_opt $kde_opt "\n") \
forall(languages() "lang" "Name[" $lang "]="
encode_translate($langtitle() "utf8") "\n") \
ifnempty($longtitleforall(languages() "lang" "Comment[" $lang "]="
encode_translate($lang$longtitle"utf8") "\n"))

supported
  x11=  AppEntry("Terminal=false\n")
  text= AppEntry("Terminal=true\n")
  kde= AppEntry("Terminal=false\n")
endsupported

genmenu=parent($section) "/" ifeqelse($kde_filename "" $title
$kde_filename) ifeqelse($command "" "/.directory" ".desktop") ""
startmenu=""
endmenu=""

rootsection=""

rootprefix="/usr/share/applnk"
userprefix=".kde/share/applnk"

treewalk="M"
#submenutitle="SUBMENUTITLE section=[" $section "] title=[" $title "]"
submenutitle=SubmenuEntry()

prerun="savekdemimetypes.sh;rm -rf " prefix() "/*"
postrun="/usr/bin/removekdesysmenu.pl; restorekdemimetypes.sh"
preoutput=""





Thanks

Dave Green
Comment 9 Dave Green 2001-03-11 00:59:29 UTC
This bug has not gone away in the final release of KDE 2.1 that I have
downloaded today.

I've just reinstalled Mandrake 7.2 from stratch and formatted all linux
partitions (/ /usr/ /usr/local /home /var).
I did an expert install (selecting XFree86 4.01) and did not install any KDE
packages whatsoever (as these were KDE 2.0).

I've downloaded the KDE 2.1 RPMs for Mandrake 7.2 today from
ftp.sourceforge.net/pub/mirrors/kde/stable/latest/distribution/rpm/Mandrake/
7.2/i586/

I was getting error messages when I installed most of the KDE 2.1 RPM
packages. There was a problem with the file /etc/menu-methods/kde that is
put down by kdelibs-2.1-2mdk.i586.rpm. This was saying that the function
encode could not be found. In the end I found an /etc/menu-methods/kde file
for KDE 2.0 that I had in a backup. Using this file allowed all the RPMS to
install without errors. However the KDE 2.0 version of this file does not
use the encode that the KDE 2.1 file had.

I do not get any modules listed in Kcontrol and when I execute the command
that the KControl icon uses from a terminal window I get "WARNING: No K
menu group with X-KDE-BaseGroup=settings found ! Defaulting to Settings/"

I have also had similar problems with KDE Login Manager not executing and
the same error msg above and also a msg saying that System/kdm was not
found.

Here are the contents of the /etc/menu-methods/kde files that I mention
above.

/etc/menu-methods/kde (from KDE 2.1 Mandrake 7.2 RPMs downloaded from
ftp.sourceforge.net today)
============================================================================
====================


#!/usr/sbin/install-menu
compat="menu-1"

!include menu.h

function findicon($name)= \
                              ifelsefile("/usr/share/icons/mini/" $name \
                                          $name \
                        ifelsefile($name $name $name ))


function AppEntry($var)= \
       "[Desktop Entry]\n" \
       "Name=" ifelse($charset encode(title()$charset "utf8")title())
"\n" \
       "Comment=" ifelse($charset
encode(ifelse($longtitle$longtitle$title)  $charset "utf8") \
           ifelse($longtitle$longtitle$title)) "\n"\
       "Exec=" ifelse($kde_command $kde_command $command) "\n" \
        $var  \
        ifnempty($icon"Icon=" findicon($icon) "\n") \
ifnempty($kde_mimetype "MimeType=" $kde_mimetype"\n") \
ifnempty($kde_opt $kde_opt "\n") \
        "Type=Application\n" \
forall(languages() "lang" "Name[" $lang "]="
encode_translate($langtitle() "utf8") "\n") \
ifnempty($longtitle forall(languages() "lang" "Comment[" $lang "]="
encode_translate($lang$longtitle "utf8") "\n"))

function SubmenuEntry()= \
       "[Desktop Entry]\n" \
       "Name=" ifelse($charset encode(title()$charset "utf8")title())
"\n" \
       "Icon="  ifelse($iconfindicon($icon)"folder") "\n" \
       "Type=Directory\n" \
 ifnempty($kde_opt $kde_opt "\n") \
forall(languages() "lang" "Name[" $lang "]="
encode_translate($langtitle() "utf8") "\n") \
ifnempty($longtitleforall(languages() "lang" "Comment[" $lang "]="
encode_translate($lang$longtitle"utf8") "\n"))

supported
  x11=  AppEntry("Terminal=false\n")
  text= AppEntry("Terminal=true\n")
  kde= AppEntry("Terminal=false\n")
endsupported

genmenu=parent($section) "/" ifeqelse($kde_filename "" $title
$kde_filename) ifeqelse($command "" "/.directory" ".desktop") ""
startmenu=""
endmenu=""

rootsection=""

rootprefix="/usr/share/applnk"
userprefix=".kde/share/applnk"

treewalk="M"
#submenutitle="SUBMENUTITLE section=[" $section "] title=[" $title "]"
submenutitle=SubmenuEntry()

prerun="savekdemimetypes.sh;rm -rf " prefix() "/*"
postrun="/usr/bin/removekdesysmenu.pl; restorekdemimetypes.sh"
preoutput=""



/etc/menu-methods/kde (from KDE 2.0 on Mandrake 7.2 CD)
=======================================================


#!/usr/sbin/install-menu
compat="menu-1"

!include menu.h

function findicon($name)= \
                              ifelsefile("/usr/share/icons/mini/" $name \
                                          $name \
                        ifelsefile($name $name $name ))


function AppEntry($var)= \
       "[Desktop Entry]\n" \
        "Name=" title() "\n" \
        "Comment=" ifelse($longtitle$longtitle$title) "\n" \
       "Exec=" ifelse($kde_command $kde_command $command) "\n" \
        $var  \
        ifnempty($icon"Icon=" findicon($icon) "\n") \
ifnempty($kde_mimetype "MimeType=" $kde_mimetype"\n") \
    ifnempty($kde_opt $kde_opt "\n") \
        "Type=Application\n" \
forall(languages() "lang" "Name[" $lang "]="
encode_translate($langtitle() "utf8") "\n") \
ifnempty($longtitleforall(languages() "lang" "Comment[" $lang "]="
encode_translate($lang$longtitle "utf8") "\n"))

function SubmenuEntry()= \
       "[Desktop Entry]\n" \
       "Name=" $title "\n" \
       "Icon="  ifelse($iconfindicon($icon)"folder") "\n" \
       "Type=Directory\n" \
 ifnempty($kde_opt $kde_opt "\n") \
forall(languages() "lang" "Name[" $lang "]="
encode_translate($langtitle() "utf8") "\n") \
ifnempty($longtitleforall(languages() "lang" "Comment[" $lang "]="
encode_translate($lang$longtitle"utf8") "\n"))

supported
  x11=  AppEntry("Terminal=false\n")
  text= AppEntry("Terminal=true\n")
  kde= AppEntry("Terminal=false\n")
endsupported

genmenu=parent($section) "/" ifeqelse($kde_filename "" $title
$kde_filename) ifeqelse($command "" "/.directory" ".desktop") ""
startmenu=""
endmenu=""

rootsection=""

rootprefix="/usr/share/applnk"
userprefix=".kde/share/applnk"

treewalk="M"
#submenutitle="SUBMENUTITLE section=[" $section "] title=[" $title "]"
submenutitle=SubmenuEntry()

prerun="savekdemimetypes.sh;rm -rf " prefix() "/*"
postrun="/usr/bin/removekdesysmenu.pl; restorekdemimetypes.sh"
preoutput=""





Thanks

Dave Green
Comment 10 Waldo Bastian 2001-03-11 05:12:00 UTC
Installation problem. 
Does any of the hints given on http://www.kde.org/info/faq.html
under "Most KDE applications crash immediately" help?

In kde 2.0 a lot of stuff used to crash in this situation in 2.1 we fixed 
the crashes but the main problem is that the installation is screwed up.

Cheers
Waldo

On Saturday 10 March 2001 16:58 you wrote:
> This bug has not gone away in the final release of KDE 2.1 that I have
> downloaded today.
>
> I've just reinstalled Mandrake 7.2 from stratch and formatted all linux
> partitions (/ /usr/ /usr/local /home /var).
> I did an expert install (selecting XFree86 4.01) and did not install any
> KDE packages whatsoever (as these were KDE 2.0).
>
> I've downloaded the KDE 2.1 RPMs for Mandrake 7.2 today from
> ftp.sourceforge.net/pub/mirrors/kde/stable/latest/distribution/rpm/Mandrake
>/ 7.2/i586/
>
> I was getting error messages when I installed most of the KDE 2.1 RPM
> packages. There was a problem with the file /etc/menu-methods/kde that is
> put down by kdelibs-2.1-2mdk.i586.rpm. This was saying that the function
> encode could not be found. In the end I found an /etc/menu-methods/kde file
> for KDE 2.0 that I had in a backup. Using this file allowed all the RPMS to
> install without errors. However the KDE 2.0 version of this file does not
> use the encode that the KDE 2.1 file had.
>
> I do not get any modules listed in Kcontrol and when I execute the command
> that the KControl icon uses from a terminal window I get "WARNING: No K
> menu group with X-KDE-BaseGroup=settings found ! Defaulting to Settings/"
>
> I have also had similar problems with KDE Login Manager not executing and
> the same error msg above and also a msg saying that System/kdm was not
> found.
>
> Here are the contents of the /etc/menu-methods/kde files that I mention
> above.
>
> /etc/menu-methods/kde (from KDE 2.1 Mandrake 7.2 RPMs downloaded from
> ftp.sourceforge.net today)
> ===========================================================================
>= ====================
>
>
> #!/usr/sbin/install-menu
> compat="menu-1"
>
> !include menu.h
>
> function findicon($name)= \
>                               ifelsefile("/usr/share/icons/mini/" $name \
>                                           $name \
>                         ifelsefile($name $name $name ))
>
>
> function AppEntry($var)= \
>        "[Desktop Entry]\n" \
>        "Name=" ifelse($charset encode(title()$charset "utf8")title())
> "\n" \
>        "Comment=" ifelse($charset
> encode(ifelse($longtitle$longtitle$title)  $charset "utf8") \
>            ifelse($longtitle$longtitle$title)) "\n"\
>        "Exec=" ifelse($kde_command $kde_command $command) "\n" \
>         $var  \
>         ifnempty($icon"Icon=" findicon($icon) "\n") \
> ifnempty($kde_mimetype "MimeType=" $kde_mimetype"\n") \
> ifnempty($kde_opt $kde_opt "\n") \
>         "Type=Application\n" \
> forall(languages() "lang" "Name[" $lang "]="
> encode_translate($langtitle() "utf8") "\n") \
> ifnempty($longtitle forall(languages() "lang" "Comment[" $lang "]="
> encode_translate($lang$longtitle "utf8") "\n"))
>
> function SubmenuEntry()= \
>        "[Desktop Entry]\n" \
>        "Name=" ifelse($charset encode(title()$charset "utf8")title())
> "\n" \
>        "Icon="  ifelse($iconfindicon($icon)"folder") "\n" \
>        "Type=Directory\n" \
>  ifnempty($kde_opt $kde_opt "\n") \
> forall(languages() "lang" "Name[" $lang "]="
> encode_translate($langtitle() "utf8") "\n") \
> ifnempty($longtitleforall(languages() "lang" "Comment[" $lang "]="
> encode_translate($lang$longtitle"utf8") "\n"))
>
> supported
>   x11=  AppEntry("Terminal=false\n")
>   text= AppEntry("Terminal=true\n")
>   kde= AppEntry("Terminal=false\n")
> endsupported
>
> genmenu=parent($section) "/" ifeqelse($kde_filename "" $title
> $kde_filename) ifeqelse($command "" "/.directory" ".desktop") ""
> startmenu=""
> endmenu=""
>
> rootsection=""
>
> rootprefix="/usr/share/applnk"
> userprefix=".kde/share/applnk"
>
> treewalk="M"
> #submenutitle="SUBMENUTITLE section=[" $section "] title=[" $title "]"
> submenutitle=SubmenuEntry()
>
> prerun="savekdemimetypes.sh;rm -rf " prefix() "/*"
> postrun="/usr/bin/removekdesysmenu.pl; restorekdemimetypes.sh"
> preoutput=""
>
>
>
> /etc/menu-methods/kde (from KDE 2.0 on Mandrake 7.2 CD)
> =======================================================
>
>
> #!/usr/sbin/install-menu
> compat="menu-1"
>
> !include menu.h
>
> function findicon($name)= \
>                               ifelsefile("/usr/share/icons/mini/" $name \
>                                           $name \
>                         ifelsefile($name $name $name ))
>
>
> function AppEntry($var)= \
>        "[Desktop Entry]\n" \
>         "Name=" title() "\n" \
>         "Comment=" ifelse($longtitle$longtitle$title) "\n" \
>        "Exec=" ifelse($kde_command $kde_command $command) "\n" \
>         $var  \
>         ifnempty($icon"Icon=" findicon($icon) "\n") \
> ifnempty($kde_mimetype "MimeType=" $kde_mimetype"\n") \
>     ifnempty($kde_opt $kde_opt "\n") \
>         "Type=Application\n" \
> forall(languages() "lang" "Name[" $lang "]="
> encode_translate($langtitle() "utf8") "\n") \
> ifnempty($longtitleforall(languages() "lang" "Comment[" $lang "]="
> encode_translate($lang$longtitle "utf8") "\n"))
>
> function SubmenuEntry()= \
>        "[Desktop Entry]\n" \
>        "Name=" $title "\n" \
>        "Icon="  ifelse($iconfindicon($icon)"folder") "\n" \
>        "Type=Directory\n" \
>  ifnempty($kde_opt $kde_opt "\n") \
> forall(languages() "lang" "Name[" $lang "]="
> encode_translate($langtitle() "utf8") "\n") \
> ifnempty($longtitleforall(languages() "lang" "Comment[" $lang "]="
> encode_translate($lang$longtitle"utf8") "\n"))
>
> supported
>   x11=  AppEntry("Terminal=false\n")
>   text= AppEntry("Terminal=true\n")
>   kde= AppEntry("Terminal=false\n")
> endsupported
>
> genmenu=parent($section) "/" ifeqelse($kde_filename "" $title
> $kde_filename) ifeqelse($command "" "/.directory" ".desktop") ""
> startmenu=""
> endmenu=""
>
> rootsection=""
>
> rootprefix="/usr/share/applnk"
> userprefix=".kde/share/applnk"
>
> treewalk="M"
> #submenutitle="SUBMENUTITLE section=[" $section "] title=[" $title "]"
> submenutitle=SubmenuEntry()
>
> prerun="savekdemimetypes.sh;rm -rf " prefix() "/*"
> postrun="/usr/bin/removekdesysmenu.pl; restorekdemimetypes.sh"
> preoutput=""
>
>
>
>
>
> Thanks
>
> Dave Green

-- 
bastian@kde.org | SuSE Labs KDE Developer | bastian@suse.com