Adding Program links to Application Menu

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nathj
    Recognized Expert Contributor
    • May 2007
    • 937

    Adding Program links to Application Menu

    Hi,

    I've just got a new mini computer running Linux Ubuntu 8.04, and I'm very happy with it.

    I've been merrily installing the few bits I want on it and one of those is a SQL editor. I've purchased RazorSQL as it seems to do exactly what I want.

    My trouble is that I don't want to have to go into the terminal everytime I load it.

    So I've managed to add it to the Applications>>P rogramming menu but when I click on the item I get a blank terminal window - really noting in it and the following message:
    There was an error creating the child process for this terminal
    So what have I done? Well, knowing that to launch the program in the terminal I typed:
    Code:
    cd programs/razorsql
    sh razaorsql.sh
    I have created a file that contains the following code:
    Code:
    #! /bin/bash
    cd programs/razorsql
    sh razaorsql.sh
    Then under the menu item properties I have set the following:

    Type Application in Terminal
    Name RazorSQL
    Command /home/ndavies/programs/launchers/razorslq

    (that's the file I mentioned above)

    With all that in place I click the item on the menu and get the error I mentioned above.

    Does anyone know what I've done wrong or what I should do instead of all this? I really do what to have this item accessible from the menu.

    Many thanks
    Nathan
  • ashitpro
    Recognized Expert Contributor
    • Aug 2007
    • 542

    #2
    Could you please try with this command...?

    "sh razaorsql.sh &" instead of "sh razaorsql.sh".

    However, I'm not sure about this...

    Comment

    • Nepomuk
      Recognized Expert Specialist
      • Aug 2007
      • 3111

      #3
      Originally posted by nathj
      Code:
      cd programs/razorsql
      sh razaorsql.sh
      When you open a terminal, you are automatically in your home directory. So try changing that bash script to
      Code:
      #! /bin/bash
      cd /home/nathj/programs/razorsql
      sh razaorsql.sh
      (if "nathj" is your username)

      Also, you can try if the command
      Code:
      /home/nathj/programs/razorsql/razorsql.sh
      works from terminal.

      Greetings,
      Nepomuk

      Comment

      • nathj
        Recognized Expert Contributor
        • May 2007
        • 937

        #4
        Hi there,

        @ asitpro:
        I tried that and it made no difference

        @Nepomuk:

        I have changed the bash script and I still get the same issue. I also tried the script in the terminal - typing it in myself and that worked fine.

        If I type in:
        Code:
        sh /home/ndavies/programs/razorsql/razorsql.sh
        I get the following message shown in the terminal:
        /home/ndavies/programs/razorsql/razorsql.sh: 2: ./jre/bin/java: not found
        Any further thoughts?

        Cheers
        nathj

        Comment

        • Nepomuk
          Recognized Expert Specialist
          • Aug 2007
          • 3111

          #5
          And how about the command
          Code:
          /home/nathj/programs/razorsql/razorsql.sh
          Did you try that? If it works in the terminal, does it work for the bash script?

          Greetings,
          Nepomuk

          Comment

          • nathj
            Recognized Expert Contributor
            • May 2007
            • 937

            #6
            Originally posted by Nepomuk
            And how about the command
            Code:
            /home/nathj/programs/razorsql/razorsql.sh
            Did you try that? If it works in the terminal, does it work for the bash script?

            Greetings,
            Nepomuk
            Wow, that was a quick reply.

            Here's what works in the terminal:

            Code:
            cd /home/ndavies/programs/razorsql
            sh razorsql.sh
            That is exactly what I have in the bash script after the initial line and I still get the odd message about creating the child process.

            This all really new to me and I really appreciate the help.

            nathj

            Comment

            • nathj
              Recognized Expert Contributor
              • May 2007
              • 937

              #7
              One other thing I should point out, it may be helpful, I don't know.

              If I navigate to the razorsql.sh file and click on it I get a message asking me if I want to run it or display it's contents with the options of Run in terminal, display, cancel and run.

              thanks again
              nathj

              Comment

              • Nepomuk
                Recognized Expert Specialist
                • Aug 2007
                • 3111

                #8
                One thing that just struck me: You say, you call it with
                Code:
                sh razorsql.sh
                Now, as you have
                Code:
                #/bin/bash
                in your script, you shouldn't have to do that. Just make that script executable (if you haven't already) with
                Code:
                 chmod +x /home/ndavies/programs/launchers/razorslq.sh
                and try to change the script to
                Code:
                #! /bin/bash
                cd /home/ndavies/programs/razorsql
                ./razaorsql.sh
                Also, have you tried running your script from terminal?

                Greetings,
                Nepomuk

                Comment

                • nathj
                  Recognized Expert Contributor
                  • May 2007
                  • 937

                  #9
                  Nepomuk,

                  You are a genius! thank you for helping me out.

                  Changing the script I wrote to be executable and then amending it as you sad works a treat.

                  Thank you for helping me out, not only have I got my problem solved I've learnt something along the way,

                  Cheers
                  nathj

                  Comment

                  • Nepomuk
                    Recognized Expert Specialist
                    • Aug 2007
                    • 3111

                    #10
                    Glad I could help! :-)

                    Greetings,
                    Nepomuk

                    Comment

                    Working...