You are not logged in.
Pages: 1
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?
Offline
Btw, doesn't netcfg call something in background before returning success? Something, that might be killed by bash when xterm is closed?
Offline
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)
Offline
how are you going to handle the root permissions to start netcfg ? Using gksu or gksudo ?
Offline
You may grab the new version here: http://bitbucket.org/mr_cat/openbox-netcfg
It can be configured via editing appropriate variables in .py files.
Offline
You could re-use the netcfg-tray-helper app in netcfg-tray. Feel free to copy it and modify it as suits you to include in your menu.
Then with dzen2 you can run for example:
output="$(netcfg-tray-helper up ethernet)"
echo $output|dzen2 -p 10
Last edited by iphitus (2009-08-08 00:35:21)
Offline
Can you elaborate? Like, post a screenshot of it, please?
Offline
Iphitus, thanks, I've used netcfg-tray as a "cheat-sheet", maybe, I should take a more close look at it.
Shapeshifter: The menu itself is just a list of netcfg profiles with those that are currently active marked. But I've posted a couple of shots on a project's bitbucket wiki page: http://bitbucket.org/mr_cat/openbox-netcfg/wiki/
Last edited by Mr.Cat (2009-08-08 16:17:36)
Offline
Mr. Cat, looks nice, I'm gonna try this out. Any way you could move out the variables to a separate configuration file? Would be easier to keep track of upgrades too, that way.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Yes. A separate config file is on my todo list.
Offline
Cool .
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Pages: 1