Topic: [Solved :) ] debian-menu went missing

hi there, long time i didn't come visit on the forums smile

in 3 different computers my "debian-menu" just went missing after some update  like 2 months ago.. (so of course i don't have any idea what was in that update) :'(

i checked the rc and menu configuration files, everything "looks" fine (as before),
then i checked the menu package was installed (it wouldn't be the first time a very important package gets deleted by an update without me noticing.... roll ) & the packege was there without changes.
i tried to look around without finding nothing..
so.. ehmmm any ideas for me?
thanks & thanks people. big_smile

Last edited by liame (2011-07-09 11:52:15)

Re: [Solved :) ] debian-menu went missing

Hi liame

Do you mean the pipe-menu in openbox? I use something similar (obam.pl) because I set up my #! from netinstall and never got another debian-menu working.

If you are interested in obam.pl:
put this line in menu.xml

<menu execute="~/.config/openbox/obam.pl" id="desktop-app-menu" label="Menu"/>

create a file and save it as ~/.config/openbox/obam.pl

#!/usr/bin/perl
#
# OpenBox Applications (Pipe)Menu (C) Biffidus 2008
#
# (only kidding, it's not copyrighted. Do whatever you like with it)
#
# This pipe menu creates an application menu from the .desktop files
# found in many linux distributions. The desktop file must be of type
# Application and specify their Categories.
# 
# One or more paths to search may be provided on the command line or
# specified below. The menu structure is derived from the Categories
# attribute and may be customised below with the following keywords:
# 
# hide:     menu will not be displayed
# collapse: the submenus will be used instead
#
# Any item starting with X- is automatically hidden

my $APPSDIR = "/usr/share/applications/ /usr/kde/3.5/share/applications/kde/ ~/.
gnome/apps/ ~/.kde/share/apps";

my %CFG =
    (
     "Application" => "collapse",
     "GTK"         => "collapse",
     "KDE"         => "collapse",
     "Qt"          => "collapse",
    );

###############################################################################

# Hash of hashes
# $Hash{x}->{y} = z
# $Hash{x}{y}

my %menu; # application details

# Hash of arrays
# $Hash{$key} = \@Array
# @Array = @{$Hash{$key}}

my %cat;  # apps in each category (hashed lists)

################################################### Search for Applications ###

if ($#ARGV != -1) { $APPSDIR = join(" ", @ARGV); }

print STDERR "Searching $APPSDIR\n";

open (APPS, "find ".$APPSDIR." -name '*.desktop' |") || do
{
    print qq|<openbox_pipe_menu><item label="Error!" /></openbox_pipe_menu>\n|;
    die "could not open $APPSDIR";
};
@FILES = <APPS>;
close APPS;

######################################################## Parse Applications ###

print STDERR "\n### Scanning applications ###\n";

foreach $entry (@FILES)
{
    if (open(DE,$entry) && $entry =~ s|^.*/(.*?)\.desktop|$1|)
    {
        while (<DE>)
        {
            chomp;
            if (/^(\w+)=([^%]+)/)
            {
                # populate application details
                $menu{$entry}->{$1} = $2;
                
                # determine category
                if ($1 eq "Categories")
                {
                    print STDERR $2 . $entry;
                    my @tmp = split(/;/,$2);
                    
                    while ($CFG{$tmp[0]} eq "collapse")
                    {
                        shift @tmp;
                    }
                    if ($CFG{$tmp[0]} ne "hide" && $tmp[0] !~ /^X-/)
                    {
                        push @{$cat{$tmp[0]}},$entry;
                    }
                }
            }
        }
    }
}

############################################################# Generate Menu ###

print STDERR "\n### Generating menu ###\n";

print "<openbox_pipe_menu>\n";

foreach $key (sort keys %cat)
{
    print qq| <menu id="obam-$key" label="$key">\n|;

    foreach $app (sort @{$cat{$key}})
    {
        if ($menu{$app}{Type} eq "Application")
        {
            my $Name = $menu{$app}{Name};
            my $Exec = $menu{$app}{Exec};
            print qq|  <item label="$Name"><action name="Execute"><execute>$Exec</execute></action></item>\n|;
        }
    }
    print " </menu>";
}
print "</openbox_pipe_menu>\n";

print STDERR "Done\n";

###############################################################################
Nothing right in the left brain. Nothing left in the right brain.

Re: [Solved :) ] debian-menu went missing

so there's no way to fix the debian-menu?
sad
i liked my debian-menu...

Re: [Solved :) ] debian-menu went missing

I don't know if there is no fix... I just told you a workaround if you need something which is 'like' the menu.

Checked this one already? -> http://openbox.org/wiki/Help:Menus#The_Debian_menu

or run "update-menus", maybe it's just as easy as this smile

Nothing right in the left brain. Nothing left in the right brain.

Re: [Solved :) ] debian-menu went missing

emmm if i get it right that pipe pipes the apps that there ARE in the desktop?
'cause i don't have apps in the desktop...
i don't believe i have a desktop, too much patriarchal a desktop.. tongue
i just wanted my debian menu with all the apps i have in my netbox and keep forgetting that i have them or the names to invoke  them hmm;)

update: tried all the stuff and checked everything according to the openbox wiki, again.. just to be sure..
didn't work.. strange.. it should work....
maybe it's trying to tell me it's time to make a big backup & clean install ?? tongue

Last edited by liame (2011-07-09 11:40:24)

Re: [Solved :) ] debian-menu went missing

~/.config/openbox/menu.xml

if you have

<menu id="Debian"/>

change it to

<menu id="/Debian"/>

Maybe wink

Nothing right in the left brain. Nothing left in the right brain.

Re: [Solved :) ] debian-menu went missing

Mister, U R a genius!
Thank u!

Re: [Solved :) ] debian-menu went missing

genius indeed!  it's like... ... how did you know?

i've just been saved by that too.

smile  thnx smile



i was about to come up with a 9menu auto-populate script... but now i'll just be lazy again, until i next get frustrated back in dwm/scrotwm/xmonad that i dont have a menu, then i might get back to the idea of a 9menu auto-populating script.  learned a lot for that plan (/dream) from skimming through some of the obam perl script there (and i dont know perl from pollock).  so thnx for that too. smile

(p.s. couldnt get obam working. gur.)

Last edited by Digit (2011-10-02 16:56:47)

educate yourself so you may educate others.DeNoob&UnBloat PCs!
the only free webhosting i use.
say "NO!" to a chemical lobotomy in your food
flattr me, thnx

Re: [Solved :) ] debian-menu went missing

Oh I think this was even announced on openbox' page. Don't remember it anymore smile

Nothing right in the left brain. Nothing left in the right brain.

Re: [Solved :) ] debian-menu went missing

Digit wrote:

(p.s. couldnt get obam working. gur.)

Is perl installed? you can try to run the obam.pl in terminal and see if it reacts somehow.

Nothing right in the left brain. Nothing left in the right brain.