Topic: ugh. i did something stupid. openbox menu.xml

i started tweaking the openbox menu.xml file without first backing up the original.  made some kind of syntax error and now i.ve lost the bottom section of the desktop context menu, including the openbox settings and system settings selections. 

i was trying to author a shortcut for inkscape, which i was able to do, but insodoing i lost the bottom end of the menu.  i tried deleting my new entry but that didn.t work.  i have poured over the syntax and can.t find where i.ve made my mistake but OBVIOUSLY i am no coder.  is there any kind of code syntax checker that i could use to discover my malfeasance? 

don.t know if it will help/matter, but here is the section in question where i basically just followed the code that i saw for the other menu items.  i entered it right after the gimp section... (what follows is the code after i deleted my inkscape entry):

            <item label="Thunar File Manager (root)">
                <action name="Execute">
                    <execute>
                        gksudo thunar
                    </execute>
                </action>
            </item>
        </menu>
        <menu id="graphics" label="Graphics">
            <item label="GIMP">
                <action name="Execute">
                    <execute>
                        gimp
                    </execute>
                </action>
            </item>
        </menu>
        <menu id="image viewer" label="Image Viewer">
            <item label="Viewnior Image Viewer">
                <action name="Execute">
                    <execute>
                        viewnior
                    </execute>
                </action>
            </item>
        </menu>

short of using a program to check for syntax errors, is there any chance somebody could post a standard openobox menu.xml file that i could copy/paste...?

[wtf?] / (persistence) = ah(HA)!

Re: ugh. i did something stupid. openbox menu.xml

Do you have one in

/etc/skel/.config/openbox/menu.xml

Re: ugh. i did something stupid. openbox menu.xml

You're missing a <menu> tag...unless you just neglected to post that...

while ( ! ( succeed = try() ) );

Re: ugh. i did something stupid. openbox menu.xml

oylenshpeegul:

when i try to navigate to : /etc/skel/.config/openbox/menu.xml, i can only get as far as etc/skel.
i have tried sudo cd ... thinking that maybe you have to be root to get to a .config folder but that doesn.t work for me either.

pvsage:

you.re right, i just neglected to post that part of the code, but it.s there.

[wtf?] / (persistence) = ah(HA)!

Re: ugh. i did something stupid. openbox menu.xml

Here is a default menu.xml
This will help you find the problem big_smile

