Netcfg openbox menu

I've started tweaking my openbox box and the first thing to do was a simple script to run netcfg from openbox menu. You can grab it here: http://gist.github.com/160147. It can only activate an inactive profile or deactivate an active one (it's enough for me).
And I've encountered a strange issue. You may notice that I use xterm for desplaying netcfg output and in case of success xterm waits for 2 seconds to close. Without that after putting the profile down from menu subsequent calls to netcfg may claim that the corresponding interface is busy and fail. Even with that delay often subsequent calls to netcfg will complain of the interface being busy but will succeed. So, what am I doing wrong? What is the safe way to run netcfg in my case?

Well, I hope, that was not my fault: http://bbs.archlinux.org/viewtopic.php?pid=596519
UPD: Still, I should try something like
bash -c ". /usr/lib/network/network; . /etc/rc.d/functions; profile_up ...
UPD: Just the same issue with the above command. And netcfg-tray often hangs the interface too.
Last edited by Mr.Cat (2009-08-06 23:04:26)

Similar Messages

  • 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)

  • 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!

  • 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?

  • [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>

  • 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.

  • "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)

  • [FIXED] Openbox - menu won't change no matter what i do..grrr..

    Hi, I can't seem to be able to change the openbox menu, whether by manual edit thru menu.xml or using the graphical end obmenu. Restart PC, openbox --reconfigure, openbox --restart, nothing seems to be working.
    _xinitrc_
    http://pastebin.com/tNCQ5MXT
    _menu.xml_
    http://pastebin.com/juhvhCV3
    _My current ugly not working openbox menu_
    http://i.imgur.com/xiIuLK6.png
    thanks guys.
    Last edited by MrPotato (2014-01-06 13:41:28)

    Ha-ha! What do you know it worked. Dude you're awesome, thanks! If you don't mind I'm asking, what went wrong the first time?
    Last edited by MrPotato (2014-01-06 13:40:44)

  • [Openbox] Wine menu in Openbox menu?

    Is there a way to get the wine menu in openbox? I mean in gnome its in Applications>Wine and it has all the configure, wine uninstall wine software etc etc and it also automatically updates when new software is installed. Is it possible to have something like that in openbox?

    You could try making your own Wine menu in Openbox through Obmenu or by directly modifying the ~/.config/openbox/menu.xml

  • [Solved] gmrun & Openbox menu can't launch program but bash can.

    Hey there.
    Got myself a bit of a confusing problem. I recently installed the latest of Natron, in /opt/Natron, and added the path to the PATH variable in the .bashrc file,  and i can launch it if I'm on bash, but gmrun and the Openbox menu can't locate the executable when I try to launch it from there. Which is weird, because when i was adding it the Natron directory to the path when it wasn't in the .bashrc, i could then launch Natron just fine from gmrun. Anyone know why this is the case? Any help is appreciated.
    Last edited by anark10n (2015-02-22 16:35:17)

    .bashrc is only sourced when starting an interactive shell, whereas .bash_profile is sourced when you log in. Try adding the PATH export to your .bash_profile, then log out and back in.

  • [SOLVED] Freezing while executing /usr/bin/openbox from Openbox menu

    I'm following the instructions in this webpage to create a dynamic menu. I have successfully achieved this on my laptop by installing the openbox-menu package and typing the following lines in menu.xml:
    <menu id="desktop-app-menu" label="Applications" execute="/usr/bin/openbox-menu lxde-applications.menu" />
    For some reason, the same doesn't work on my desktop PC. After editing and saving the menu.xml file, I restart Openbox and when I right click the desktop and hover the "Applications" menu item the desktop freezes. However, I can still move the mouse and switch to other ttys with Ctrl+Alt+Fx, therefore I believe it's reasonable to suggest that the problem lies in the permissions.
    What should I do about it?
    Last edited by Martificiam (2013-02-03 11:29:21)

    Umm, that's not "some random" webpage at all... It worked on all of my Arch Linux installations. The "lxde-applications.menu" is just an argument. But thanks for the link, I'll look into it.
    It's just that it's more of a workaround, not a solution, really... since it has ALWAYS worked for me.
    Furthermore, while setting up Arch on my laptop I remember experiencing similar problems (running a particular program from the openbox menu and resulting in a desktop freeze). This must have something to do with permissions.
    Edit: the xdg_menu worked perfectly, but I would still prefer to use the openbox-menu. I'm marking this as solved anyway.
    Last edited by Martificiam (2013-02-03 11:29:06)

  • Latest Conky & Openbox menu

    Hi,
    Yesterday I updated Conky to v1.4.7, and now whenever I right-click on Conky on my desktop, the Openbox menu shows up and disappear almost instantly. This is annoying.
    My .conkyrc
    Thanks

    Conky has a pretty thorough manual...
    man conky
    My guess is that's something to do with the window settings.

  • Starting NetBeans via gmrun or openbox menu hangs X11

    Hi!
    The same problem takes place when I start NetBeans with gmrun or openbox menu (at all cases the same bash script is used). NetBeans itself starts without problems. But then I start NB project application (it is Scala project at my case), and X11 hangs. I still am able to switch to console via Ctrl-Alt-F1 and terminate X11 with Ctrl-C.
    If I start NetBeans from terminal or bashrun, all works fine. ~/.xinitrc contains just 'exec ck-launch-session openbox-session'.
    Where to dig in?

    At my case the problem isn't related to gnome-keyring. And I don't use GNOME.
    I was forced to reject openbox at all (starting from openbox menu results in the same problem) and have returned to KDE. All is fine now.

  • 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.

Maybe you are looking for

  • Ovi Maps Check In issues after PR1.1

    Hi! After updating phone with the PR 1.1 I can't use check in. When starting it fails to some sort of systemfailure ...

  • ID attachment has bad format?

    Hi there, I have deleted silverlight from mac and still can't send any attachment from hotmail account please help me out from this issue have a good time cya:)

  • After Effects CS5 Won't Start on Mac OSX 10.6.3

    Production Premium arrived yesterday, and having tried all the software, After Effects is the only one that won't start. I'm pretty sure my computer meets the spec needed. I have Intel Core 2 Duo processor, at 2.66 GHz, with 4GB of RAM and loads of h

  • Can't restore DV7 with disks purchased from HP

    HP Pavilion dv7-4173us Entertainment Notebook PC, Windows 7 Home This spring I had an internal kernel error and sent my pavilion back to have it fixed.  When I got it back it worked but I couldn't use the online help as it wouldn't connect.  Recentl

  • Backup without Deleting Moved or Deleted User Files

    We have a group of users who have a unique backup need. They want to ensure that if a file gets deleted on their end, that it will never be removed from the backup.  Due to the nature of their department, a deleted file could go unoticed for a long p