SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Apcon - Multi Profile Connector

Apcon is a system tray application for KDE, that allows users to easily specify and manage different network/connection profiles and connect/disconnect to them. A user can also view the details of a connection.

A profile will be specified using any kind of executable programs. In most cases an user will write three scripts (connect/disconnect/status). This makes apcon completely open to any kind of needed profiles. It comes with two profiles for connecting to VPNs using the Cisco VPN Client and the vpnc.

INSTALLATION

(0. make -f Makefile.dist (cvs users only)) 1. ./configure
2. make
3. make install (as root)

PROFILES

Easy creation of profiles is possible using the integrated wizard.

Profiles are located in:

$HOME/.apcon

A Profile consists of three scripts/programs:

  • connect, to esteblish a disired connection or configure an interface or something else
  • disconnect, to shut down an connection or an interface... and
  • status, to show the status of a connection/profile.

** connect/disconnect **

Every line on stdout of these scripts is shown by Apcon in the connecting/disconnecting progress dialog. The scripts should start with "echo steps <num>" to set the number <num> of output lines and end with "echo Connected." for the connect script or "echo Disconnected." for the disconnect script.

Example: (set up/down an interface)

  • connect script:

#!/bin/sh
echo steps 2
echo "Setting up eth0..."
/usr/bin/sudo /sbin/ifup eth0
echo "Connected."

  • disconnect script:

#!/bin/sh
echo steps 2
echo "Shutting down eth0..."
/usr/bin/sudo /sbin/ifdown eth0
echo "Disconnected."

** status **

This script shows the status of a connection. For example in our case if the desired interface is up or down. Every output line should have the following format:

info description: info value

If a connection is established, there has to be a line

ip: <ip address>

With this line Apcon detects if the connection is up or down. All other lines will be inserted into the information table on the details dialog.

AUTHOR

Andreas Pohl <osar@users.sourceforge.net>


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.