|
2012-03-03
, 21:06
|
Posts: 87 |
Thanked: 80 times |
Joined on Sep 2009
|
#1332
|
|
2012-03-03
, 21:34
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#1333
|
try your command from the commandline (xterm launched from desktop) first- if this works then try it from the widget cmd-field.
CU Michael
|
2012-03-03
, 21:40
|
Posts: 2,290 |
Thanked: 4,134 times |
Joined on Apr 2010
@ UK
|
#1334
|
|
2012-03-03
, 21:45
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#1335
|
Don't you need to chmod the script?
|
2012-03-04
, 21:28
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#1336
|
Don't you need to chmod the script?
|
2012-03-04
, 21:42
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#1337
|
osso-xterm -e sh /path/to/yourscript
|
2012-03-04
, 22:03
|
Posts: 2,290 |
Thanked: 4,134 times |
Joined on Apr 2010
@ UK
|
#1338
|
osso-xterm -e "sh /home/user/MyDocs/myscript/iwlistscan.sh" | echo ""
#!/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;
The Following User Says Thank You to sixwheeledbeast For This Useful Post: | ||
|
2012-03-04
, 22:56
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#1339
|
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
iwlistscan.shCode:osso-xterm -e "sh /home/user/MyDocs/myscript/iwlistscan.sh" | echo ""
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;
|
2012-03-04
, 23:59
|
Posts: 2,290 |
Thanked: 4,134 times |
Joined on Apr 2010
@ UK
|
#1340
|
echo "iwconfig wlan0" | sudo gainroot | grep ESSID |sed "s/.*ESSID:\"//;s/\".*//" ; echo "iwconfig wlan0" | sudo gainroot | grep Point | sed "s/.*Point: //;s/ //g"
The Following User Says Thank You to sixwheeledbeast For This Useful Post: | ||
Nothing happens even the xterm did not open at all.