View Single Post
Posts: 2,292 | Thanked: 4,135 times | Joined on Apr 2010 @ UK
#1338
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;
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post: