startup – I throw out a softball

Forum Forums New users New Users and General Questions startup – I throw out a softball

  • This topic has 9 replies, 5 voices, and was last updated Mar 8-12:34 pm by Anonymous.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #7441
    Member
    JoeR

      This should be an easy one. I want to run the following commands every time the computer boots so i don’t have to ssh in and type them in. How can I easily do it?

      here are the commands:
      tightvncserver
      this allows me to use tightvnc to operate my antiX box remotely

      boincmgr
      this allows me to see what boinc is doing

      if you can even suggest a message thread to follow, which would be a good guide.

      Thank you

      #7445
      Anonymous
        Helpful
        Up
        0
        ::

        You could try putting them in your ~.bashrc if the machine boots to user login.
        otherwise they would have to be a sctript loaded by rc.d runlevel every
        time the machine starts.

        #7449
        Anonymous
          Helpful
          Up
          0
          ::

          btw not a fan of baseball/softball

          #7453
          Forum Admin
          Dave
            Helpful
            Up
            0
            ::

            I think you can add those commands to /etc/rc.local

            Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

            #7455
            Member
            JoeR
              Helpful
              Up
              0
              ::

              Thank you Dave and linuxdaddy for your help,

              I can certainly edit the /etc/rc.local file to include the command, question is what would the command look like?

              ie
              tightvncserver &
              or
              /usr/bin/tightvncserver &
              or
              ./usr/bin/tightvncserver &
              or other

              #7457
              Forum Admin
              rokytnji
                Helpful
                Up
                0
                ::

                I’d usually go with what terminal tells me

                harry@biker:~
                $ which antixcc.sh
                /usr/local/bin/antixcc.sh
                harry@biker:~
                $ which synaptic
                /usr/sbin/synaptic
                harry@biker:~
                

                Sometimes I drive a crooked road to get my mind straight.
                Not all who Wander are Lost.
                I'm not outa place. I'm from outer space.

                Linux Registered User # 475019
                How to Search for AntiX solutions to your problems

                #7470
                Anonymous
                  Helpful
                  Up
                  0
                  ::

                  I usually type the full path in so I would use the “/usr/bin/tightvncserver &” with no
                  leading dot and make sure it goes before the “exit 0” in rc.local.
                  the exit 0 has to be at the end of the file.

                  #7501
                  Member
                  JoeR
                    Helpful
                    Up
                    0
                    ::

                    Still no joy – any ideas why?

                    #!/bin/sh -e
                    #
                    # rc.local
                    #
                    # This script is executed at the end of each multiuser runlevel.
                    # Make sure that the script will “exit 0” on success or any other
                    # value on error.
                    #
                    # In order to enable or disable this script just change the execution
                    # bits.
                    #

                    /home/joe/Scripts/joe_startup.sh
                    /usr/bin/tightvncserver &
                    /usr/bin/boincmgr &
                    exit 0

                    #7502
                    Moderator
                    caprea
                      Helpful
                      Up
                      0
                      ::

                      Possibly they are starting to early

                      You can influence this with the sleep command

                      which sleep
                      

                      Could maybe look like this
                      (/bin/sleep 60s && /usr/bin/tightvncserver &)

                      That are 60 seconds.I’m not sure about the brackets, so this is without warranty.

                      #7503
                      Anonymous
                        Helpful
                        Up
                        0
                        ::

                        Is the rc.local marked executable “chmod 755 /etc/rc.local” and all
                        examples I see online don’t have the & at the end of the lines.

                      Viewing 10 posts - 1 through 10 (of 10 total)
                      • You must be logged in to reply to this topic.