<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/                 file:///usr/share/openbox/menu.xsd">
    <menu id="root-menu" label="Openbox 3">
        <item label="Run Program">
            <action name="Execute">
                <execute>
                    gmrun
                </execute>
            </action>
        </item>
        <separator/>
        <item label="Terminal">
            <action name="Execute">
                <execute>
                    terminator
                </execute>
            </action>
        </item>
        <item label="Web Browser">
            <action name="Execute">
                <execute>
                    x-www-browser
                </execute>
            </action>
        </item>
        <item label="File Manager">
            <action name="Execute">
                <execute>
                    thunar
                </execute>
            </action>
        </item>
        <item label="Text Editor">
            <action name="Execute">
                <execute>
                    geany
                </execute>
            </action>
        </item>
        <item label="Media Player">
            <action name="Execute">
                <execute>
                    vlc
                </execute>
            </action>
        </item>
        <separator/>
        <menu id="accessories" label="Accessories">
            <item label="Catfish File Search">
                <action name="Execute">
                    <execute>
                        catfish
                    </execute>
                </action>
            </item>
            <item label="Archive Manager">
                <action name="Execute">
                    <execute>
                        file-roller
                    </execute>
                </action>
            </item>
            <item label="Geany Text Editor">
                <action name="Execute">
                    <execute>
                        geany
                    </execute>
                </action>
            </item>
            <item label="Terminator Terminal">
                <action name="Execute">
                    <execute>
                        terminator
                    </execute>
                </action>
            </item>
            <item label="Thunar File Manager">
                <action name="Execute">
                    <execute>
                        thunar
                    </execute>
                </action>
            </item>
            <item label="Thunar File Manager (root)">
                <action name="Execute">
                    <execute>
                        gksudo thunar
                    </execute>
                </action>
            </item>
        </menu>
        <menu id="graphics" label="Graphics">
            <item label="GIMP">
                <action name="Execute">
                    <execute>
                        gimp
                    </execute>
                </action>
            </item>
            <item label="Viewnior Image Viewer">
                <action name="Execute">
                    <execute>
                        viewnior
                    </execute>
                </action>
            </item>
            <menu id="graphicsScreenshots" label="Take Screenshot">
                <item label="Screenshooter">
                    <action name="Execute">
                        <execute>
                            xfce4-screenshooter
                        </execute>
                    </action>
                </item>
                <separator label="scrot"/>
                <item label="Now">
                    <action name="Execute">
                        <execute>
                            scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; viewnior ~/images/$f'
                        </execute>
                    </action>
                </item>
                <item label="In 5 Seconds...">
                    <action name="Execute">
                        <execute>
                            scrot -d 5 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; viewnior ~/images/$f'
                        </execute>
                    </action>
                </item>
                <item label="In 10 Seconds...">
                    <action name="Execute">
                        <execute>
                            scrot -d 10 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; viewnior ~/images/$f'
                        </execute>
                    </action>
                </item>
                <item label="Selected Area... (click &amp; drag mouse)">
                    <action name="Execute">
                        <execute>
                            scrot -s '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; viewnior ~/images/$f'
                        </execute>
                    </action>
                </item>
            </menu>
        </menu>
        <menu id="multimedia" label="Multimedia">
            <item label="VLC Media Player">
                <action name="Execute">
                    <execute>
                        vlc
                    </execute>
                </action>
            </item>
            <item label="Volume Control">
                <action name="Execute">
                    <execute>
                        xfce4-mixer
                    </execute>
                </action>
            </item>
            <item label="Xfburn">
                <action name="Execute">
                    <execute>
                        xfburn
                    </execute>
                </action>
            </item>
        </menu>
        <menu id="network" label="Network">
            <menu execute="cb-x-www-browser-pipemenu" id="wwwbrowsers" label="WWW Browsers"/>
            <item label="gFTP Client">
                <action name="Execute">
                    <execute>
                        gftp
                    </execute>
                </action>
            </item>
            <item label="Transmission BitTorrent Client">
                <action name="Execute">
                    <execute>
                        transmission
                    </execute>
                </action>
            </item>
            <item label="XChat IRC Client">
                <action name="Execute">
                    <execute>
                        xchat
                    </execute>
                </action>
            </item>
            <item label="Remote Filesystems">
                <action name="Execute">
                    <execute>
                        gigolo
                    </execute>
                </action>
            </item>
            <menu execute="cb-remote-desktop-pipemenu" id="remotedesktop" label="Remote Desktop"/>
            <separator label="Services"/>
            <menu execute="cb-dropbox-pipemenu" id="dropbox" label="Dropbox"/>
        </menu>
        <menu id="office" label="Office">
            <menu id="libreoffice" label="LibreOffice" execute="cb-libreoffice-pipemenu" />
            <item label="AbiWord Word Processor">
                <action name="Execute">
                    <execute>
                        abiword
                    </execute>
                </action>
            </item>
            <item label="Gnumeric Spreadsheet">
                <action name="Execute">
                    <execute>
                        gnumeric
                    </execute>
                </action>
            </item>
            <item label="Calculator">
                <action name="Execute">
                    <execute>
                        gnome-calculator
                    </execute>
                </action>
            </item>
            <item label="Evince PDF Viewer">
                <action name="Execute">
                    <execute>
                        evince
                    </execute>
                </action>
            </item>
        </menu>
        <separator/>
        <menu id="settings" label="Settings">
            <menu execute="cb-compmgr" id="CompositingPipeMenu" label="Compositing"/>
            <menu id="conkyconfig" label="Conky">
                <item label="Edit .conkyrc">
                    <action name="Execute">
                        <execute>
                            geany ~/.conkyrc
                        </execute>
                    </action>
                </item>
                <item label="Restart Conky">
                    <action name="Execute">
                        <execute>
                            conkywonky
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man page">
                    <action name="Execute">
                        <execute>
                            terminator --command="man conky"
                        </execute>
                    </action>
                </item>
                <item label="Wiki Page">
                    <action name="Execute">
                        <execute>
                            x-www-browser http://crunchbanglinux.org/wiki/conky
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="dmenuconfig" label="dmenu">
                <item label="Edit start-up script">
                    <action name="Execute">
                        <execute>
                            geany ~/.config/dmenu/dmenu-bind.sh
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man page">
                    <action name="Execute">
                        <execute>
                            terminator --command="man dmenu"
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="gmrunconfig" label="gmrun">
                <item label="Edit config file">
                    <action name="Execute">
                        <execute>
                            geany ~/.gmrunrc
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man page">
                    <action name="Execute">
                        <execute>
                            terminator --command="man gmrun"
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="obConfig" label="Openbox">
                <item label="Edit menu.xml">
                    <action name="Execute">
                        <execute>
                            geany ~/.config/openbox/menu.xml
                        </execute>
                    </action>
                </item>
                <item label="Edit rc.xml">
                    <action name="Execute">
                        <execute>
                            geany ~/.config/openbox/rc.xml
                        </execute>
                    </action>
                </item>
                <item label="Edit autostart">
                    <action name="Execute">
                        <execute>
                            geany ~/.config/openbox/autostart
                        </execute>
                    </action>
                </item>
                <item label="GUI Menu Editor">
                    <action name="Execute">
                        <execute>
                            obmenu
                        </execute>
                    </action>
                </item>
                <item label="GUI Applications Settings Editor">
                    <action name="Execute">
                        <execute>
                            obapps
                        </execute>
                    </action>
                </item>
                <item label="GUI Config Tool">
                    <action name="Execute">
                        <execute>
                            obconf
                        </execute>
                    </action>
                </item>
                <item label="Reconfigure">
                    <action name="Reconfigure"/>
                </item>
                <item label="Restart">
                    <action name="Restart"/>
                </item>
            </menu>
            <menu id="terminatorconfig" label="Terminator">
                <item label="Edit config file">
                    <action name="Execute">
                        <execute>
                            geany ~/.config/terminator/config
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man page">
                    <action name="Execute">
                        <execute>
                            terminator --command="man terminator_config"
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="tint2config" label="tint2">
                <item label="Edit config file">
                    <action name="Execute">
                        <execute>
                            geany ~/.config/tint2/tint2rc
                        </execute>
                    </action>
                </item>
                <item label="Restart tint2">
                    <action name="Execute">
                        <execute>
                            tint2restart
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man page">
                    <action name="Execute">
                        <execute>
                            terminator --command="man tint2"
                        </execute>
                    </action>
                </item>
                <item label="Online Help">
                    <action name="Execute">
                        <execute>
                            x-www-browser http://code.google.com/p/tint2/wiki/Welcome
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="DisplaySettings" label="Display Settings">
                <item label="Adjust with grandr">
                    <action name="Execute">
                        <execute>
                            grandr
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man xrandr">
                    <action name="Execute">
                        <execute>
                            terminator --command="man xrandr"
                        </execute>
                    </action>
                </item>
            </menu>
            <item label="Edit Default Applications">
                <action name="Execute">
                    <execute>
                        terminator --command="sudo update-alternatives --all"
                    </execute>
                </action>
            </item>
            <item label="User Interface Settings">
                <action name="Execute">
                    <execute>
                        lxappearance
                    </execute>
                </action>
            </item>
            <item label="Power Management">
                <action name="Execute">
                    <execute>
                        xfce4-power-manager-settings
                    </execute>
                </action>
            </item>
            <item label="Screensaver">
                <action name="Execute">
                    <execute>
                        xscreensaver-demo
                    </execute>
                </action>
            </item>
            <item label="Choose Wallpaper">
                <action name="Execute">
                    <execute>
                        nitrogen ~/images/wallpapers/
                    </execute>
                </action>
            </item>
        </menu>
        <menu id="system" label="System">
            <menu execute="cb-printing-pipemenu" id="PrintingPipeMenu" label="Printers"/>
            <item label="GParted">
                <action name="Execute">
                    <execute>
                        gksudo gparted
                    </execute>
                </action>
            </item>
            <item label="Synaptic Package Manager">
                <action name="Execute">
                    <execute>
                        gksudo synaptic
                    </execute>
                </action>
            </item>
        </menu>
        <!--<menu id="help" label="Help" execute="cb-help-pipemenu" />-->
        <separator/>
        <item label="Lock Screen">
            <action name="Execute">
                <execute>
                    cb-lock
                </execute>
            </action>
        </item>
        <item label="Exit">
            <action name="Execute">
                <execute>
                    cb-exit
                </execute>
            </action>
        </item>
    </menu>
</openbox_menu>
I'm pretty sure that zombies really do exist...
MrPeachy's v9000      Sector11's Conky PitStop      My Gallery

Re: ugh. i did something stupid. openbox menu.xml

Huh. Well, here's mine /etc/skel/.config/openbox/menu.xml

http://crunchbanglinux.org/pastebin/1486

I'm on Statler.

$ cat /etc/lsb-release-crunchbang
DISTRIB_ID=CrunchBang
DISTRIB_RELEASE=10
DISTRIB_CODENAME=statler
DISTRIB_DESCRIPTION="CrunchBang 10 statler"

I have changed my $HOME/.config/openbox/menu.xml also, so there's no sense in my posting that.

Re: ugh. i did something stupid. openbox menu.xml

falldown:
thanks for the default snapshot.  i copy/pasted/saved it and still come up with the same error.  oh how i am kicking myself for wandering into such a stupid problem.

oylenshpeegul:
i was finally able to navigate to that file via nano but i couldn.t copy it.  my bash expertise is very shallow, but i can tell you that <CTRL> <A> doesn.t select all. wink  and forgive my asking, but wouldn.t that be the same messed up file that i saved?

in any case, thanks to both of you for responding.  i.m done for the night as i.m bar-bound for wifi and if i stay here any longer i won.t be able to drive home.  will take up the fight tomorrow.  thanks again and CRUNCHBANG rocks!!!

