Re: [newbie] Menus damaged when KDE removed

2002-07-30 Thread Miark

 Well the real lesson there is don't use Red Carpet unliess you really 
 like to do everything with rpm --nodeps.  The price you pay for such 
 smoothness in the update is excessive.

No kidding--sounds like a horrible mess waiting to happen.

 
 Right now what I see is that the easy way to analyze this is likely 
 going to be using a script
 
 The following is a very simple-minded one which should do some magic
 Snip 
 Civileme

This says I have 2800+ items. Do I have to sit and press k Enter for
every one? 

Miark



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-29 Thread civileme

Mad Scientist wrote:

On Sunday 28 July 2002 02:21 pm, you wrote:

If you look at /usr/lib/menu you will see all sorts of files that have
to do with menu.  In those files is a needs clause.

If it needs kde then it disappears when kde is removed.  Those files are
written directly into the mdk rpm spec files and are cleaned when things
are removed.

If you remove KDE surely you did not expect anything depending on KDE to
stick around.  Konqueror does have an embedded version, true, but that
version is not included with the distro.

Now menu files can be in the system menu or in the user menu (which are
specific to each user) and they can appear for a specific desktop
 'Needs kde'  'needs gnome'  'needs blackbox'  are sometimes clauses

There is considerable room for expansion in the menu structure.  The
what to do? is an example.  It is also easily possible to add another
clause to each menu item which defines a level so that a user could rate
his own level and if for example choosing newbie, see only the simplest
of apps.  This is easily done.

What you will notice about our menus is that, to the extent possible,
they stay the same across desktops.  KDE and GNOME-specific items that
just need the widget set for each of those do propagate across desktops,
and are on some of them submenued as KDE apps or GNOME Apps.

In other words the system did what it was told which wasn't what you
expected.


This is all very helpful information and I'm starting to get a better 
understanding of how these menus work. But I still can't solve this one. 
Although the original poster indicated he had removed KDE, I'm not sure if 
that's the problem. At least in my case, I never removed KDE. Also, it's not 
just the KDE-related menus that are gone. All menus are gone. And they are 
gone from all window managers. I basically have from Run Command and down 
still there but everything above is gone. The original poster stated 
Everything has been lost from my menus except the freshly installed Gnome 
apps. which sounds to me to be the same problem.

When I go Original menu style, I do get all those menus, but they do not 
relate to the apps I have installed. I can get the What to do ? menus to 
show, but not the All applications. And they are the ones that really fit 
best with what I actually have installed.

They *do* appear in menudrake. According to menudrake, everything looks 
perfect. They just don't show in the real menus.

Still confused,

-Mad




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

OK in that case you have a local file that is overriding the menus.  It 
also may be that you installed a Ximian GNOME package which usually lags 
about six months in actually supporting mandrake so they break our menus 
until that point.  BTW, most of the functionality, but not the look  
feel, of Ximian is already in the Mandrake rpms.

Or you have managed to catch the menu editor halfway through a save 
which can always have interesting results--we do have a ShowBusyCursor 
lockout because people used to quit it whioe it was still saving and I 
have not seen what you describe since Vincent locked out the early quitting.

Anyway, anytime something is done to the local menus, there is a hidden 
file called .menu-updates.stamp created and also there is the ~/.menu 
folder which concerns the actual menus.  There are additional items down 
in /etc but those need not concern you--those are regeneration methods, 
mostly , these days.

so

