You are not logged in.

#1 2011-08-25 20:20:58

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Menumaker, OpenBox3.x are not co-operating

I've had this issue for a week now and I'm anxious to solve it.  When I run "mmaker -vf openbox3" my menus, regardless whether I restart OB or just do a --re-configure through the menu or console, the menus do NOT change at all. 

I am obviously doing something wrong but I have no idea what.  I used to use menumaker a year ago and I liked it but now I'm stuck.

The only output I get is what I'm pasting below:

heather@blackyunzi ~ $ mmaker -vf openbox3
* scanning
  desktop... 50 apps found
  legacy... 12 apps found
  debian... 37 apps found
* merging... 23 coincidings detected
* generating
  no terminal emulator specified; will use the default
no suitable terminal emulator found
heather@blackyunzi ~ $ 

This is quickly becoming a trial of just how stubborn I am.

Last edited by MoonSwan (2011-08-25 20:21:53)

Offline

#2 2011-08-25 20:41:44

defears
Member
Registered: 2010-07-26
Posts: 218

Re: Menumaker, OpenBox3.x are not co-operating

Mine also says

* writing to ~/.config/openbox/menu.xml

Maybe your menu.xml has the wrong permissions?

Offline

#3 2011-08-25 20:48:20

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Menumaker, OpenBox3.x are not co-operating

Don't know if it helps, but Openbox was recently updated to version 3.5 and there are some changes related to that update, see https://wiki.archlinux.org/index.php/Op … penbox_3.5

Offline

#4 2011-08-25 22:19:20

nrempel
Member
Registered: 2010-12-27
Posts: 37

Re: Menumaker, OpenBox3.x are not co-operating

no terminal emulator specified; will use the default
no suitable terminal emulator found

Maybe it's not automatically recognizing your terminal emulator?  Perhaps you can specify it manually with an option or in a configuration file?

Offline

#5 2011-08-26 19:36:44

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Menumaker, OpenBox3.x are not co-operating

Thanks for the replies.  I haven't had a chance to mess with OB again (when I do I'll post any results).

@karol, ya I saw that page but I don't see how any of those files would mess up menumaker?  I'll take a suggestion for a better menu program too... I found one from fedora (mentioned in the Arch wiki about menu-makers) that looks useful but I have no idea how to run it! Link if you want to check it out: https://wiki.archlinux.org/index.php/Op … enu_script

I also tried this suggestion but I couldn't get it to co-operate ( i feel like such an idiot, I can't even get a menu program to work! tongue) https://wiki.archlinux.org/index.php/Openbox#Obm-xdg

@ nrempel, after reading menu-maker's docs (the only ones available by using the --help function) it seems that menu-maker only allows a very narrow set of terminals and lxterminal or urxvt isn't one of them.  Thanks for the suggestion though.  smile

@defears, well I don't know what the permissions should be but I can try to look at that.  May have to make a new user and see what the defaults are.  Thanks for that idea! big_smile

Offline

#6 2011-08-26 19:39:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Menumaker, OpenBox3.x are not co-operating

MoonSwan wrote:

I'll take a suggestion for a better menu program too... I found one from fedora (mentioned in the Arch wiki about menu-makers) that looks useful but I have no idea how to run it! Link if you want to check it out: https://wiki.archlinux.org/index.php/Op … enu_script

What seems to be the problem with the script?

Offline

#7 2011-08-26 19:41:15

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Menumaker, OpenBox3.x are not co-operating

The problem is that I don't understand why it's only the top half of the script; and for another thing, I have no idea how to run/use it.  I've never used a python script before so I'm not even sure of what I need as dependencies to run it and um well, how do you run it?

Offline

#8 2011-08-26 19:49:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Menumaker, OpenBox3.x are not co-operating

I think that's the whole script. You need to have python2 installed and change the top line of the script from

#!/usr/bin/env python

to

#!/usr/bin/env python2

(add '2' at the end of the line).
Run

chmod +x <name_of_the_script>

to make it executable. So far so good.

I doesn't run on my system, because

Traceback (most recent call last):
  File "./p2", line 22, in <module>
    import gmenu, re, sys
ImportError: No module named gmenu

it can't find a python module named gmenu. I ahve no idea how to fix this.

Offline

#9 2011-08-26 19:55:12

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Menumaker, OpenBox3.x are not co-operating

