dexter11 Posted November 10, 2006 Report Share Posted November 10, 2006 It's on Mandriva 2007 which is using the new freedesktop standard XDG menu. The problem is WindowMaker does not support it. To workaround it XDG is able to generate a menu in WM readable format. Of course all the items in this menu are in the big menu there is nothing which would only show up under WM. I'd like to workaround it. This is the /etc/menu.d/WindowMaker script which generates the WindowMaker menu from XDG menu: if [ "$USER_MENU" = "1" ]; then OUTPUTDIR=$HOME/GNUstep/Library/WindowMaker/ else OUTPUTDIR=/usr/share/WindowMaker fi echo -e '/* Automatically generated file by /etc/menu.d/WindoMaker. Do not edit */\n\n#include "wmmacros"\n' > $OUTPUTDIR/menu if [ "$VERBOSE" = "1" ]; then echo "writing to $OUTPUTDIR/menu" /usr/bin/xdg_menu --verbose --format WindowMaker --charset UTF-8 >> $OUTPUTDIR/menu else /usr/bin/xdg_menu --format WindowMaker --charset UTF-8 >> $OUTPUTDIR/menu 2> /dev/null fi As you can see it's very simple., and it generates a menu file like this: /* Automatically generated file by /etc/menu.d/WindoMaker. Do not edit */ #include "wmmacros" "Mandriva Linux" MENU #include "user.menu" "Internet" MENU "Azonnali üzenetküldés (IM)" MENU "Kopete" EXEC kopete -caption "Kopete" "Azonnali üzenetküldés (IM)" END "E-mail" MENU "KDE csoportmunka-varázsló" EXEC groupwarewizard "KMail" EXEC kontact-kmail.sh "KSig" EXEC ksig -caption "KSig" "Kontact" EXEC kontact "E-mail" END "Egyéb" MENU "KNewsTicker" EXEC appletproxy knewsticker.desktop "Egyéb" END "Fájlátvitel" MENU "KGet" EXEC kget -caption "KGet" "Fájlátvitel" END "Hírek" MENU "Akregator" EXEC kontact-akregator.sh -caption "Akregator" "KNode" EXEC kontact-knode.sh -caption "KNode" "Hírek" END "Távoli hozzáférés" MENU "Krdc" EXEC krdc -caption "Krdc" "Távoli hozzáférés" END "Videokonferencia" MENU "Ekiga telefonszoftver" EXEC soundwrapper /usr/bin/ekiga "Videokonferencia" END "Webböngész?k" MENU "Konqueror" EXEC kfmclient openProfile webbrowsing "Mozilla Firefox" EXEC /usr/bin/mozilla-firefox "Webböngész?k" END "Webszerkeszt?k" MENU "Nvu" EXEC /usr/bin/nvu "OpenOffice.org Writer/Web" EXEC ooweb2.0 "Webszerkeszt?k" END "Internet" END . . . "Mandriva Linux" END I cut out the most but it's still understandable I think. Now as you can see every submenu is between "Something MENU" and "Something END" bracketts like the whole menu is between "Mandriva Linux MENU" and "Mandriva Linux END". So if I want to modify the generated menu I have to put the new lines before the "Mandriva Linux END" line. How do I do that from a script? I thought for example after genarating the menu deleting the last line and adding new entries by using "echo "blah blah" >>menu file". So how can I delete the last line of a text file from a bash script? Or does anybody have a better idea to solve this? Quote Link to comment Share on other sites More sharing options...
Guest John Duchek Posted February 27, 2007 Report Share Posted February 27, 2007 I tried this and it produced the output you said. Where do I put it to get WM to see it? :unsure: Thanks, John Quote Link to comment Share on other sites More sharing options...
dexter11 Posted February 27, 2007 Author Report Share Posted February 27, 2007 Don't understand. What did you try? Anyway I couldn't solve the problem on my own. And currently I use KDE so I forgot about this until now. Quote Link to comment Share on other sites More sharing options...
Guest John Duchek Posted February 28, 2007 Report Share Posted February 28, 2007 what I am trying to to is import the kde menu into window maker format. I followed your directions and got a file that looked alot like what I wanted, but wasn't recognized by window maker. John Quote Link to comment Share on other sites More sharing options...
dexter11 Posted February 28, 2007 Author Report Share Posted February 28, 2007 To answer your first question then: the file should be in /usr/share/WindowMaker/ and\or $HOME/GNUstep/Library/WindowMaker/ If that doesn't help then post or attach that file here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.