Sunday, September 16, 2007

vpn client

I had some trouble getting my Cisco VPN client to work with Ubuntu, particularly the new kernel versions 2.6.22 and greater.

From http://www.longren.org/2007/05/17/how-to-cisco-vpn-client-on-ubuntu-704-feisty-fawn/

--------------------

Now Alexander Griesser released a new patch that works with these kernels:

After getting everything setup and running nicely, I realized I had no way of connecting to the Cisco PIX VPN we have at work. This is really important for me to be able to do, my job depends on it. I immediately went to Google and started searching. Turns out a nice fellow named Alexander Griesser has created a patch for the Cisco VPN client. The most recent CIsco VPN client for linux won’t compile with kernels 2.6.19 or newer. There’s really not much of a difference between his instructions and this how-to. However, I’m including more detailed instructions for those who may not be familiar with compiling software on Linux.


Here’s the steps I took to get the Cisco VPN Client to work under Unbutu 7.04 (Feisty Fawn). Note: A $ at the beginning of a line signifies a command to be run from the terminal.



  1. Download vpnclient-linux-4.8.00.0490-k9.tar.gz (mirror) to your home directory.

  2. Open a terminal window and untar the vpnclient with the following command:
    $ tar xzf vpnclient-linux-4.8.00.0490-k9.tar.gz
    This will create a new folder called vpnclient in your home directory. Leave the terminal window open, you’ll need it later.

  3. Download the patch (mirror) and save it to the vpnclient folder that was created in step 2.

  4. Go back to your terminal window and move into the vpnclient folder:
    $ cd vpnclient/

  5. Now patch the Cisco VPN source with this command:
    $ patch < vpnclient-linux-2.6.22.diff

  6. Next we actually build the Cisco VPN client, issue this command:
    $ sudo ./vpn_install
    Just hit enter for everything it asks you, the defaults are all OK. You may see lots of warnings, but those are OK.

  7. The VPN client is installed, now we need to start it:
    $ sudo /etc/init.d/vpnclient_init start

  8. Place your .pcf configuration files in /etc/opt/cisco-vpnclient/Profiles/

  9. If your .pcf file is called myVPN.pcf, you’ll connect to the VPN with the following command:
    $ sudo vpnclient connect myVPN






That’s it! You should now be able to connect to your Cisco VPN with the official Cisco VPN client on Linux. This will probably work on pretty much any linux setup, not just Ubuntu.



UPDATE (8/18/2007):
Alexander Griesser released a new patch that works with kernel versions 2.6.22 and greater. The new patch is backwards compatible, so it also works with older kernels as well, such as 2.6.10 and 2.6.21. All the download links above point to the newest release of the patch. I’ll continue to update this how-to as he releases new patches.



--------------------

Monday, September 3, 2007

graphs in Rcommander

So I was happily using R, being a former "Windows client" by means of Rcommander .

I couldn' get a decent abline, so my question to the developer was:

I have data set nura:
> date gtv ctv
> 1 10/05/07 162.75 342.41
> 2 01/06/07 203.36 350
> 3 08/06/07 170.57 364.78
> 4 15/06/07 88.31 285.28
> 5 22/06/07 35.07 251.12
>
> I make a scatterplot with Rcmdr:
> scatterplot(gtv~ctv, reg.line=FALSE, smooth=FALSE, labels=FALSE,
> boxplots=FALSE, span =0.5, data=nura)
>
> Then I wnat to have vertical line at 300, in the script window:
> abline(v=300)
>
> The result is the graph you see in th PDF enclosed.
>
> I get a shift in my x-values. This happens with all my data in Rcmdr,
> but not when I use plain R.
>

The respons was :

This behaviour has to do with scatterplot() in the car package; it's
not peculiar to the Rcmdr. See the explanation of the reset.par
argument in ?scatterplot: You should set reset.par to FALSE.