$ rm ~/.menu-  (tab for completion)
$ rm -r ~/.menu -f
$ su
Password: (your root password
# update-menus -v
(Watch out there is a cosmetic bug here that it needs a return pressed 
to show a prompt after it is done)
# exit
$ logout  (or better ctrl-alt-backspace)

login from the login manager

You should have functional menus

If you installed GNOME from a non-mandrake source, you will not have the 
GNOME menus that came with the install.  That is because we take the 
trouble to make the menus pretty much the same across desktops (and the 
Linux Standards Base has not addressed that issue for standardization 
yet, just Debian and Mandrake do that.)

Civileme













Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-29 Thread Derek Jennings

On Monday 29 Jul 2002 5:49 am, Mad Scientist wrote:
 On Sunday 28 July 2002 02:21 pm, you wrote:
  If you look at /usr/lib/menu you will see all sorts of files that have
  to do with menu.  In those files is a needs clause.
 
  If it needs kde then it disappears when kde is removed.  Those files are
  written directly into the mdk rpm spec files and are cleaned when things
  are removed.
 
  If you remove KDE surely you did not expect anything depending on KDE to
  stick around.  Konqueror does have an embedded version, true, but that
  version is not included with the distro.
 
  Now menu files can be in the system menu or in the user menu (which are
  specific to each user) and they can appear for a specific desktop
   'Needs kde'  'needs gnome'  'needs blackbox'  are sometimes clauses
 
  There is considerable room for expansion in the menu structure.  The
  what to do? is an example.  It is also easily possible to add another
  clause to each menu item which defines a level so that a user could rate
  his own level and if for example choosing newbie, see only the simplest
  of apps.  This is easily done.
 
  What you will notice about our menus is that, to the extent possible,
  they stay the same across desktops.  KDE and GNOME-specific items that
  just need the widget set for each of those do propagate across desktops,
  and are on some of them submenued as KDE apps or GNOME Apps.
 
  In other words the system did what it was told which wasn't what you
  expected.

 This is all very helpful information and I'm starting to get a better
 understanding of how these menus work. But I still can't solve this one.
 Although the original poster indicated he had removed KDE, I'm not sure if
 that's the problem. At least in my case, I never removed KDE. Also, it's
 not just the KDE-related menus that are gone. All menus are gone. And they
 are gone from all window managers. I basically have from Run Command and
 down still there but everything above is gone. The original poster stated
 Everything has been lost from my menus except the freshly installed Gnome
 apps. which sounds to me to be the same problem.

 When I go Original menu style, I do get all those menus, but they do not
 relate to the apps I have installed. I can get the What to do ? menus to
 show, but not the All applications. And they are the ones that really fit
 best with what I actually have installed.

 They *do* appear in menudrake. According to menudrake, everything looks
 perfect. They just don't show in the real menus.

 Still confused,

 -Mad

I saw something similar when I installed Crossover plugin  A menu entry put in 
by Crossover was broken and it stopped all the others appearing. Tracking 
down the offending item and removing it fixed the problem.  It was a real 
pain trying to get to the bottom of it.

derek





Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-29 Thread civileme

Derek Jennings wrote:

On Monday 29 Jul 2002 5:49 am, Mad Scientist wrote:

On Sunday 28 July 2002 02:21 pm, you wrote:

If you look at /usr/lib/menu you will see all sorts of files that have
to do with menu.  In those files is a needs clause.

If it needs kde then it disappears when kde is removed.  Those files are
written directly into the mdk rpm spec files and are cleaned when things
are removed.

If you remove KDE surely you did not expect anything depending on KDE to
stick around.  Konqueror does have an embedded version, true, but that
version is not included with the distro.

Now menu files can be in the system menu or in the user menu (which are
specific to each user) and they can appear for a specific desktop
 'Needs kde'  'needs gnome'  'needs blackbox'  are sometimes clauses

There is considerable room for expansion in the menu structure.  The
what to do? is an example.  It is also easily possible to add another
clause to each menu item which defines a level so that a user could rate
his own level and if for example choosing newbie, see only the simplest
of apps.  This is easily done.

What you will notice about our menus is that, to the extent possible,
they stay the same across desktops.  KDE and GNOME-specific items that
just need the widget set for each of those do propagate across desktops,
and are on some of them submenued as KDE apps or GNOME Apps.

In other words the system did what it was told which wasn't what you
expected.

This is all very helpful information and I'm starting to get a better
understanding of how these menus work. But I still can't solve this one.
Although the original poster indicated he had removed KDE, I'm not sure if
that's the problem. At least in my case, I never removed KDE. Also, it's
not just the KDE-related menus that are gone. All menus are gone. And they
are gone from all window managers. I basically have from Run Command and
down still there but everything above is gone. The original poster stated
Everything has been lost from my menus except the freshly installed Gnome
apps. which sounds to me to be the same problem.

When I go Original menu style, I do get all those menus, but they do not
relate to the apps I have installed. I can get the What to do ? menus to
show, but not the All applications. And they are the ones that really fit
best with what I actually have installed.

They *do* appear in menudrake. According to menudrake, everything looks
perfect. They just don't show in the real menus.

Still confused,

-Mad


I saw something similar when I installed Crossover plugin  A menu entry put in 
by Crossover was broken and it stopped all the others appearing. Tracking 
down the offending item and removing it fixed the problem.  It was a real 
pain trying to get to the bottom of it.

derek






Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Thanks for the heads-up.  I haven't seen that one before but it works 
very nicely.   I can reproduce by intentionally malforming a menu entry 
in /usr/lib/menu

Shoot. looks like we need a syntax checker for thoser entries with an 
interactive (this is bad, delete it?)...

civileme





Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-29 Thread Mad Scientist

On Monday 29 July 2002 01:55 am, civileme wrote:
 Thanks for the heads-up.  I haven't seen that one before but it works
 very nicely.   I can reproduce by intentionally malforming a menu entry
 in /usr/lib/menu

 Shoot. looks like we need a syntax checker for thoser entries with an
 interactive (this is bad, delete it?)...

Any ideas what might be a good thing to grep for that might find these errors?

I tried the other suggestion (rm ~/.menu-* ; rm -rf ~/.menu and then 
update-menus -v as root) and that didn't fix it so I'm assuming this is the 
real problem.

The software I installed just before it broke has been de-installed and I 
don't see it's menu items anywhere. I just spent a half hour searching for 
bad-looking menu items but I have no clue.

Well, at least it looks like we're moving in the right direction :-)

Thanks,

-Mad

-- 
Madness is soil in which creativity grows

 - Chris Bielek



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-29 Thread civileme

Miark wrote:

I have the opposite problem. I installed Gnome2 directly from
Ximian, and having updating software using Red Carpet, some 
of my menu items have disappeared. Most notably, XMMS and gFTP.

Those programs exist, work, and are easily invoked from the
commandline, but they've disappeared from the menus, and updating
the menus as root didn't fix it.

Is there a way to fix this?

Miark

P.S. Yes, I've learned my lesson--wait for Mandrake-specific RPMs
 to come available for major stuff like this.




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Well the real lesson there is don't use Red Carpet unliess you really 
like to do everything with rpm --nodeps.  The price you pay for such 
smoothness in the update is excessive.

Right now what I see is that the easy way to analyze this is likely 
going to be using a script

The following is a very simple-minded one which should do some magic

#!/usr/bin/env python
#-
# Copyright civileme@mandrakesoft July, 2002
# Licensed under GNU General Public License 2
# See www.fsf.org for license details and restrictions
#--

import os, sys, cPickle, popen2, string
print
print Welcome to Menu file Checker
print
print This program will terminate abnormally if
print you are not running as root
print
print The idea here is to clean menu files--you need to be 
print aware that menu entries have files in /usr/lib/menu
print and a broken file there can cause menu items following it
print to disappear.
print
def disposition(menuitemname=''):
print
print menuitemname + ' has been disabled'
print 'check your menus'
while 1:
cg=raw_input('keep(k) or remove(r) or abort(a): ')
if len(cg) != 1:
continue
   
if cg != 'k' and cg != 'r' and cg !='a':
continue

break
return cg
def disableitem(menuitemname=''):
os.system('mv /usr/lib/menu/'+menuitemname+' /var/tmp/'+menuitemname)
return
def restoreitem(menuitemname=''):
os.system('mv /var/tmp/'+menuitemname+' /usr/lib/menu/'+menuitemname)
return
def menuupdate():
return os.spawnl(os.P_WAIT,'/usr/bin/update-menus','update-menus')
# Prep
menuitems=popen2.Popen3('ls -l /usr/lib/menu')
Menulist=menuitems.fromchild.readlines()
print Menulist
print 'Menu list read... there were...'
print Menulist[0]
print

Menulist=Menulist[1:]  # get rid of count line
MenuL=[]
for j in Menulist:
if j[:1] == 'd':
continue
R=string.split(j)
l=R[len(R)-1]
MenuL=MenuL+[l]
print
print 'After removing subdirectory entries, '
print len(MenuL), 'items need to be examined'
print
#end of Prep

for cr in MenuL:
disableitem(menuitemname=cr)
menuupdateret=menuupdate()
if menuupdateret != 0:
print
print 'Problem with menu update! return code = ', menuupdateret
print 'Menuitem file removed was '+cr
sys.exit(0)
x=disposition(menuitemname=cr)
if x=='k' or x=='a':
restoreitem(menuitemname=cr)
if x=='a':
menuupdate()
print 'stopping after restoring '+cr
sys.exit(0)
menuupdate()

# end of program menuanalyze


OK you know the drill, I hope...

Cut from the hashbang '#!' line to the end of program line and paste to 
a text editor. DO NOT remove any indentations... they must be preserved 
because that is the ONLY way the python language recognizes block 
beginnings and endings and nestings.
Also that hashbang must be the first line in the script file.

Save the file under a useful name like menuanalyze

make said saved file executable by

chmod a+x menuanalyze

open a terminal and su to root

./menuanalyze

Civileme





Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-29 Thread Mad Scientist

On Monday 29 July 2002 01:12 pm, civileme wrote:
 Right now what I see is that the easy way to analyze this is likely
 going to be using a script

 The following is a very simple-minded one which should do some magic
[snip]

Thanks for the script. Is there a latency from when it removes the item and 
says check menus and when it's safe to actually check? I stepped through 
all 200-odd menu items one at a time, checking for each one and then 
'k'eeping it. No luck. I still have no menus. :-(

I'm about ready to give up and re-install. Here I thought only Windoze users 
suffered from the semi-annual re-install to fix odd quirks. I guess it's 
universal to owning a PC.

-Mad

-- 
Madness is soil in which creativity grows

 - Chris Bielek



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-28 Thread Dennis Myers

On Saturday 27 July 2002 09:40 pm, you wrote:
 El sáb, 27-07-2002 a las 19:57, Dennis Myers escribió:
  On Saturday 27 July 2002 08:32 pm, you wrote:
   I installed Gnome and removed KDE, leaving alone my various other
   windows managers (Blackbox, IceWM, etc.). Fine, but now the start menus
   in my various windows managers are missing many items. All items are
   visible in menudrake, but they do not appear in the start menus. I've
   tried editing menudrake and rebooting, but no change in the start
   menus. What should I do to make my menus reflect what menudrake shows?
  
   Warren
 
  Warren, I believe that some of the menus were probably KDE specific and
  since you got rid of KDE they are not really there anymore, just a guess.
  So I would try update-menus -v from a su console and see if that does
  not fix up your menus and menudrake. HTH

 No, quite the opposite, I'm afraid. Everything has been lost from my
 menus except the freshly installed Gnome apps. The Mandrake Control
 Center is gone, the Software Manager is gone, the window manager
 specific apps are gone (for example, the configuration tools for
 Blackbox), and so forth. These apps have not been uninstalled and can
 still be launched from a terminal; they're just not on any menu any
 more. update-menu produces no change. Any other ideas?

 Warren
Sorry, my limited expertise comes up empty on further ideas.
-- 
Dennis M. linux user #180842



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-28 Thread Mad Scientist

On Sunday 28 July 2002 08:24 am, Dennis Myers wrote:
I installed Gnome and removed KDE, leaving alone my various other
windows managers (Blackbox, IceWM, etc.). Fine, but now the start
menus in my various windows managers are missing many items. All
items are visible in menudrake, but they do not appear in the start
menus. I've tried editing menudrake and rebooting, but no change in
the start menus. What should I do to make my menus reflect what
menudrake shows?

I have a very similar (perhaps the same) problem. It first started after I 
installed WINE from source. If I choose menu style All applications in 
MenuDrake, I get nothing in the K menu even though all menus are present in 
MenuDrake. If I choose What to do? menu style, then those ones are there. 
But checking on Add link to All applications menu doesn't add any such 
link. It seems the applications menu is somehow messed up. Finally, if I 
choose Original menu, then I *do* get the original menus. Unfortunately, 
these are unrelated to which apps I have installed.

Hopefully this additional info causes a light to go on for somebody :-)

-- 
Madness is soil in which creativity grows

 - Chris Bielek



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-28 Thread civileme

Mad Scientist wrote:

On Sunday 28 July 2002 08:24 am, Dennis Myers wrote:

I installed Gnome and removed KDE, leaving alone my various other
windows managers (Blackbox, IceWM, etc.). Fine, but now the start
menus in my various windows managers are missing many items. All
items are visible in menudrake, but they do not appear in the start
menus. I've tried editing menudrake and rebooting, but no change in
the start menus. What should I do to make my menus reflect what
menudrake shows?


I have a very similar (perhaps the same) problem. It first started after I 
installed WINE from source. If I choose menu style All applications in 
MenuDrake, I get nothing in the K menu even though all menus are present in 
MenuDrake. If I choose What to do? menu style, then those ones are there. 
But checking on Add link to All applications menu doesn't add any such 
link. It seems the applications menu is somehow messed up. Finally, if I 
choose Original menu, then I *do* get the original menus. Unfortunately, 
these are unrelated to which apps I have installed.

Hopefully this additional info causes a light to go on for somebody :-)




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

If you look at /usr/lib/menu you will see all sorts of files that have 
to do with menu.  In those files is a needs clause.

If it needs kde then it disappears when kde is removed.  Those files are 
written directly into the mdk rpm spec files and are cleaned when things 
are removed.

If you remove KDE surely you did not expect anything depending on KDE to 
stick around.  Konqueror does have an embedded version, true, but that 
version is not included with the distro.

Now menu files can be in the system menu or in the user menu (which are 
specific to each user) and they can appear for a specific desktop 
 'Needs kde'  'needs gnome'  'needs blackbox'  are sometimes clauses

There is considerable room for expansion in the menu structure.  The 
what to do? is an example.  It is also easily possible to add another 
clause to each menu item which defines a level so that a user could rate 
his own level and if for example choosing newbie, see only the simplest 
of apps.  This is easily done.

What you will notice about our menus is that, to the extent possible, 
they stay the same across desktops.  KDE and GNOME-specific items that 
just need the widget set for each of those do propagate across desktops, 
and are on some of them submenued as KDE apps or GNOME Apps.

In other words the system did what it was told which wasn't what you 
expected.

Civileme
 





Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-28 Thread Mad Scientist

On Sunday 28 July 2002 02:21 pm, you wrote:
 If you look at /usr/lib/menu you will see all sorts of files that have
 to do with menu.  In those files is a needs clause.

 If it needs kde then it disappears when kde is removed.  Those files are
 written directly into the mdk rpm spec files and are cleaned when things
 are removed.

 If you remove KDE surely you did not expect anything depending on KDE to
 stick around.  Konqueror does have an embedded version, true, but that
 version is not included with the distro.

 Now menu files can be in the system menu or in the user menu (which are
 specific to each user) and they can appear for a specific desktop
  'Needs kde'  'needs gnome'  'needs blackbox'  are sometimes clauses

 There is considerable room for expansion in the menu structure.  The
 what to do? is an example.  It is also easily possible to add another
 clause to each menu item which defines a level so that a user could rate
 his own level and if for example choosing newbie, see only the simplest
 of apps.  This is easily done.

 What you will notice about our menus is that, to the extent possible,
 they stay the same across desktops.  KDE and GNOME-specific items that
 just need the widget set for each of those do propagate across desktops,
 and are on some of them submenued as KDE apps or GNOME Apps.

 In other words the system did what it was told which wasn't what you
 expected.