[wtf?] / (persistence) = ah(HA)!

Re: ugh. i did something stupid. openbox menu.xml

The xml menu file is the one thing about Openbox I dislike.  I prefer Fluxboxes plainer one-line-per-entry model.

In the past I have flattened the xml to make it easier to hand edit;  the parser doesn't care.  But using obmenu expands it again.

brother mouse
new to crunchbang.
my first linux kernel build was on a 386-16sx with 6MB SIPP RAM ($50/MB!)

Re: ugh. i did something stupid. openbox menu.xml

fratermus:

"flattening the xml" sounds very intriguing but i.m guessing that if i have to ask
what that means, it.s out of my league.  correct?

[wtf?] / (persistence) = ah(HA)!

Re: ugh. i did something stupid. openbox menu.xml

think he's referring to when you remove the indentations in the xml-file (?)

Re: ugh. i did something stupid. openbox menu.xml

Getting all the tags associated with a given item on one line.  Makes for easy editing and duplication.

From the top of the stock menu:  pastebin example.  There is some wrappage but in the text editor they are single lines.

I assume there's a prettyprint or sed/perl hackery that will do this kind of thing automagically, but I just used the J command in vi. :-)

Last edited by fratermus (2012-02-09 18:08:45)

brother mouse
new to crunchbang.
my first linux kernel build was on a 386-16sx with 6MB SIPP RAM ($50/MB!)