(I'm only looking now for a solution to keer this reset.par set FALSE by default

Wednesday, May 2, 2007

Wireless network

With my new XUbuntu Feisty I encountered some problems with my wireless connection. In both a dell latitude C610 as well as a dell latitude 100l my ASUS WL-100g Deluxe could not be used out of the box.
The module bcm43xx was loaded, but the card could not be used, even after installing the bcm43xx-fwcutter package

Then I installed ndiswrapper and extracted the firmware from the Win2K driver
sudo ndiswrapper -i bcmwl5.inf
This ASUS driver seems a bit buggy: the network goes down after some time, varying between 10 and 45 minutes. I switched to the Dell True mobile driver R83097.EXE (AR variant) which seems to work stable

We must make sure the bcm43xx kernel module is not loaded after the next reboot; the ndiswrapper module must be loaded instead. This is done by blacklisting the original module
echo "blacklist bcm43xx" >> /etc/modprobe.d/blacklist
and making sure ndiswrapper gets loaded
echo "ndiswrapper" >> /etc/modules

Now wpa_supplicant must be configured by creating the file /etc/wpa_supplicant/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
#ap_scan=0
#ap_scan=1
ap_scan=2
fast_reauth=1

### Example of basic WPA-PSK secured AP
network={
ssid="Name"
psk=...
pairwise=TKIP
key_mgmt=WPA-PSK
proto=WPA
scan_ssid=1
priority=10
}

### Associate with any open access point
### Scans/ESSID changes can be done with wpa_cli
network={
ssid=""
key_mgmt=NONE
}

And the we must tell the system it need to use wpa_supplicant for my wireless interface wlan0 in my case by insertion of the following section in the /etc/network/interfaces file
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

After a reboot we are connected and report our findings ...

UPDATE 21-11-2007
Gutsy, Ubuntu 7.10, now offers support for the wireless card through the restricted drivers!
Now my wireless interface is called eth1 and the interfaces file looks like
auto eth1
iface eth1 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Monday, February 26, 2007

Internet Exploder 6

Ook wel eens de behoefte om Internet Exploder te gebruiken, al dan niet gedwongen door de boze buitenwereld? Voor een voorbeeldje zie http://www.pbcu.nl.

Op de site van IEs 4 Linux staat een tar.gz klaar om alles voor je te regelen.

of doe:

wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

Friday, January 26, 2007

Stow

A nice overview of stow can be found here

Whenever you compile your own packages and want to install them in the /usr/local tree, you need stow
sudo apt-get install stow
This will create the directory /usr/local/stow under which you will install your self-compiled programs, each in its own directory. Running stow on such a directory, will install some links in the ordinary /usr/local directories.

As an example, suppose we have compiled foo-0.98.4.1 and want to install it. Running
make -n install
reveals that it want to put the produced files in /usr/local/bin etc. However by issuing the command
sudo make install prefix=/usr/local/stow/foo-0.98.4.1
will result in all the installed files under the given directory.
Now issuing
cd /usr/local/stow
sudo stow foo-0.98.4.1
will create the appropriate links e.g.
/usr/local/bin/foo -> /usr/local/stow/foo-0.98.4.1/bin/foo
and the program can be used as if it was installed natively in /usr/local but can now be easily de-installed by running
cd /usr/local/stow
sudo stow -D foo-0.98.4.1
which removes the create links. Another version of the same program can be installed next to it and by using stow you can decide which version you use.

When a lot of packages are installed in stow you might want to know which packages are stowed, for this we created the following command
find . -wholename './stow' -prune -o \
-type l -exec readlink -f {} \; | \
sed -e 's/^.*stow\/\([^/]*\)\/.*$/\1/' | \
sort | uniq

Thursday, January 25, 2007

Newz leeching

First find the stuff you want with FTD4Linux . You have to register (free) to get access to it's database of new posts in the various newsgroups.

Clicking on an interesting post will show a tiny NZB mark in the upper right corner. This will let you search the various usenet search engines: binsearch, yabse, newzleech, eweka. Of course you can start there in the first place, but then you won't know of the most recent posts as announced on FTD...

After finding what you want get an NZB file and save it in the download queue of your preferred NZB-leecher.

You can find a list of NZB applications on binaries4all. I tried Ninan, which has a nice built-in web-interface. It's Java based. Recently I changed to hellanzb, which is python. No web-interface, just running in the background, waiting for an NZB to be dropped in it's queue directory. You can by the way make a symbolic link to your default download directory. It's supposed to just pick the NZB files from there and copy them to the working directory.

All the programs listed at binaries4all do the hard work for you: downloading, unrarring, par2 checking (some of them only downloading the par2 file they need..) and then moving completed jobs to a directory of your liking.

Have fun

Wednesday, January 24, 2007

Digital pictures

All my digital pictures are renamed using the following command
jhead -autorot -n%Y_%m_%d_%H_%M_%S *.JPG
After this renaming, a web album for local use can be created using JAlbum.

For global use Flickr can be used

If you are looking for a new digital camera, be sure to have a look at dpreview

Start

This is the first posting in a blog about Linux. I want gather all kinds of tips and trics, especially about ubuntu linux