Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: magnus on November 19, 2010, 07:53:56 AM

Title: Add an icon to launch a script to wbar
Post by: magnus on November 19, 2010, 07:53:56 AM
Hi all,
excuse me for my english but I'm Italian...  :)

I tried to add a shortcut to wbar but the latter don't work.

I do this in tce.icons:

i: /usr/local/pixmaps/appbrowser.png
t: Get IP
c: exec ifconfig

I can see the icon but if I click on it command ifconfig isn't launched.

Why?

Thanks!
Title: Re: Add an icon to launch a script to wbar
Post by: ^thehatsrule^ on November 19, 2010, 03:30:35 PM
ifconfig is launched but:
- if you want to see it in an aterm, you need to run it in that (i.e. aterm -e)
- it is probably done very quickly (if using an aterm, you will probably need to pause at the end)
Title: Re: Add an icon to launch a script to wbar
Post by: tinypoodle on November 19, 2010, 05:20:01 PM
Umm, how would you use 'exec ifconfig' to launch a script when 'ifconfig' is an existing executable in PATH (which without any additional option would produce informational output)?
Do I miss something here?   ???
Title: Re: Add an icon to launch a script to wbar
Post by: roberts on November 19, 2010, 06:11:59 PM
If the purpose is for a GUI to display IP with wbar you could do something like this:
Code: [Select]
i: /usr/share/pixmaps/appbrowser.png                             
t: GetIP                                                         
c: exec  popup $(ifconfig eth0 | awk '/inet addr/{print "ip" $2}')