Announcement

Collapse
No announcement yet.

Automatic kppp on boot?

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

    Automatic kppp on boot?

    Is it possible to make kppp auto connect when kubuntu boots?

    #2
    Re: Automatic kppp on boot?

    Assumed that you are able to start kppp by the console command kppp, you may create a little script (read: a plain text file, named to [something].sh, it's properties set to executable as follows:

    Location & Name: /home/[user]/.kde/Autostart/kppp.sh; contents:

    Code:
    #!/bin/bash
    if
     ! [ "$(ps -e | grep 'kppp')" ]; then
       kppp &
    fi
    If it works as I suppose it to, when you log in, this script should start kppp (if not running allready).

    HTH
    Birdy

    Comment


      #3
      Re: Automatic kppp on boot?

      I'm not so sure about this but I always connect to my ADSL PPPOE connection through the command line and it connects automatically at boot without even telling me!

      If you are interested to know read on:

      *Disclaimer: I have been using Kubuntu for only 17 days. Do at your own risk. Make sure you backup your data. And read the tiny letters that may be in your screen before pressing the Enter key. If it doesn't work for you - I'm sorry - but it worked for me!

      1. Alt + F2
      2. kdesu konsole
      3. type password
      4. pppoeconf
      5. Fill in your internet connection details
      a. User Name
      b. Password
      6. Choose the appropriate or default settings for your connection
      7. Make sure that "Connect at boot" is answered with a yes

      -Your computer will boot at startup test this by opening a browser and browsing

      Give me a smiley if it works!

      Comment


        #4
        Re: Automatic kppp on boot?

        @ penguin.ch, your suggestion started kppp automatically but didn't initiate the connection.  So what I did is really simple, but may be horrilby newbish or something.  I did:

        Code:
        #!/bin/bash
        
        kppp -c "SBC Global"
        That seems to work just fine so far.

        @ dannyboy, I tried using pppconfig and pon for the connection, and it  keeps  failing.  I'm not sure what options I did  wrong, but kppp worked pretty much right away, so I wanted to stick with that for now.  Also, I'm   using dial-up, not adsl, but I don't think that makes a difference.

        Thanks for the input guys.  It helped me figure out a way to get this to work

        Comment


          #5
          Re: Automatic kppp on boot?

          Dlanor78,

          I simply refrained from mentioning more than the "core" command, because it's a long time sine I last used modems or isdn cards ... but, as I have learned from your posting, you got the idea I wanted to put across.

          Two remarks: by skipping the & character, you tell the kppp process to stay the foreground, therewith assumedly blocking a console session; by skipping the complete if ... fi condition, you omit any control whether kppp is allready running ... If you deliberately prefer to handle things this way, it's allright with me.

          Birdy

          Further reading: Bash Scripting Guide

          Comment


            #6
            Re: Automatic kppp on boot?

            I was getting a kppp.pid error so I made a few changed to the Autostart script...here's what I have now that seems to work so far in case anyone else finds it useful:

            Code:
            #!/bin/sh
            if [ -e ~/.kde/share/apps/kppp/kppp.pid ]
            then
            rm ~/.kde/share/apps/kppp/kppp.pid
            fi
            kppp -c "Connection Name" &
            Major thanks to penguin.ch for helping with the if fi and & things and for pointing me to the bash scripting guide.  I  can't wait to learn more 

            Update: After another reboot I got the kppp.pid error again....not sure how to fix this yet, but will post further if I find out how to fix this (maybe add killall kppp to autostart?).

            Comment


              #7
              Re: Automatic kppp on boot?

              Dlanor78,

              what about the [ "$(ps -e | grep 'kppp')" ] condition I've mentioned in the beginning? It's supposed to tell you if there allready is a process ("kppp") running, read: listed in the process table ("ps ... grep").

              Birdy

              Remark: I have to admit that, due to my age, I am used to real books ... my favourites on "bashing" are the two books from O'Reilly: "Learing the Bash Shell" and "Classic Shell Scripting" ... however, I am a "bloody noob" in this, as you might have learned from my code suggestions :P

              Comment


                #8
                Re: Automatic kppp on boot?

                I kind of gave up on this for awhile and just told my sister (whose computer I've been setting linux up on for) to connect manually. She was used to opening up firefox in windows and having it auto connect for her, so wanted something similar in linux.

                I seem to have finally figured this sucker out. The kppp.pid error was because there was already a kppp being loaded on boot, but not connecting. Then my autostart script loaded another kppp, hence the error message.

                So the obvious solution was to stop that first kppp from loading. I did that by going to "systemsettings>KDE Components>Session Manager" and under "Advanced>Applications to be excluded from sessions:" I put kppp. I've gone through a few reboots and so far so good.

                And in the autostart script, I just have the kppp -c "Connection Name". That seems to work just fine.

                Comment

                Working...
                X