This is all very helpful information and I'm starting to get a better 
understanding of how these menus work. But I still can't solve this one. 
Although the original poster indicated he had removed KDE, I'm not sure if 
that's the problem. At least in my case, I never removed KDE. Also, it's not 
just the KDE-related menus that are gone. All menus are gone. And they are 
gone from all window managers. I basically have from Run Command and down 
still there but everything above is gone. The original poster stated 
Everything has been lost from my menus except the freshly installed Gnome 
apps. which sounds to me to be the same problem.

When I go Original menu style, I do get all those menus, but they do not 
relate to the apps I have installed. I can get the What to do ? menus to 
show, but not the All applications. And they are the ones that really fit 
best with what I actually have installed.

They *do* appear in menudrake. According to menudrake, everything looks 
perfect. They just don't show in the real menus.

Still confused,

-Mad

-- 
Madness is soil in which creativity grows

 - Chris Bielek



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-27 Thread Dennis Myers

On Saturday 27 July 2002 08:32 pm, you wrote:
 I installed Gnome and removed KDE, leaving alone my various other
 windows managers (Blackbox, IceWM, etc.). Fine, but now the start menus
 in my various windows managers are missing many items. All items are
 visible in menudrake, but they do not appear in the start menus. I've
 tried editing menudrake and rebooting, but no change in the start menus.
 What should I do to make my menus reflect what menudrake shows?

 Warren
