Release Switch GUI: Openbox


Strange, if I do that exactly like you say (with the "&" to put it in the background), it just seemingly does not do anything (I still have the old menu in /tmp/obcache). If I omit the ampersand however (or type "fg" after starting it with the ampersand), it works perfectly: /tmp/obcache/progmenu is now only 2224 bytes and it created 24 submenu files named 1 to 24.
That is very weird. I can't think why that would happen. If you replace /usr/bin/openbox-menu with this new version, and then restart Openbox, does that work? Because that's the main thing (you may want to back up the original /usr/bin/openbox-menu, though).

Question: how does the menu get updated when new PNDs are detected? I'm assuming that you somehow send a signal to make the openbox-menu daemon re-create the menus? In that case, is it really necessary to use a daemon - can't you just call openbox-menu to create the menu once and then quit? (this would save a tiny bit of memory, probably not worth it but still)
Updates are noticed by menu-cache (/usr/libexec/menu-cached), which caches the results of parsing through /usr/share/applications/ into a file at /tmp/obcache/menus/[biglongfilename].

openbox-menu is a front-end to menu-cache - it starts it up, and gives it a callback function to call when changes happen. Since its openbox-menu that drives menu-cache, rather than the other way around, there needs to be a way for openbox-menu to start up. At the minute, it's started up once, and continues running as a daemon. Previously, it was started at login, and then quit, then started every time the "Programs" menu was selected (the menu displayed was openbox-menu's STDOUT). I had thought that this was the reason for the menu lag. Even though this assumption wasn't entirely correct, I think piping the result of "cat /tmp/obcache/progmenu" is always going to be quicker than piping the result of "openbox-menu /etc/xdg/menus/op-pnd.menu".

So, currently, there's 3 daemons running: pndnotifyd monitors for new PNDs and creates entries in /usr/share/applications/, menu-cache monitors /usr/share/applications/ and caches the result, and openbox-menu transforms that result into a menu. I'll look into the possibility of changing pndnotify or menu-cache to see if they can start openbox-menu when required (3 daemons seems a bit much, but there may not be enough benefit from changing it).

Also, do you really need pipe menus? The content is mostly static, so can't you use regular file menus and signal openbox to reconfigure whenever it happens to change?
It's mostly static, yes. On my machine, it's totally static (sometimes I even kill pndnotifyd). But I'm trying to cater for everyone, and I assume there's people who yank SD cards in an out, and need very dynamic menu content.
The alternative to pipe-menus would be to put everything into $HOME/Applications/Settings/openbox/menu.xml. One side-effect of this, is that it would make it less readable, and so make it harder for people who want to edit the file to rearrange the root menu. Also, I'd have to parse that file, amend the contents, and output the result again, which could be an error-prone process, especially with me doing the programming. Additionally, I'm not sure how safe calling openbox --reconfigure is: I don't know how it affects running applications, and I don't think it's the standard / recommended way to deal with dynamic content.
 
Last edited by a moderator:
Nice update freamon,

The new Menu is clear, I like it.

I hope you'll find a way to correct this lag thing, it's already almost perfect the way it is.

Thanks again for this :D
 
