LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2004, 05:12 AM   #1
marisa
LQ Newbie
 
Registered: Nov 2003
Posts: 8

Rep: Reputation: 0
internet login graphically


To go online I need to type 'pppd call name' in the terminal and to disconnect I use the terminal, too.

How can I do that without the terminal but with a script or whatever?

Thank you for help.

Marisa
 
Old 01-25-2004, 05:26 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
kppp will work.

but you can make a quick
bash script
cat >> /usr/local/bin/getoninternet
pppd call name
control-d
chmod +x /usr/local/bin/getoninternet

add a link to the above or create an icon for it
in whatever you are using.
 
Old 01-25-2004, 06:54 AM   #3
marisa
LQ Newbie
 
Registered: Nov 2003
Posts: 8

Original Poster
Rep: Reputation: 0
well, thank you for your quick answer...

I never wrote a script though .... however I have this textfile with 'pppd call name'
how do I make it a bash script
how do I use it then and how do I disconnect?
 
Old 01-25-2004, 07:59 AM   #4
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
a script is just a command or set of commands that run by running the
name of the script.
chmod +x nameofscript
mades it an executable script.

make another one for what you need to do to hang up, and do the same thing to it.

what i gave you in the previous response will work, and you can change whatever
names and paths you wish.

cat >> /usr/local/bin/getoninternet # here cat just means add the following test the the fileename shown

pppd call name # this is the text added to the file

control-d # this means stop adding text and close the file

chmod +x /usr/local/bin/getoninternet # this means make the file executable so it will run when you type the name of it.

you can just as easily do that with a text editor, then save the file by whatever name you wish, just putting it somewhere in your search path. /usr/local/bin is good

then make it executable with chmod +x nameandpathoffile

then you can type the name of the file, and the commands in it will be run.
make another for your hangup script.
 
Old 01-25-2004, 08:34 AM   #5
marisa
LQ Newbie
 
Registered: Nov 2003
Posts: 8

Original Poster
Rep: Reputation: 0
>chmod +x nameofscript
>mades it an executable script.
so why does it show me whats in there when I click on it? (it shows me the text)

to hang up I need to type in 'ps aux | grep pppd' than it shows me several process numbers from which I should chose the right one to "kill number' it then.
Can I do that with a script....

I would use kppp, but it does not support my internet connection
 
Old 01-25-2004, 02:07 PM   #6
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
maybe it's not executable by the user you are trying it as.
try chmod 755 /nameof script
the hanup could be
killall pppd
 
Old 01-25-2004, 03:06 PM   #7
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
i just remembered that some interfaces will not execute a script unless it has
#!/bin/bash
as the first line.
try that.
 
Old 01-25-2004, 05:53 PM   #8
marisa
LQ Newbie
 
Registered: Nov 2003
Posts: 8

Original Poster
Rep: Reputation: 0
woohoooo, it works....dimdidimdidu

thank you,

marisa
 
Old 03-09-2004, 04:49 PM   #9
bbs2web
LQ Newbie
 
Registered: Mar 2004
Location: Johannesburg, South Africa
Posts: 1

Rep: Reputation: 0
Post Disconnect Script

I had a similar problem when trying to see when my pptp pppd tunnel was dying (didn't want to killall -9 pppd as the ADSL connection was still running):

PS: I stuck this in /etc/cron.2minutes

#!/usr/bin/perl
##############################################################################
# Check VPN PPTP Link Utility Version 1.0 #
# Copyright 2004 David Herselman (dh@syrex.cc) #
# Created 09/03/2004 Last Modified 10/03/2004 #
##############################################################################
# COPYRIGHT NOTICE #
# Copyright 2004 David Herselman All Rights Reserve #
# #
# Selling the code for this program without prior written consent is #
# expressly forbidden. In other words, please ask first before you try and #
# make money off of my program. #
# #
# Obtain permission before redistributing this software over the Internet or #
# in any other medium. In all cases copyright and header must remain intact.#
##############################################################################
# Define Variables #

$vpn_name = 'savatijhb';
$vpn_gw = '192.168.1.1';

# Done #
##############################################################################

$dev = `/sbin/ifconfig`;
if ($dev !~ /P-t-P:$vpn_gw/ ) {
@routes = `/sbin/route -n`;
foreach $vpn_dev (@routes) {
if ( $vpn_dev =~ /\S+\s+$vpn_gw\s+/ ) {
$vpn_dev =~ s/.*\s+(\S+)\n/\1/;
$vpn_pid = `cat /var/run/$vpn_dev'.pid'`;
`kill -9 $vpn_pid`;
}
}
`pppd call $vpn_name`;
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to connect remote by ftp by graphically.. bruse Linux - Networking 2 04-08-2005 01:17 PM
how to graphically load modules dave37 Fedora 2 12-07-2004 10:39 AM
viewing directories graphically? NNP SUSE / openSUSE 2 11-15-2004 07:56 AM
Computer fails to boot graphically any more jginger Linux - Newbie 8 08-30-2004 07:40 AM
sudo graphically? IceNineJon Linux - Newbie 5 07-05-2002 11:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration