Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Gnuite applet with run command

    Reply
    Page 1 of 2 | 1   2   | Next
    pc4ever1 | # 1 | 2006-08-05, 23:06 | Report

    I have been trying to run commands from the Gnuite's load/run applet(see link below) . However they don't appear to be executing. I know the executable script files work because when I run them form Xterm command line they work.

    I have been using the following to execute the command from the applet's run command:

    ./go2drv

    or

    sh ./go2drv

    Neither one of these commands work within the applet but do work at the Xterm command line

    I have a few questions.
    *********************
    Can someone suggest a method to make them execute "go2drv" from this applet.

    Is there a way to have the applet open Xterm and then execute the "go2drv" file?

    Thanks for the help!

    http://gnuite.com:8080/nokia770/

    Edit | Forward | Quote | Quick Reply | Thanks

     
    BanditRider | # 2 | 2006-08-06, 01:36 | Report

    Put the file in /usr/bin

    Edit | Forward | Quote | Quick Reply | Thanks

     
    pc4ever1 | # 3 | 2006-08-06, 03:06 | Report

    I must be dense.
    I put the files into /usr/bin and still get no results when using the load/run app.
    When I open xTerm and issue the same commands that I used in the load/run app it works.

    Does the Load/Run app "run" command line actually issue a command to xTerm, if not where does it send it to?

    By the way I have tried to uninstall and re-install the Load/Run app and that didn't work either.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    BanditRider | # 4 | 2006-08-06, 10:11 | Report

    Put the file in /usr/bin and don't use ./ or sh

    Just use the filename

    Edit | Forward | Quote | Quick Reply | Thanks

     
    pc4ever1 | # 5 | 2006-08-06, 13:47 | Report

    I tried all of that ( nothing in front of the script name, then tried ./ and then sh ) and it still doesn't run.

    Does the Load/Run app "run" command line actually issue a command to xTerm, if not where does it send it to?

    Thanks for the suggestions

    Edit | Forward | Quote | Quick Reply | Thanks

     
    BanditRider | # 6 | 2006-08-06, 14:46 | Report

    It sends it to the shell - sh
    can you run the command by just typing it's name?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    pc4ever1 | # 7 | 2006-08-06, 15:34 | Report

    Originally Posted by
    can you run the command by just typing it's name?
    I'm assuming you mean running from within xTerm. If so then Yes, works great.

    But when using the same command via run/load applet nothing happens, however after running the command the run/load command states "command completed with exit code 1".

    Edit | Forward | Quote | Quick Reply | Thanks

     
    BanditRider | # 8 | 2006-08-07, 11:46 | Report

    Show me the contents of your script.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    pc4ever1 | # 9 | 2006-08-07, 12:35 | Report

    Here's the script:
    ****************
    #!/bin/sh
    user=user
    if grep $user /etc/passwd
    then password=rootme
    sudo su -
    cd /home/user/MyDocs/.documents
    ./foto1.sh
    fi

    The script for foto1.sh is:
    **************************
    grep -q cifs /home/user/MyDocs/.documents || insmod ./cifs.ko
    mount -t cifs //192.168.001.112/Photos /home/user/MyDocs/.documents/foto -o domain=MSHOME,user=guest,password=guest


    Both scripts function from the xTerm prompt, but do nothing running from the Run/Load applet.

    Thanks for checking this out.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    BanditRider | # 10 | 2006-08-07, 15:54 | Report

    OK, Here's what I'd do:
    as root,
    move the cifs.ko file to /lib/modules
    add the following line to /etc/init.d/minircS near the top after the PATH= line:

    insmod /lib/modules/cifs.ko

    add the folowing line to the bottom of /etc/fstab

    //192.168.001.112/Photos /home/user/MyDocs/.documents/foto cifs rw,domain=MSHOME,user=guest,password=guest
    0 0

    (all on one line)

    Now your single script should be:

    #!/bin/sh
    # mount cifs shared folder
    # use gainroot to become root and relaunch itself
    if [ `id -u` != 0 ] ; then
    #if not already root, call itself as root
    sudo gainroot <<EOF
    $0 $*
    EOF
    exit
    fi
    mount /home/user/MyDocs/.documents/foto

    Put this script in /usr/bin, reboot and you're good to go.
    Call it whatever you like, no need for ./ or a .sh extension. just make it executable.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 1 of 2 | 1   2   | Next
vBulletin® Version 3.8.8
Normal Logout