I tried BLuetooth ( I`m not sure why ) but couldn`t get it working ... switched back to XFCE and it worked fine...

Anyone else try BT on Openbox?
 
Freamon,

about the Menu lag, the patch works great,

No more lag :-D, you can update the PND !

But no, sorry, wait there's the BT problem, I can't test I have no BT devices.
 
Freamon,

about the Menu lag, the patch works great,

No more lag :-D, you can update the PND !
Yay. Thanks for testing.

I tried BLuetooth ( I`m not sure why ) but couldn`t get it working ... switched back to XFCE and it worked fine...

Anyone else try BT on Openbox?
 
Same error here. There's any log we can look to find what's happening?
Hi. At what point is it failing? Turning on the hardware? Starting the applet? Or actually trying to connect to a device?

If it's the hardware, you can see what's going on by starting a terminal and typing "sudo openbox-functions bluetooth_ON".

If it's the applet, you can see what's going on by starting a terminal and typing "openbox-functions bluetoothapp_ON".

If it's when connecting to something, then I'll try and find the bluetooth adapter I had for my PC, and try and figure out what's going wrong.

Thanks.
 
Hardware and applet seem to go ok.. Just can't connect to anything and three devices couldn't see my Pandora.
Until I switched to XFCE .. That worked as advertised :)
 
Ah okay,thanks. If you right-click the icon, and choose preferences, make computer discoverable, does that make a difference?
 
The new openbox-menu seems to work more or less, but it's still somewhat buggy. E.g. I just installed some new PNDs, and it crashed after writing a few submenus; I got "*** glibc detected *** openbox-menu: double free or corruption (out): 0x00087740 ***"

So you may want to check your modifications and maybe run it in valgrind or so.
 
This is what happens with those commands:

canseco-openpandora:~$ sudo openbox-functions bluetooth_ON
Texas module LMP version : 0x03
Texas module LMP sub-version : 0x1126
    internal version freeze: 38
    software version: 2
    chip: brf6300 (4)
Opening firmware file: /lib/firmware/brf6300.bin
Uploading firmware...
Firmware upload successful.
Sending speed change command..
Device setup complete
2458
canseco-openpandora:~$ openbox-functions bluetoothapp_ON
canseco-openpandora:~$

The problem comes when i try to discover new devices, it doesn't found anything, other devices can't see Pandora, but if i switch to XFCE it works fine.
 
Last edited by a moderator:
Thank you. I found my bluetooth adapter for my PC, and I'm observing the same behaviour. XFCE is doing something ... magic. I'll try and figure it out.

The new openbox-menu seems to work more or less, but it's still somewhat buggy. E.g. I just installed some new PNDs, and it crashed after writing a few submenus; I got "*** glibc detected *** openbox-menu: double free or corruption (out): 0x00087740 ***"

So you may want to check your modifications and maybe run it in valgrind or so.
Hmmmm. My code was a bit rough - more of a proof of concept thing, I suppose. I'll improve it for when I update the PND, and I'll also upload the code to github or somewhere, so wiser heads can scrutinize it.
 
I've  got a problem whith the new openbox-menu, after a reboot It failed to load menu entries like program->accessories or program->games etc... I have to restart openbox via open box config->restart to make it works.
 
OK. It's not very stable, as _wb_ noticed. I'll fix it today.

(in other news, bluetooth seems to working properly now).
 
Updated version uploaded today. Changes include:

No delay when opening the menu (and the program that runs that is now more stable. EDIT: the source for it is here)

Bluetooth now works

Closing the lid will suspend the pandora if that's what you've set it up to do.

The 'Other' category is now in Games.

----

Thank you to the people who've rated this. Seeing it in the repo's Top Rated section was a very pleasant surprise!
 
Last edited by a moderator:
Ok, some problems:

1: Background is still not displayed correctly

(I use zoomed fill)

2: Menu > Programs > System

I get: Invalid output from pipe-menu "cat /var/volatile/tmp/obcache/25"

Menu is fast now.
 
Last edited by a moderator:
Hey, great work so far, just a question - is there a way to get the pandora options system tray applet thing in the tint2 panel system tray so I can set the CPU speed? cheers
 
Menu is fast now :)  but it still doesn`t seem to go into low power mode... 

I thought that I needed to select it again in openbox, did that, still nothing ( light doesn`t dim ) 

any ideas?#

2: Menu > Programs > System

I get: Invalid output from pipe-menu "cat /var/volatile/tmp/obcache/25"

I`m not getting this though...
 
1: Background is still not displayed correctly

(I use zoomed fill)

2: Menu > Programs > System

I get: Invalid output from pipe-menu "cat /var/volatile/tmp/obcache/25"
Sorry - I haven't got a map for Zoomed Fill. It uses hsetroot at start up, and that's only got 'centre', 'tile', 'full' (the equivalent of 'Zoomed'), and 'fill' (the equivalent of 'Scaled').

Please could you post the /var/volatile/tmp/obcache/25 file somewhere - I don't think attachments are working, so it'd have to be a file host. It's probably an particular PND that's breaking it (the fact that it goes up to 25 suggests you've got a lot of them!).

EDIT: do you have the Community Codec PND? I remember you saying that it didn't break the menu for you before, so you might still have it. I just tried it, and it broke the System menu for me too. If so, deleting it should solve the problem.

---

Hey, great work so far, just a question - is there a way to get the pandora options system tray applet thing in the tint2 panel system tray so I can set the CPU speed? cheers
Open a terminal and type:

configbutton &
exit
If you always want it, add 'configbutton &' to autostart (Root Menu -> Openbox Config -> edit autostart). If you use it for enabling wifi / bluetooth / usb though, the 'Connectivity' menu won't always show the right thing (it will if you use either the Connectivity menu, or the configbutton, but not if you use both).

---

Menu is fast now :) but it still doesn`t seem to go into low power mode...

I thought that I needed to select it again in openbox, did that, still nothing ( light doesn`t dim )

any ideas?
What's the contents of $HOME/.lidconfig? It should say "lowpower". If not, you should be able to change it via Root Menu -> Pandora Settings -> Lid Close Settings. Please let me know changing the Settings doesn't change $HOME/.lidconfig.
 
Last edited by a moderator:
Back
Top