Release Switch GUI: Openbox

Discussion in 'Software Releases' started by freamon, Nov 10, 2012.

  1. freamon

    freamon Active Member

    Joined:
    Apr 13, 2011
    Messages:
    562
    New start post for updated version: http://boards.openpa..._20#entry200090


    Original post:

    As discussed extensively on these forums and elsewhere, there are two main problems with the Pandora:


    1) MiniMenu offers you the option of switching to another GUI - "XFCE, etc", it says, but there is no 'etc'.


    2) After first boot, its says you've opened Pandora's box, but then it never gives you the option to use a GUI that sounds a bit like that.


    Here's the long-awaited solution: http://repo.openpand...witchguiopenbox


    This PND lets you install OpenBox Window Manager to your OS (it's less than a meg in size, so NAND space isn't an issue). Afterwards, you'll be able to choose it as a GUI to switch to, or as your default one to boot to.


    Features

    • Low Resource Usage (a few more MBs of ram than MiniMenu, but about 20 MB less than XFCE)
    • Speedy execution
    • Multi-tasking
    • Desktop-Switching
    • Maximum screen real-estate (no icons, system tray or panels taking up room)
    • Easy to get online
    • All your PNDs magically appear in the menu
    • Pandora-friendly keybindings


    Default Keybindings

    • Root Menu: "Pandora Key" or "Ctrl-M" "Right-Nub-Right-Click"
    • Go To Desktop 1: Alt DPAD-left
    • Go To Desktop 2: Alt DPAD-right
    • Send To Desktop 1: Ctrl DPAD-left
    • Send To Desktop 2: Ctrol DPAD-right
    • Client Menu: Alt DPAD-up
    • Switch Applications: Alt DPAD-down
    • Toggle Maximize: Ctrl DPAD-up
    • Toggle Shade: Ctrl DPAD-down
    • Quit Application: Ctrl-q


    Config Files

    • start-up file: /usr/bin/openbox-session
    • root menu: /etc/xdg/openbox/menu.xml
    • pnd menu: /etc/xdg/menus/openbox-pnd.menu
    • openbox settings: /etc/xdg/openbox/rc.xml
    • execute before openbox starts: /home/<yourname>/Applications/Settings/openbox/environment
    • execute after openbox starts: /home/<yourname>/Applications/Settings/openbox/autostart


    Issues


    After it's started, you might be thinking, "well, that's a nice wallpaper, but when's the rest of it going to appear ...", but that's it: everything is accessed by bringing up the root menu (Pandora Key).


    The Pandora Key brings up the root menu, but it's also the "Nuke PND" button, so you can't use it for task-switching between PNDs (you'll have to use Ctrl-M instead). Better fix here: #7


    It uses XFCE's terminal, the default font of which (monospace, size 12) forces the window to be bigger than the screen. To solve this, 'terminal' launched from the menu is actually 'terminal --geometry 70x22', whilst terminals launched by PNDs etc get auto-maximized. This makes them fit the screen, but it's an imperfect solution.


    Pressing the Pandora Key brings up the root menu where ever your cursor happens to be at the time. If the cursor is at the right side of the screen, then sub-menus appear to the left of their parent menus, but are accessed with the 'DPAD-right' key, which is a bit counter-intuitive.


    Networking uses NetworkManager (since it's already running, and you should only have to enter your connection details once), but accessing that (via nm-applet) brings a bunch of other daemons from XFCE in, so it's less efficient online, than offline (still better than XFCE itself though).


    The battery status display requires kernel 3.2.


    Personal Observations


    I like how Ctrl-q is a universal close app option (like Alt-F4 on desktops) and how Alt-DPAD-down switches apps (like Alt-Tab on desktops). Although I realise I could have just set XFCE up to do that.


    My internal wi-fi seems better? It might have been a one-off, but on XFCE I'm used to my connection starting at 70 KB/s, and dropping to 40 KB/s (or dying altogether), but with downloading a file via gPodder on OpenBox I started at 250 KB/s, dropped to 150, but then started climbing again.
     
    Last edited by a moderator: Feb 6, 2016
    Tags:
  2. wieurhel

    wieurhel Still Fresh

    Joined:
    Jul 3, 2012
    Messages:
    10
    Location:
    Sweden
    erm...installation password?
     
  3. mono

    mono Member

    Joined:
    Mar 14, 2012
    Messages:
    83
    nice...


    the PND-list seems a bit crowded. are the system PNDs shown at the PND root-menue?


    ah and just in case, is there also an uninstaller?


    @ wieurhel: try your password you normaly use for log-in and stuff like that
     
    Last edited by a moderator: Nov 10, 2012
  4. freamon

    freamon Active Member

    Joined:
    Apr 13, 2011
    Messages:
    562
    It's your password (the one you set up on first boot; what you'd normally use for 'sudo')

    You can un-install it by starting the pnd again, typing 'sudo opkg remove openbox' and then 'sudo cp backup/gui.conf /etc/pandora/conf/'


    System PNDs are in PNDS->System (the PNDs menu looks at *.desktop files so it's automatically populated, but the root menu has to have entries added manually).
     
  5. skeezix

    skeezix Internal Development

    Joined:
    Mar 11, 2003
    Messages:
    8,058
    Mmenu and xfce switch desktop option brings up the list from config file.. If you just add start/stop scripts to the conf it'll slide right into the 'standard' options (ie: option in mme u and xfce and openbox)


    You can update behavior of pandora button to not be nuke, as in xfce.. Extend pnd-menu.sh


    Jeffphone
     
  6. freamon

    freamon Active Member

    Joined:
    Apr 13, 2011
    Messages:
    562
    Yeah I found that file (gui.conf) - it's a nice way to implement it. The ipk that the pnd contains includes an updated version of that file (although thinking about it, I should have updated it via a postinstall script).


    (The first 4 lines of the top post were all meant to be jokes, btw. I realise it would help if they were funny. )

    Cool - will look into. I've already had to change from Ctrl-m as jumanji uses it too.
     
    Last edited by a moderator: Nov 11, 2012
  7. freamon

    freamon Active Member

    Joined:
    Apr 13, 2011
    Messages:
    562
    Fix for Pandora key nuking PND apps


    Backup /usr/pandora/scripts/op_menu.sh somewhere, and replace contents with



    Code:
    
    
    #!/bin/bash
    
    #actions done when the menu button is pressed
    
    #only argument is the time the button was pressed in seconds
    
    
    user=$(cat /tmp/currentuser)
    
    
    show_killist ()
    
    {
    
    pidlist=$(pstree -lpA | grep pnd_run.sh | sed -ne 's/.*-\(.*\)(\([0-9]\+\))/\2\n \1/p' | su -c 'DISPLAY=:0.0 zenity --list --multiple --column "pid" --column "name" --title "kill" --text "which apps should be killed"' - $user)
    
    for PID in $pidlist
    
    do
    
    kill -9 $PID
    
    done
    
    }
    
    
    if [ "$1" -ge "2" ]; then #button was pressed 3 sec or longer, show list of apps to kill instead of launcher
    
    killist=y
    
    fi
    
    
    xpid=$(pidof xfce4-session)
    
    obpid=$(pidof openbox)
    
    if [ $xpid ]; then
    
    echo "xfce4 is running"
    
    if [ $killist ]; then
    
    echo "displaying kill list"
    
    show_killist
    
    else
    
    # invoke the bottom-left popup menu, for launching new apps, instead.
    
    su -c 'DISPLAY=:0.0 /usr/pandora/scripts/op_xfcemenu.sh' - $user
    
    fi
    
    elif [ $obpid ]; then
    
    echo "openbox is running"
    
    if [ $killist ]; then
    
    echo "displaying kill list"
    
    show_killist
    
    else
    
    # quit and let openbox display the menu
    
    exit
    
    fi
    
    else
    
    echo "no x, killing all pnd aps so x or DE gets restarted"
    
    pidlist=$(pstree -lpA | grep pnd_run.sh | sed -ne 's/.*(\([0-9]\+\))/\1/p')
    
    for PID in $pidlist
    
    do
    
    kill -9 $PID
    
    done
    
    fi
    
    
     
    Last edited by a moderator: Nov 11, 2012
  8. mono

    mono Member

    Joined:
    Mar 14, 2012
    Messages:
    83
    strange, just the first 5 system-PNDs are in System-context menu, the rest (around 40) rests at PND-root menu. can you point me to this .desktop file, sorry for this dumb question.
     
    Last edited by a moderator: Nov 11, 2012
  9. Askarus

    Askarus Hardcore Member

    Joined:
    Sep 28, 2011
    Messages:
    4,192
    Location:
    Germany
    Nice.


    I'll try and report my impressions.


    Where's my panel and my desktop icons.


    That was my first impression.


    When I need some more RAM I'll use this one.
     
    Last edited by a moderator: Nov 11, 2012
  10. BAFelton

    BAFelton Well-Known Member

    Joined:
    Jun 23, 2010
    Messages:
    1,257
    Thanks !


    Two questions for me :


    - how do you make it boot automatically ? cause when I shutdown, XFCE comes back


    - how do you change the wallpaper ?
     
  11. EvilDragon

    EvilDragon Administrator Staff Member

    Joined:
    Mar 4, 2003
    Messages:
    19,423
    Location:
    Ingolstadt
    As it's included in the Switch GUI config, you should be able to go to settings/Startup and set it as default GUI.
     
  12. freamon

    freamon Active Member

    Joined:
    Apr 13, 2011
    Messages:
    562
    - EvilDragon is correct. In OpenBox, go to PNDS - > Settings -> Startup -> [enter your password] -> Change Default GUI for current user


    - To automatically change the wallpaper, you can either edit /usr/bin/openbox-session (where is uses hsetroot), or - preferably - make a 'openbox' directory in /home/<yourname>/Applications/Settings/ and create a file called 'environment'. In this file type:



    Code:
    
    hsetroot -center /usr/share/xfce4/backdrops/op-drops.png
    
    
    (this changes it back to the default - obviously you change what image it chooses)

    .destop files are all in /usr/share/applications - this is where the PNDs menu automatically gets them from. This is what my System menu looks like:


    [​IMG]


    Is your different? Is there a particular file you're looking for?


    We should probably clarify terminologies.


    Root-Menu: The one that first comes up when you press the pandora button. Stuff like File Manager / Terminal / Toggle Wifi have been added manually to it by me, editing /etc/xdg/openbox/menu.xml


    PNDs-Menu: The one that comes up after clicking 'PNDs', on the root menu. These directories are defined in /etc/xdg/menus/openbox-pnd.menu.


    System-Menu: The one that comes up after clicking Root-Menu -> PNDs -> System. This should automatically show every application whose .deskop file defines it as being in the 'system' category.
     
    Last edited by a moderator: Nov 11, 2012
  13. Binky

    Binky Death's Steed Staff Member

    Joined:
    May 28, 2003
    Messages:
    6,808
    Location:
    16A (TO)
    When I installed this, the lxde option disappeared from 'switch gui' - anyone else noticed this - do the different versions of openbox conflict or suchlike?


    Its nice to see one of my wallpapers being used by default :)
     
  14. EvilDragon

    EvilDragon Administrator Staff Member

    Joined:
    Mar 4, 2003
    Messages:
    19,423
    Location:
    Ingolstadt
    It doesn't conflict - it just overwrites gui.conf which has all GUI entrances in there.


    It should just add / remove it's config without touching the rest.


    Thinking about it, it would've been a better idea to make a gui.conf.d directory where each GUI puts its config file and removes it instead of one config file... maybe that's a good idea for .next.
     
  15. _wb_

    _wb_ Microbe Staff Member

    Joined:
    Apr 5, 2012
    Messages:
    5,387
    Location:
    Brussels, Belgium
    Cool! Always nice to have more choice, and I like lightweight stuff, both in terms of resource consumption as screen real estate. Keep up the good work!
     
  16. freamon

    freamon Active Member

    Joined:
    Apr 13, 2011
    Messages:
    562
    Yeah, sorry. I just over-wrote gui.conf, when I should have just updated it in a post-install script. Your original gui.conf will be available in pandora/appdata/switchguiopenbox/backup - so you'll need to merge that one with the one in /etc/pandora/conf/ to get a dialog that lets you switch between xfce, lxde, minimenu and openbox.


    Does lxde run on top of xfwm4? I've only just seen that lxde is available from the repo. If it comes with it's own version of openbox, I may have more work to do ...


    Oh, and thanks for the wallpaper - I came across it on these forums, and thought: perfect!
     
  17. _wb_

    _wb_ Microbe Staff Member

    Joined:
    Apr 5, 2012
    Messages:
    5,387
    Location:
    Brussels, Belgium
    Remarks/suggestions:


    The Pandora button fix should be default.


    Also some way to move oversized windows around (shift-drag in xfce) would be useful.


    An easier way to change the background image would be nice.


    I also get the bug that shows most of the system submenu in the pnd root menu.


    Perhaps the PNDs in pandora/desktop and pandora/apps should show up in the main menu instead of somewhere deep in the submenus.


    PND Store is not needed in the main menu - remove it or replace with PND Manager if found.


    I think you should swap the roles of ALT and CTRL in the default shortcuts: it's much easier to do CTRL-dpad (with right shoulder button) than ALT-dpad.
     
  18. freamon

    freamon Active Member

    Joined:
    Apr 13, 2011
    Messages:
    562
    Firstly, thank you for your feedback. I'll fix the Pandora button problem by default in the next update, after a few more problems have been discovered.

    In XFCE, I move oversized windows by pressing Alt-Space and choosing 'move'. You can do the same in OpenBox (although you can also press Alt-Up to get the same thing)

    There's some nice apps to do that ('feh' and 'nitrogen' get mentioned a lot). I didn't want to pack too much stuff into this as it installs to NAND and it's just the first release, so they're not included. I'll see if one of them can be pnd'd up.

    Bummer. Can you post a screenshot? I'm having difficulty understanding what people mean with this.

    Do people have apps on their desktop? How retro :p I see that the location is recorded in X-Pandora-Object-Path, but I think the menu can only look at freedestkop-standard stuff, so I don't know yet if I can handle desktop apps differently.

    Meh, I don't mind PNDstore. PNDManager is awesome, admittedly, but I can't get it to login to the repo, or actually download stuff (I don't think it likes ext2).


    If you look at /etc/xdg/openbox/menu.xml, you'll see it's fairly straightforward to swap out.

    My right-shoulder-button is broke, so I never think about it to be honest.


    Keybindings are in /etc/xdg/openbox/rc.xml (look for "Pandora keybinding start" at line 193). It should just be a matter of swapping the 'A' for a 'C'.


    ------------------------


    I think with a 'Highly Configurable Window Manager' there's obviously no default setup that will suit everybody. That's not to say: don't provide feedback, because feedback is awesome. I just mean, there some things I can do with the whole package to fix my mistakes and oversights, but there'll always be plently of tweaks that'll you need to do to your own copy.
     
  19. frefol

    frefol Member

    Joined:
    Apr 20, 2006
    Messages:
    185
    It seems that Openbox is setup to move the windows with Alt+drag instead. I found in /etc/xdg/openbox/rc.xml on line #345 it has


    <mousebind button="A-Left" action="Drag">


    I changed it to say "S-Left" and restarted Openbox. It changes it to be Shift + Drag like in XFCE. I don't think it messes with anything else.
     
  20. Binky

    Binky Death's Steed Staff Member

    Joined:
    May 28, 2003
    Messages:
    6,808
    Location:
    16A (TO)
    It seems happy with my ext3 partition, if that's any help...


    Off-topic, but does anyone know if warlock bar can be made to display the contents of ~/.desktop?


    that, combined with a (slightly more polished) openbox install would be pure brilliant B)
     

Share This Page

Loading...