You are not logged in.
I use Openbox and want to change my default terminal emulator. My menu at ~/.config/openbox/menu.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="Openbox 3">
<menu id="applications" label="Applications" execute="xdg_menu --format openbox3-pipe --root-menu /etc/xdg/menus/arch-applications.menu" />
<separator />
<item label="Exit Openbox">
<action name="Exit">
<prompt>yes</prompt>
</action>
</item>
</menu>
I'm using xdg_menu to automatically generate a menu for my installed applications. This used to be recommended on the "Openbox" Arch Wiki page. Below is an excerpt of the generated xml:
<item label="Htop" icon="/usr/share/pixmaps/htop.png">
<action name="Execute"><execute>xterm -e htop</execute></action>
</item>
<item label="Konsole">
<action name="Execute"><execute>konsole</execute></action>
</item>
As you can see it is hardcoding xterm to execute applications that use a terminal emulator. I was wondering if this can be changed. I know there are alternative menu generator like "obmenu-generator" but I haven't ever used them.
Last edited by pikachu64 (2019-04-18 12:15:31)
Offline
As you can see it is hardcoding xterm to execute applications that use a terminal emulator. I was wondering if this can be changed.
Yes, with a text editor.
Moving to NC...
Offline
As you can see it is hardcoding xterm to execute applications that use a terminal emulator. I was wondering if this can be changed
Yes: use the XDGMENUMAKERTERM environment variable.
For example, to use konsole instead of xterm run
XDGMENUMAKERTERM=konsole xdg_menu --format openbox3 --root-menu /etc/xdg/menus/arch-applications.menu > xdg-menu.xml
Offline
I have "community/archlinux-xdg-menu" installed instead of the AUR "xdgmenumaker". I would like to use the AUR script because I think Python is cleaner than Perl but it doesn't support Openbox.
USAGE: xdgmenumaker [OPTIONS]
OPTIONS:
-f, --format the output format to use.
Valid options are blackbox, compizboxmenu, fluxbox,
fvwm, twm, icewm, jwm, windowmaker and pekwm
Also there is a build problem with xdgmenumaker currently - it requires the whirlpoolsum binary and you have to manually install "rhash" and create a symbolic link from whirlpool-hash to whirlpoolsum. Thanks for pointing me in the right direction though, I tend to see programs as black boxes until I have the itch to do some research. I copied /usr/bin/xdg_menu and replaced "xterm" with "konsole" on line 1347.
$exec = "konsole -e $exec" if $desktop->{Terminal} eq '1' || $desktop->{Terminal} eq 'true';
Last edited by pikachu64 (2019-04-17 17:44:01)
Offline