Warren, I believe that some of the menus were probably KDE specific and since 
you got rid of KDE they are not really there anymore, just a guess. So I 
would try update-menus -v from a su console and see if that does not fix up 
your menus and menudrake. HTH

-- 
Dennis M. linux user #180842



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [newbie] Menus damaged when KDE removed

2002-07-27 Thread Warren Post

El sáb, 27-07-2002 a las 19:57, Dennis Myers escribió:
 On Saturday 27 July 2002 08:32 pm, you wrote:
  I installed Gnome and removed KDE, leaving alone my various other
  windows managers (Blackbox, IceWM, etc.). Fine, but now the start menus
  in my various windows managers are missing many items. All items are
  visible in menudrake, but they do not appear in the start menus. I've
  tried editing menudrake and rebooting, but no change in the start menus.
  What should I do to make my menus reflect what menudrake shows?
 
  Warren
 Warren, I believe that some of the menus were probably KDE specific and since 
 you got rid of KDE they are not really there anymore, just a guess. So I 
 would try update-menus -v from a su console and see if that does not fix up 
 your menus and menudrake. HTH

No, quite the opposite, I'm afraid. Everything has been lost from my
menus except the freshly installed Gnome apps. The Mandrake Control
Center is gone, the Software Manager is gone, the window manager
specific apps are gone (for example, the configuration tools for
Blackbox), and so forth. These apps have not been uninstalled and can
still be launched from a terminal; they're just not on any menu any
more. update-menu produces no change. Any other ideas?

Warren




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com