Announcement

Collapse
No announcement yet.

Can't get script to run

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can't get script to run

    I want to run a script that will turn off my Touch Pad upon startup. Previously I was given the script to run and I connected it to Settings->Advanced->Autostart. The file is touchpad.sh and it is shown as enabled. The file touchpad.sh.txt is attached. The txt extension is added so that I can attach it to this message. A copy of the file permissions is also attached. I was also told that "awk" must be installed. I checked and it is. This is shown in the attached file TomAwk.txt.

    I can't get this file to execute on startup so now I have to enter the instruction in the console

    synclient TouchpadOff=1

    This turns off the touch pad for one session only. What do I need to do to get the script to run?

    Thanks!

    Attached Files

    #2
    Re: Can't get script to run

    The actual script isn't attached to your post.

    If it's a short script, just copy and paste its contents in to your reply.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Can't get script to run

      I sent you the touchpad_sh.txt file. You need to use Dolphin rename it to touchpad.sh and then set the execute permission bit.

      In your previous thread I told you about using systemsettings -->advanced-->autostart--> Add script.

      My permission settings and autostart settings are shown in the two attached graphic.
      Attached Files
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        Re: Can't get script to run

        I'm having problems getting the Forum to send my attachments. The file in my Home directory is touchpad.sh. I attempted to attach it (with txt added) but it failed. The contents of that file are:
        #!/bin/bash
        # toggle synaptic touchpad on/off

        # get current state
        SYNSTATE=$(synclient -l | grep TouchpadOff | awk '{ print $3 }')

        # change to other state
        if [ $SYNSTATE = 0 ]; then
        synclient touchpadoff=1
        elif [ $SYNSTATE = 1 ]; then
        synclient touchpadoff=0
        else
        echo "Couldn't get touchpad status from synclient"
        exit 1
        fi
        exit 0
        I don't know how to get the prn file pasted into this text, but it does show that it is an executable file. I'll attempt to attach it and see what happens this time.

        The results of testing for "awk" are shown here:

        tom@DellNotebook:~$ whereis awk
        awk: /usr/bin/awk /usr/share/man/man1/awk.1.gz
        tom@DellNotebook:~$
        As far as I can tell, I've done what you recommended.
        Attached Files

        Comment


          #5
          Re: Can't get script to run

          Originally posted by tlinux
          I'm having problems getting the Forum to send my attachments. The file in my Home directory is touchpad.sh. I attempted to attach it (with txt added) but it failed.
          You have to rename it BEFORE you attempt to attach it.

          The contents of that file are:
          ....
          The contents of the file are good because it is what I sent you. All you had to do was save it in your home account as touchpad_sh.txt (which is what it was attached to my msg as) and then use Dolphin (rightmouse on it and choose "rename") to rename it to touchpad.sh

          I don't know how to get the prn file pasted into this text, but it does show that it is an executable file. I'll attempt to attach it and see what happens this time.
          Don't bother. If you haven't edited the file and changed any of its contents then it is OK. If you've actually added the permission bit then that is OK.

          You have "awk" so ALL the elements necessary for that script to work for you are present.

          As far as I can tell, I've done what you recommended.
          Obviously not, or it would be working. What I am telling you to do and what you are doing are two different things. Do you use Skype? If so, I can connect with you and you can share your screen with me while I talk you through what to do and how to do it. My skype handle is GreyGeek (or Jerry L Kreps).
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            Re: Can't get script to run

            You have to rename it BEFORE you attempt to attach it.
            That's what I did. The file Touchpad.sh.txt is on my desktop and is attached below (hopefully). It is the same as the Touchpad.sh file in my Home directory except for the txt extension.
            I sent you the touchpad_sh.txt file. You need to use Dolphin rename it to touchpad.sh and then set the execute permission bit.

            In your previous thread I told you about using systemsettings -->advanced-->autostart--> Add script.

            My permission settings and autostart settings are shown in the two attached graphic.
            Also attached below is a screen shot of my Systems Settings list.

            Obviously not, or it would be working. What I am telling you to do and what you are doing are two different things. Do you use Skype? If so, I can connect with you and you can share your screen with me while I talk you through what to do and how to do it. My skype handle is GreyGeek (or Jerry L Kreps).
            Sorry, but I don't use Skype. Obviously what I have must be different from what you have. However, I cut and pasted from your post so the Toudhpad.sh sould be the same as yours. The problem could be in the Systems Settings, but I don't see it.

            If you don't see any problems with what I have in Touchpad.sh and Systems Settings.png, tomorrow I will send you my phone number or you can send me yours if you don't mind putting it in the forum and I'll call you on my dime.

            Thanks Jerry.
            Attached Files

            Comment


              #7
              Re: Can't get script to run

              Originally posted by tlinux
              tomorrow I will send you my phone number or you can send me yours if you don't mind putting it in the forum and I'll call you on my dime.
              Do not post personal phone numbers in KFN. If you need to, PM GreyGeek - those are 'private' communications.
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment

              Working...
              X