Results 1 to 4 of 4

Thread: Command to start program in menu

  1. #1
    Join Date
    Sep 2007
    Location
    Thurgoona, NSW, Australia
    Beans
    287
    Distro
    Ubuntu

    Command to start program in menu

    Hello all,
    I've added a program to my menu items, but I can't get it to start.

    It's a shell script.

    I put it in the menu via the applications>edit menus but I don't understand what the command line should be.

    The file name is cod.sh
    If I want to run it from the CLI it goes
    Code:
    sh cod.sh
    but I'm not sure how to do that in the menu dialogue.

    TIA

  2. #2
    Join Date
    Sep 2007
    Location
    Thurgoona, NSW, Australia
    Beans
    287
    Distro
    Ubuntu

    [SOLVED} Re: Command to start program in menu

    I did a bit of fiddling, and what I had to do was put "sh" before the shell script location.

    eg. the file was in /home/xxxx/check, so the code became
    Code:
    sh /home/xxxx/check/cod.sh

  3. #3
    Join Date
    Mar 2008
    Location
    NSW Australia
    Beans
    232
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: [SOLVED} Re: Command to start program in menu

    In case you're interested:

    if you add:
    Code:
    #!/bin/sh
    to the top line of the script

    and type:
    Code:
    chmod u+x /home/xxxx/check/cod.sh
    you don't need the "sh" at the beginning.

  4. #4
    Join Date
    Sep 2007
    Location
    Thurgoona, NSW, Australia
    Beans
    287
    Distro
    Ubuntu

    Re: Command to start program in menu

    OK thanks!!
    I will do that, it's neater.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •