Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

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

    Reply
    Page 134 of 140 | Prev | 124   132     133   134   135     136   | Next | Last
    moudy91 | # 1331 | 2012-03-03, 20:20 | Report

    Originally Posted by magic_doc View Post
    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    magic_doc | # 1332 | 2012-03-03, 21:06 | Report

    try your command from the commandline (xterm launched from desktop) first- if this works then try it from the widget cmd-field.

    CU Michael

    Edit | Forward | Quote | Quick Reply | Thanks

     
    moudy91 | # 1333 | 2012-03-03, 21:34 | Report

    Originally Posted by magic_doc View Post
    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sixwheeledbeast | # 1334 | 2012-03-03, 21:40 | Report

    Don't you need to chmod the script?

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by sixwheeledbeast; 2012-03-03 at 21:42.

     
    moudy91 | # 1335 | 2012-03-03, 21:45 | Report

    Originally Posted by sixwheeledbeast View Post
    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 ' "

    Edit | Forward | Quote | Quick Reply | Thanks

     
    moudy91 | # 1336 | 2012-03-04, 21:28 | Report

    Originally Posted by sixwheeledbeast View Post
    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    moudy91 | # 1337 | 2012-03-04, 21:42 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sixwheeledbeast | # 1338 | 2012-03-04, 22:03 | Report

    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;

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to sixwheeledbeast For This Useful Post:
    moudy91

     
    moudy91 | # 1339 | 2012-03-04, 22:56 | Report

    Originally Posted by sixwheeledbeast View Post
    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sixwheeledbeast | # 1340 | 2012-03-04, 23:59 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to sixwheeledbeast For This Useful Post:
    moudy91

     
    Page 134 of 140 | Prev | 124   132     133   134   135     136   | Next | Last
vBulletin® Version 3.8.8
Normal Logout