HOWTO: Openbox Menu Icon in PyPanel

Using Openbox and PyPanel (or similar) and are tired of either having to minimize windows or adjust maximum window size to leave space for right-clicking on the desktop?  Do you have a keyboard shortcut set up to open the menu, but also want to be able to use the mouse to open the menu easier?  I have a solution!
Create an icon to launch the Openbox application menu on PyPanel.
This will allow you to click on an icon on PyPanel which opens the OpenBox menu, similar to Gnome's application menu.
Example:
Requirements:
Openbox Window Manager
PyPanel (dock/panel application)
xdotool
obkey - to edit key shortcuts to OpenBox's rc.xml (not required, but used in this howto)
Recommendations:
archlinux-artwork
Procedure:
1) If you don't already have PyPanel installed, install it now (as root).
pacman -S pypanel
2) Launch pypanel in an application launcher, or the terminal (as normal user):
pypanel &&
3) Install xdotool (allows for launching keyboard shortcuts via command line) (as root)
pacman -S xdotool
4) If you do not have obkey installed, install it with yaourt (recommended) or download the tar.gz and run the python script:
yaourt -S obkey-git
OR
Go to the obkey site or download the .tar.gz by clicking here
Extract the .tar.gz:
tar -xvf ./obkey-dev-abf0bb12.tar.gz
Enter the obkey-dev directory:
cd ./obkey-dev
Run obkey and point it to the openbox rc.xml (as normal user!):
./obkey ~/.config/openbox/rc.xml
5) In obkey, find an existing key or create a new key binding by clicking "Insert sibling key" at the top. Note: Ctrl+alt combinations did not seem to work for me to create this menu launcher.
- If it's an existing key, select it, then click on the action in the bottom right-hand pane.  A window should pop up.  Find and select "ShowMenu"
- If it's a new key, select it, enter in the key combination you want to use in the key (text) box (for example, C-M for Ctrl+M), then click the green "Insert Action" button at the bottom.  Click on the new "Focus" action.  A window should pop up.  Find and select "ShowMenu"
In the ShowMenu action, at the top there should be a box for "menu:"  Enter in "root-menu" in this box.
Now save by clicking the green arrow + hard drive in the top left corner of obkey.  Now you should be able to use that key combination to open the root-menu. If not, try restarting the X Server.
Example:
6) This is optional, but if you want a nice Arch icon for your new menu launcher, you can grab mine.  If you want to use your own image, it cannot be .svg, so I converted a .svg icon to .png from the the official Arch Artwork package (archlinux-artwork in the repos).  If you want to just use mine:
Enter the following commands to get the image and set it up for the next step:
mkdir ~/.icons/archlinux/icons/
wget -P ~/.icons/archlinux/icons/ http://img297.imageshack.us/img297/1378/archlinuxiconcrystal128.png
7) Open up your ~/.pypanelrc with your favorite text editor (e.g. nano or gedit). 
Scroll down to a line starting with "LAUNCH_LIST"  Most likely it will have a line like this by default:
("gimp-2.2", "/usr/share/imlib2/data/images/paper.png")
Change the line to the following to use xdotool and the key you assigned in step 5, as well as the icon image we just downloaded (Note: make sure to change /home/user to your specific home directory!):
("xdotool key ctrl+m", "/home/user/.icons/archlinux/icons/archlinuxiconcrystal128.png")
Next, locate a line about 15 more down starting with "APPICONS."  Change this value from 0 to 1.
APPICONS = 1 # Show application icons
Finally, about 20 lines down, you will see a section for Panel Layout.
There are 5 sections for the panel:  Desktop, Tasks, Tray, Clock, and Launcher.  They can be assigned, in order of left to right on the panel, with numbers 1-5 and 0 for disabled.  Choose a location you want your Launcher to be and set the value from 1-5.  You can play around with this by setting the values, then restarting pypanel.
Here is how I have set mine (I disabled Desktop since I only use one desktop/workspace and do not need it to say which one I am on):
DESKTOP = 0 # Desktop name section
TASKS = 2 # Task names section
TRAY = 3 # System tray section
CLOCK = 4 # Clock section
LAUNCHER = 1 # Application launcher section
8) Finally, kill and restart PyPanel and enjoy!
killall pypanel && pypanel
9) Tell me how it went, what you think, what I could improve on, etc!
Last edited by CheesyBeef (2009-03-24 22:22:39)

Vighi wrote:
Very nice guide got it working almost straight away :-)
Had to restart X in order to get key-binding to work though. And I put /home/username/.icons/archlinux/icons/archlinuxiconcrystal128.png instead of ~/ because somehow I got couldn't find logo error when pypanel started.
BTW sexy pypanel look you have. All the info in your .dotfiles link? will get to it tomorrow I guess. Thanks!
Thanks very much for using my guide and responding!
I will fix that ~/ directory problem and say to use the home directory. 
And yes, that configuration is in my .dotfiles at the moment   You can follow that link or just grab it here: http://dotfiles.org/~CheesyBeef/.pypanelrc
Thanks again!

