maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread (https://talk.maemo.org/showthread.php?t=45388)

moudy91 2012-03-03 20:20

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by magic_doc (Post 1173606)
try

Code:

osso-xterm -e /path/to/yourscript
should open an xterm with your scipt running in it.

HTH & HAND

Michael

Hi,
Nothing happens even the xterm did not open at all.

magic_doc 2012-03-03 21:06

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
try your command from the commandline (xterm launched from desktop) first- if this works then try it from the widget cmd-field.

CU Michael

moudy91 2012-03-03 21:34

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by magic_doc (Post 1173789)
try your command from the commandline (xterm launched from desktop) first- if this works then try it from the widget cmd-field.

CU Michael

Hi
In xterm its working just fine but in the qbw nothing happens, must be something missing in the script

sixwheeledbeast 2012-03-03 21:40

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Don't you need to chmod the script?

moudy91 2012-03-03 21:45

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by sixwheeledbeast (Post 1173798)
Don't you need to chmod the script?

All i need my sh work

o s s o - x t e r m ' r o o t ' ' e c h o " i f c o n f i g w l a n 0 u p " ' ' e c h o " i w l i s t w l a n 0 s c a n " ' ' e c h o " i f c o n f i g w l a n 0 d o w n ' "

moudy91 2012-03-04 21:28

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by sixwheeledbeast (Post 1173798)
Don't you need to chmod the script?

hi,
what do you mean about chmod ??? first time i use in my n900
because usual just i use sh /location/ ?.sh then it works , but dont know why this time its only works in xterm but dont work in qbw

moudy91 2012-03-04 21:42

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
i tried this
Code:

osso-xterm -e sh  /path/to/yourscript
just the xterm opens but the script don't opens
PS: in xterm the sh works perfectly

sixwheeledbeast 2012-03-04 22:03

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
I thought it may not run because it wasn't set executable.

I had a go at recreating your problem, seems like QBW forces the script to close. The script as you say works great on it's own.

As a work around you could dump a huge pause in the script.
I can't seem to get it to leave xterm open when executed.

Or you could try and see if you can make a .desktop execute it correctly.

At the moment I have this 30 second pause, a prompt, a 10 second pause.
When running in QBW the "Press Enter" prompt gets skipped.

QBW Command
Code:

osso-xterm -e "sh /home/user/MyDocs/myscript/iwlistscan.sh" | echo ""
iwlistscan.sh
Code:

#!/bin/sh

if [ `id -u` != 0 ] ; then
exec sudo gainroot <<EOF
exec sh $0 $*
EOF
exit $?
fi

ifconfig wlan0 up
iwlist wlan0 scan
ifconfig wlan0 down

sleep 30
read -p "Press Enter Key..." nothing
echo
sleep 10
exit 0;


moudy91 2012-03-04 22:56

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by sixwheeledbeast (Post 1174343)
I thought it may not run because it wasn't set executable.

I had a go at recreating your problem, seems like QBW forces the script to close. The script as you say works great on it's own.

As a work around you could dump a huge pause in the script.
I can't seem to get it to leave xterm open when executed.

Or you could try and see if you can make a .desktop execute it correctly.

At the moment I have this 30 second pause, a prompt, a 10 second pause.
When running in QBW the "Press Enter" prompt gets skipped.

QBW Command
Code:

osso-xterm -e "sh /home/user/MyDocs/myscript/iwlistscan.sh" | echo ""
iwlistscan.sh
Code:

#!/bin/sh

if [ `id -u` != 0 ] ; then
exec sudo gainroot <<EOF
exec sh $0 $*
EOF
exit $?
fi

ifconfig wlan0 up
iwlist wlan0 scan
ifconfig wlan0 down

sleep 30
read -p "Press Enter Key..." nothing
echo
sleep 10
exit 0;




Ohhh yes thanks , it worked finally, really thank you.

i have a question can the iwlist scan give me just the SSID and mac ?? because the other info that iwlist scan give me not important for me , all i care about is SSID and mac

sixwheeledbeast 2012-03-04 23:59

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Why not just use
QBW Command
Code:

echo "iwconfig wlan0" | sudo gainroot | grep ESSID |sed "s/.*ESSID:\"//;s/\".*//" ; echo "iwconfig wlan0" | sudo gainroot | grep Point | sed "s/.*Point: //;s/ //g"
This will display SSID and MAC in a widget.
You will not need the script or xterm then.

If you want to display anything else from iwlist just add another grep command.


All times are GMT. The time now is 10:35.

vBulletin® Version 3.8.8