[SOLVED] Openbox | Cannot get obmenu-generator working

Forum rules
Before you post please read how to get help
Post Reply
TopDownTom
Level 1
Level 1
Posts: 3
Joined: Thu Jul 12, 2018 9:18 pm

[SOLVED] Openbox | Cannot get obmenu-generator working

Post by TopDownTom » Thu Sep 27, 2018 8:32 am

Hello all,

I am running Mint19 with XFCE, using Openbox as my window manager.

I am trying to get obmenu-generator running but I cannot seem to figure out what's missing. Below I will list all steps followed, and hopefully all pertinent outputs. If you need others, please let me know. *Between each of these steps, and multiple times otherwise, I ran openbox --reconfigure && openbox --restart. I have even rebooted a few times, but I cannot enact the change I seek*
1.) I followed this page. When it prompts to run

Code: Select all

obmenu-generator -p -i
this is my output:

Code: Select all

mkdir /home/tom/.config/obmenu-generator: File exists at /usr/bin/obmenu-generator line 194.
But then nothing happens. I even tried installing libgtk2-perl as per the installation guide first listed, to no effect.
2.) Digging deeper I read the INSTALL.MD file that comes with the pull, a copy of which can be found here. In it, it requires placing the obmenu-generator folder you get from the pull into the PATH. I have done so by editing my .profile file. The folder now appears on the PATH, at the end.

Code: Select all

echo $PATH
/home/tom/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/obmenu-generator
obmenu-generator stil doesn't work.
3.)I tried removing the existing menu, to "force" the use of another menu file (hoping that would be obmenu-generator) by:

Code: Select all

~/.config/openbox$mv menu.xml ./menu.xml.bak
but all that happened was Openbox opened the same menu you see when you first install Openbox (I don't know where this config file is located, I assumed there was only the menu.xml file. But OB found it somewhere...)

I'm sort of at a loss, I'm not sure what's going on exactly. It seems I've followed all the installation instructions, but I clearly missed something. My guess is I need to update the rc.xml file in some way, but I'm not sure what way that is. Pertaining to that, however, I have already in my rc.xml file the lines

Code: Select all

<mousebind button="Right" action="Press">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</mousebind>
I thought the issue lay in the definition of root-menu, but in the obmenu-generator.pl file there is a line

Code: Select all

my $menu_id         = "root-menu";
However, it is still possible this call is being run after (or before, and being re-written) wherever Openbox looks for root-menu definitions in the rc.xml

Any and all help will be appreciated, even if that help is "please post this on a different forum because it's not explicitly XFCE/Mint related"

-Tom

Resolution
Investigating the error found at line 194 of /usr/bin/obmenu-generator I realized the code was attempting to call a file path that didn't exist. In line 51, obmenu-generator defines the config directory as

Code: Select all

my $xdg_config_home = "$home_dir/.config/obmenu-generator";
During installation a file titled obmenu-generator is created and placed in ~/.config/obmenu-generator . Line 51 is looking for a directory. I didn't realize this is what the call needed.

The fix was multi-part.

-I deleted the file in ~/.config with

Code: Select all

 rm ~/.config/obmenu-generator
-I moved the folder created during the git pull, located at ~/obmenu-generator and issued

Code: Select all

 mv obmenu-generator/ ~/.config/obmenu-generator
and changed permissions with

Code: Select all

 cd .config/
 sudo chmod -R u=rwx obmenu-generator
-When I performed the git pull in step 1.) at the top of the page I did not receive a config.pl file. I found one here. A few lines in this file must be edited to work with your system, specifically: the editor definition, desktop_files_paths, gtk_rc_filename, terminal, VERSION. Paths will need the correct user name because the one from the link above is "edps", and for me the VERSION I changed to the version listed in the file obmenu-generator line 38 (for me this was 0.84).

-Run

Code: Select all

 openbox --reconfigure && openbox --restart
 obmenu-generator -p
This was enough to solve my problem, the main issues being the lack of obmenu-generator folder in .config and the missing config.pl file.

Post Reply

Return to “Xfce”