Similar Messages

  • [solved] Problem adding menu icon to pypanel

    Hello, I'm moving into a new place and I'm putting my desktop in the living room as a community media center since neither me or my roommates own a TV, and I'm the only one with a working desktop. They're used to Windows and a start menu. I'm running Openbox + pypanel and thought I'd make their transition a little easier by adding a start menu icon to pypanel. I followed the instructions here: https://bbs.archlinux.org/viewtopic.php?id=68177 but it isn't working. Everytime I click on the arch icon I just get this in my terminal:
    Error: Invalid key sequence 'C-m'
    Failure converting key sequence 'C-m' to keycodes
    Error: Invalid key sequence 'C-m'
    Failure converting key sequence 'C-m' to keycodes
    xdo_keysequence reported an error for string 'C-m'
    here is the important part of my pypanelrc config:
    ("xdotool key C-m", "/home/neruson/.icons/archlinux/icons/archllinuxiconcrystal128.png"),
    In obkey my key is Ctrl+M and the key text is C-m, anyone know what I'm doing wrong?
    EDIT:
    I should also add I've tried this with the key as SUPER+Space too with the same error.
    EDIT 2:
    Nevermind, solved. I'm just stupid and can't follow directions well... ctrl+m instead of C-m... duh
    Last edited by Mr_ED-horsey (2011-07-15 22:16:47)

    Thanks for the heads up on the scripts.
    ~/.bash_profile has me annoyed though. It's as if it is not being executed. Will have to try adding something with a visible effect to confirm.
    My ~/.bash_profile is owned by me and is executable but it simply will not add the path to the variable.
    Could it be something to do with the way my session is handled?
    I am currently launching my session through GDM via inittab. I know when a session is launched this way, for example, ~/.xinitrc is ignored. Perhaps this is the same for ~/.bash_profile?
    Regarding ~/.bashrc, it does work this way, but it only adds the path when a terminal is launched. I need the path added regardless of a terminal being opened or not.
    Cheers.

  • [SOLVED] Openbox 3.5 don't show menu icons

    Hi all,
    i don't speak english very well
    i try to add icons on my Openbox menu
    i added this string <showIcons>yes</showIcons> in the <menu> section of rc.xml file
    after i went to edit menu.xml
    i tried:
    <menu id="apps-accessori-menu" label="Accessori" icon="/home/user/.icons/Faenza/apps/24/accessories-calculator">
    <menu id="apps-accessori-menu" icon="/home/user/.icons/Faenza/apps/24/accessories-calculator" label="Accessori">
    <menu id="apps-accessori-menu" icon="/home/user/.icons/Faenza/apps/24/accessories-calculator.png" label="Accessori">
    <item icon="/usr/share/icons/Tango/24x24/apps/accessories-calculator.png" label="Calcolatrice">
    <item label="File-Roller" icon="network">
    <item icon="/home/user/.icons/Tango-Sand/48x48/apps/broswer" label="Networkmanager">
    i tried to add icon on menu and item, before and after label, with extension (.png) and without, from my local directory and from /use/shre/icons...
    but i don't see icon!
    what i wrong? what i need? i read i must compile Openbox with imlib2 support, how to?
    thank you

    Gusar wrote:
    Archer73 wrote:i tried to recompile but don't work
    That's not very helpful. You need to learn how to use abs. Then use it to compile your own version of openbox with icons support. If you have problems, post specifically what you've tried and what the error messages were.
    Though what puzzles me is why isn't the Arch package compiled with icons support in the first place?
    let me understand
    if i install openbox from shell
    pacman -S openbox
    i can't use icons?
    my openbox versione is:
    Openbox 3.5.0
    Copyright (c) 2008        Mikael Magnusson
    Copyright (c) 2003-2006   Dana Jansens
    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it
    under certain conditions. See the file COPYING for details.
    are you sure i must to compile openbox with icons support?

  • "Running" openbox menu?[SOLVED]

    Is it possible to issue a command to open the root openbox menu(then menu that pops open on desktop right click)?  I want to use that as a button in pypanel...  Thanks for your time in advance.
    Last edited by isolier (2009-01-24 17:56:45)

    I asked myself the same question and found a great application called xdotool. I added it on AUR. One of its usage is to simulate a keypress. Simply add this code somewhere in the <keyboard> section of your rc.xml:
    <keybind key="A-C-q">
    <action name="ShowMenu">
    <menu>root-menu</menu>
    </action>
    </keybind>
    Then, just lauch your menu with:
    # xdotool key ctrl+alt+q
    A launcher in pypanel would look something like this:
    LAUNCH_LIST = [
    ("xdotool key ctrl+alt+q", "/usr/share/pixmaps/openbox.png"),
    Of course, you can change the keyboard shortcut, etc...
    Hope this helps.
    -T
    Last edited by rttommy (2008-01-30 00:23:26)

  • Lost Openbox Menu to LXDE install

    I would like to know how to restore my openbox menu, or atleast edit the one LXDE uses. I installed LXDE in hopes to have a better linux experience. After all sitting there with just Openbox, Nitrogen, tint2, and Conky was all well and good but I like having a desktop with icons.
    My problem though without all the fluf is that my openbox menu became LXDE with only a few menus, which is far from my long list with just Openbox. Is there a way to restore it, or import everything over. (Like the menu.xml and the rc.xml) I know it exists since the obmenu command shows my old menu, though I can't get it to show up.

    Did you manually configure your old menu via ~/.config/openbox/menu.xml or did you use the default?
    If you configured it and now you have something different, then I'm guessing it was overwritten, in which case it would be interesting to know if that happens automatically or not when installing/running Lxde.
    If you were using the default, try renaming ~/.config/openbox/menu.xml to ~/.config/openbox/menu.xml.bak then reconfigure openbox and check if it reset your menu.

  • Obm-xdg won't show anything in the Openbox menu [SOLVED]

    I put the code:
    <menu execute="obm-xdg" id="obm-xdg" label="xdg"/>
    in ~/.config/openbox/menu.xml just like it says to do universally. It does not show any menu. Every other menu item in the file works. I can edit them and they change. obmenu can see the entry. gnome-menus is installed. obm-xdg works from the command line. Why does this not show anything in the menu?
    Last edited by skottish (2008-11-06 05:27:03)

    Make sure you add the menu id to the root-menu list at the bottom of menu.xml:
    <menu id="root-menu" label="Openbox 3">
    <separator label="Applications" />
    <menu id="obm-xdg" />
    <menu id="apps-accessories-menu"/>
    <menu id="apps-editors-menu"/>
    Last edited by thayer (2008-11-06 05:11:29)

  • On my email page, I've lost the 3-line menu icon in upper right -- how can I get it back?

    I inadvertently lost the little 3-line menu icon in the upper right corner of my email page. What can I do to get it back? I've tried pressing Alt and also Ctrl+Alt, as some instructions suggest, and nothing happens.

    You probably have disabled the Mail Toolbar. Press F10 and choose View -> Toolbars and check Mail Toolbar.

  • Is it possible to get the menu icon (verticle ellipsis) on my home touch buttons?

    I just got the LG G3 smartphone, and I can't find the menu icon (vertical ellipsis) anywhere (except on apps).  I'd like to have it as one of my home touch buttons, but it's not one of the icons available.  What gives?

    Press and hold the task-switching button (the overlapping rectangles), and it'll pop up.  The LG G3 has a menu button; here's where to find it | Android Central

  • Roboto font not available in certain applications and Openbox menu

    I have downloaded Roboto TTF font from here and saved it in ~/.fonts.
    After downloading it, I ran:
    $ fc-cache -vf
    After that, I changed the font in lxappearance and obconf and every single application I have tried so far uses it by default now except Openbox menu (window titles seem to work just fine) and Geany.
    What can I do to fix this?
    I really like the font and pretty much everything runs well except those two.
    Note: tried placing those files in /usr/share/fonts/local, but nothing changed.
    Last edited by COPE (2013-11-04 07:35:17)

    Tried to switch fonts in terminal (rxvt-unicode) and apparently that font is not available there either.
    Any ideas?

  • Xfce problems - some menu icons gone [solved]

    Hello all,
    I normally use XFCE, but briefly installed the Gnome packages just to try it out again, but ran into some troubles in XFCE after I decided to uninstall Gnome...
    It seems some menu icons and icons in the "Settings" window were lost...no big deal but it's ugly. How do I rebuild these again? I tried reinstalling XFCE but with no results.
    Thanks.
    Last edited by new2arch (2009-08-29 19:50:54)

    Found the solution:
    http://bbs.archlinux.org/viewtopic.php?pid=602731

  • [SOLVED] Strange Openbox menu behaviour

    Hi,
    so, I've searched the forums in order to find a solution for my problem, but not found anythihg that works for me. So, problem is that my openbox menu won't execute any commands that I add to ~/.config/openbox/menu.xml file. After editing that file, I run
    openbox --reconfigure
    command (no any error messages), but again, it simply won't execute the command that I've written. I have also changed permissions, so that I have read/write access. But, strange is that if I delete menus in menu.xml that I don't need, save those changes, and run reconfigure command, those menus are not any more in openbox menu, just as it should be.
    It seems that only commands that I want to execute will not work. I' ve also installed obmenu and tried editing stuff there, but again the same problem-deleting menus works fine, but executing commands not. It is obviously that problem is not in obmenu, but in menu.xml file or somewhere else, but I don't know
    where.
    So, any ideas? Did someone experienced the same problem and found a solution? All ideas are welcome
    Last edited by brunux (2010-05-09 16:32:54)

    In my menu.xml all the programs are surrounded by <command></command> tags instead of  <execute></execute>tags.
    I've tried with your suggestion, but it doesn't work. For example, running firefox works fine with <command></command> tags, but it is the default
    part of the code, where I didn't change anything.
    <item label="Firefox">
    <action name="Execute">
    <command>firefox</command>
    <startupnotify>
    <enabled>yes</enabled>
    <wmclass>Firefox</wmclass>
    </startupnotify>
    </action>
    </item>

  • Apple TV Menu Icons Show Up Over Video PLaying

    Menu icons keep showing up over video I am playing.  I have restarted and that will fix it for a while, but it keeps coming back.

    I’ve been having the same issue’s [AirPlay / HomeSharing notworking or working intermittently] after some digging and testing I found that this worked…please note I made the change 1 hour ago and things are still working.
    Steps to Fix:
    Login to the Router
    Select Wireless settings
    Change the “Wireless Mode” change it to 11G only. [Default is mixed mode]
    Power off your computer[s], Apple TV and all other connecteddevices [wireless/wired].
    Unplug the power on your router and wait 20 seconds…then plug itback in.
    Once the router is full started up [5 min]…now turn on all youconnected devices such as computer[s], Apple TV and all other connected devices[wireless/wired]
    You should now be able to access Airplay as well as HomeSharing.

  • Another N82 query - Menu Icon Animation

    Yes, I have too much time on my hands today, but seeing as people have been so helpful of late…
    I read in the N82 user guide (p97 in fact) that menu icon animation should be an option, and can be turned on and off. But I assumed that this was an error as the Menu > Options > Icon animation feature was absent on my relatively new handset. At first I thought it was because I was using a third party theme, but it the same under all the pre-installed N Series themes too.
    Reading the forums here, I noticed references to this feature in other threads so I looked on my handset again... under Menu > Options, I have:
    Open
    Change menu view
    Move
    Move to folder
    New folder
    Download applications
    Memory details >
    Help
    Exit
    No mention of icon animation in the menu or any sub menu. Is this a restriction my network operator (Orange UK) have placed on the firmware, or am I just looking in the wrong place?
    Solved!
    Go to Solution.

    Probably the only way they could make it work.
    I've noticed that with some 3rd party themes if you have icon animation enabled it doesn't show custom icons in all of the menus.
    I've been using this theme recently and it behaves like that.

  • How to integrate OpenBox menu with Tint?

    Having tint shorter than screen width is not an option, because it looks terrible.
    Any ideas?

    Could you explain a bit more what it is exactly you're trying to accomplish.  How are you trying to integrate the openbox menu with tint?
    For example: right-clicking free space on tint panel brings up OB menu.
    Current workaround works (tint not stretched to screen width - I'm clicking empty space on sides of tint panel) but I was hoping for more "elegant" solution.
    According to tint manual:
    "3.7 Mouse
    customize mouse action with : none, close, toggle, iconify, shade, toggle_iconify
    mouse_middle = none
    mouse_right = close
    mouse_scroll_up = toggle
    mouse_scroll_down = iconify"
    Why not just use the hotkey to bring up the openbox menu?
    Not being able to do everyday tasks efficiently with a mouse is a big no-no.
    Besides that, combo of OB + Tint + Trayer is great.
    Last edited by mute (2008-10-10 22:42:56)

  • [SOLVED] openbox menu command doesn't work with &&

    I'm now using openbox-session only.
    I'd like to run a program after something was done correctly:
    zenity --question && killall openbox
    I used "obmenu" and it seems that it fixes & to & correctly in the menu.xml.
    However, the previous command "zenity" is run only.
    In terminal, there's no problem, but it doesn't work with "command" in openbox menu.
    <item label="Exit">
    <action name="Execute">
    <execute>
    zenity --question --title="Exit" --text="Are you sure to go back to console?" && killall openbox
    </execute>
    </action>
    </item>
    Please, give me any idea. Thank you.
    Last edited by mairoo (2009-09-09 10:06:17)

    hbekel wrote:
    You'll need to use a shell explicitly:
    <execute>
    sh -c 'command1 && command2'
    </execute>
    I flagged "solved" thanks to your help. It works good. Thank you.

Maybe you are looking for