Thanks Karol I will give it a try later today on a crashbox I have here (an ancient pair of Dell laptops).  Hopefully someone more knowledgeable will amble into this thread and spread their pearls of wisdom at us... or throw the damn pearls at us a la baseball pitcher.  big_smile

Offline

#10 2011-08-26 21:32:33

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Menumaker, OpenBox3.x are not co-operating

This little script works here for years (and was adapted from the one I used years back in my IceWM era):

#!/bin/bash
#
# Build a new menu in menu.

cd /home/bp/.config/openbox/mkmenu
if [ -a menu.xml ]
then
  cp -b menu.xml menu.xml.old
fi
xdg_menu --format openbox3 > menu.main
cat menu.head menu.main menu.local menu.tail > menu.xml
cp menu.xml ..
openbox --reconfigure

As you see, I use two additional handcrafted menus to keep local relevant stuff (and that which isn't recognized by xdg_menu) around the xdg built menu proper. Thus I have optimal control over what the Openbox menu will show.


To know or not to know ...
... the questions remain forever.

Offline

#11 2011-08-29 22:28:15

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Menumaker, OpenBox3.x are not co-operating

Thank very much for the script!  Apparently, though, it will need some tweaking (and advice?) about why this script doesn't want to work for me.  And honestly, I don't understand your script very well so I'm not even sure what to do after running it and it failed with:

heather@blackyunzi ~ $ sh menus/bernarchers_menu_script 
menus/bernarchers_menu_script: line 7: cd: /home/bp/.config/openbox/mkmenu: No such file or directory
menus/bernarchers_menu_script: line 12: xdg_menu: command not found
cat: menu.head: No such file or directory
cat: menu.local: No such file or directory
cat: menu.tail: No such file or directory
cp: cannot create regular file `../menu.xml': Permission denied

Am I guessing correctly that I require the apps/files mentioned that the script couldn't find ... such as menu.tail and xdg_menu?  Bleh I feel like an idiot but I really want to get this sorted out so that the next time I need it, I'll be able to construct a decent menu for OpenBox.

Offline

#12 2011-08-29 22:56:34

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Menumaker, OpenBox3.x are not co-operating

Oh, sorry. This was not meant to be taken too literally. Some stuff needs more explanation it seems.

"/home/bp/" is my user folder. Use yours here. Or you could as well use "~/" or "$HOME/".
"mkmenu" is a subfolder I created for the purpose of menu creation only. It holds this script and several auxiliary menus as shown below.
The "xdg_menu" command is in the archlinux-xdg-menu package from community.
"menu.head", "menu.local", "menu.tail" are handcrafted menus holding some fixed parts of my local setup.

Just to get an idea. Do not copy literally. You will have to build your own partial menus.
(Sorry German version only.)

menu.head: this is the common header for the openbox menu structure

<?xml version="1.0" encoding="UTF-8"?>

<openbox_menu xmlns="http://openbox.org/3.4/menu">

menu.local: stuff I like to see at top for historical reasons mainly

 <menu id="Lokal" label="Lokale Anwendungen">
     <item label="Terminal">
       <action name="Execute"><execute>urxvt -bc</execute></action>
     </item>
     <item label="PDF-Betrachter">
       <action name="Execute"><execute>xpdf</execute></action>
     </item>
     <separator />
     <item label="Dokumentation anzeigen">
       <action name="Execute"><execute>DD</execute></action>
     </item>
     <item label="Dokumentation bearbeiten">
       <action name="Execute"><execute>DDE</execute></action>
     </item>
     <separator />
     <item label="Elinks">
       <action name="Execute"><execute>ELINKS</execute></action>
     </item>
     <separator />
     <item label="Bildschirmfoto">
       <action name="Execute"><execute>gnome-screenshot --interactive</execute></action>
     </item>
     <item label="Screensaver starten">
       <action name="Execute"><execute>xscreensaver-command -activate</execute></action>
     </item>
     <item label="Screensaver verwalten">
       <action name="Execute"><execute>xscreensaver-demo</execute></action>
     </item>
     <item label="Druckerverwaltung (HP)">
       <action name="Execute"><execute>hp-toolbox</execute></action>
     </item>
     <separator />
     <item label="HTop (Root)">
       <action name="Execute"><execute>HTOP</execute></action>
     </item>
     <item label="XOsView">
       <action name="Execute"><execute>xosview</execute></action>
     </item>
     <item label="NVIDIA Display Settings">
       <action name="Execute"><execute>/usr/bin/nvidia-settings</execute></action>
     </item>
     <separator />
     <item label="Zeichentabelle">
       <action name="Execute"><execute>gucharmap</execute></action>
     </item>
 </menu> <!-- Lokal -->

menu.tail: stuff I like to see at the bottom, mostly for maintenance

 <menu id="Openbox-System" label="Einstellungen">
  <item label="Menü neu anlegen">
    <action name="Execute">
      <command>~/.config/openbox/mkmenu/mkmenu</command>
    </action>
  </item>
  <item label="Menü konfigurieren">
    <action name="Execute">
      <command>obmenu</command>
    </action>
  </item>
  <separator />
  <item label="Konfigurationsmanager">
    <action name="Execute">
      <command>obconf</command>
    </action>
  </item>
  <item label="Neu konfigurieren">
    <action name="Reconfigure" />
  </item>
 </menu> <!-- Openbox-System -->

<menu id="root-menu" label="Openbox 3">
  <separator label="Arch Linux" />
  <menu id="Archlinux"/>
  <separator label="Anwendungen" />
  <menu id="Barrierefreiheit"/>
  <menu id="Bildung"/>
  <menu id="Büro"/>
  <menu id="Entwicklung"/>
  <menu id="Grafik"/>
  <menu id="Internet"/>
  <menu id="Sonstige"/>
  <menu id="Spiele"/>
  <menu id="Systemwerkzeuge"/>
  <menu id="Unterhaltungsmedien"/>
  <menu id="Zubehör"/>

  <separator />
  <menu id="Lokal"/>

  <separator label="Openbox" />
  <menu id="Openbox-System"/>
  <separator/>
  <item label="Ganz ausschalten">
    <action name="Execute">
      <command>sudo halt</command>
    </action>
  </item>
  <item label="Neu starten">
    <action name="Execute">
      <command>sudo reboot</command>
    </action>
  </item>
  <separator />
  <item label="Nur abmelden">
    <action name="SessionLogout">
      <prompt>no</prompt>
    </action>
  </item>
</menu>

</openbox_menu>

To know or not to know ...
... the questions remain forever.

Offline

#13 2011-08-29 23:33:21

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Menumaker, OpenBox3.x are not co-operating

Thank you!  I should be able to get something working with the information you've so kindly shared.  smile

I'll post back if I have more issues but it seems likely I'll manage and will post a success story (I hope).

Edit: ran into my first hurdle, one I've been trying to fix all day it seems:

Line 1 start tag expected, '<' not found.

I saved your script under .config/openbox/mkmenu/berarchers_menu_script

I only changed one thing in it so far too:

#!/bin/bash
#
##bernarchers_menu_script
# 
# Build a new menu in menu.

##cd /home/bp/.config/openbox/mkmenu

cd /home/heather/.config/openbox/mkmenu
if [ -a menu.xml ]
then
  cp -b menu.xml menu.xml.old
fi
xdg_menu --format openbox3 > menu.main
cat menu.head menu.main menu.local menu.tail > menu.xml
cp menu.xml ..
openbox --reconfigure

I have no idea what the error is but I've gotten it a few times today from different scripts (most using XML).  Help?

Last edited by MoonSwan (2011-08-29 23:48:23)

Offline

#14 2011-08-30 00:46:25

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Menumaker, OpenBox3.x are not co-operating

Best post the first few lines of the newly created menu.xml. It looks like a typo somewhere, on first thought. (Although the error could be anywhere when it ocurred on other occasions, too.)

Also comment the "openbox --reconfigure" line. It is not really needed for the build. You can issue this command manually as long as you are still debugging.


To know or not to know ...
... the questions remain forever.

Offline

#15 2011-08-30 00:51:53

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: Menumaker, OpenBox3.x are not co-operating

I use obmenu-generator in aur (https://aur.archlinux.org/packages.php?ID=47711). It generates the menu on the fly thus there is no need to update menu whenever you add programs. You should back up your original menu if you use this as it will be replaced.

Offline

#16 2011-08-30 00:53:25

defears
Member
Registered: 2010-07-26
Posts: 218

Re: Menumaker, OpenBox3.x are not co-operating

Try this first.

cp /etc/xdg/openbox/menu.xml ~/.config/openbox

Then try menumaker.

I think you don't have a menu.xml at all. Menumaker will fail if you don't.

Offline

Board footer

Powered by FluxBB