Archive for the ‘Ubuntu’ Category
I have had trouble keeping my vpn connection alive when connecting to the internal net of my company through the vpnc client. Usually I can be connected for, say, 5-10 min and then vpnc disconnects. I found out that by ticking the “disable dead per detection” box helped a lot. Goto “System -> Preferences -> Network Connections” choose the VPN pane and click “Edit”.
If vpnc is started from the command line do the following to disable dead peer detection
vpnc --dpd-idle 0
Once I disabled DPD I have been able to keep the vpn connection alive without disconneting for several hours. Btw
vpnc version 0.5.3
Copyright (C) 2002-2006 Geoffrey Keating, Maurice Massar, others
vpnc comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of vpnc under the terms of the GNU General
Public License. For more information about these matters, see the files
Built without openssl (certificate) support.
Supported DH-Groups: nopfs dh1 dh2 dh5
Supported Hash-Methods: md5 sha1
Supported Encryptions: null des 3des aes128 aes192 aes256
Supported Auth-Methods: psk psk+xauth
In my previous post I described how to use OpenOffice Base as a MS SQL server GUI front-end. On some occasions I have experienced OObase to hang when executing queries or otherwise communicating with the SQL server. For a more professional experience the Oracle SQL developer can be used instead. Oracle SQL developer can be downloaded free-of-charge from the Oracle website.
Download and install Oracle SQL developer
- Goto Oracle website
- Accept the license agreement
- Unless you have an rpm based distribution choose the Oracle SQL Developer for other platforms(this will be assumed throughout this how-to)
- Unzip the downloaded zip archive to e.g.
/usr/local. Assuming pwd is the directory to which Oracle SQL developer was downloaded to
sudo unzip sqldeveloper-22.214.171.124.45-no-jre.zip -d /opt
- sqldeveloper can be started by the command
sh /opt/sqldeveloper/sqldeveloper.shFor convenience an alias can be added to .bashrc e.g.
alias sqldeveloper='sh /opt/sqldeveloper/sqldeveloper.sh'
Install jTDS JDBC driver
As with OOBase the jTDS JDBC driver is required for connecting to MS SQL server. Here’s how-to make it work.
- If not already downloaded, download the latest JDBC driver from sourceforge
- Unpack the archive and copy the
jtds-1.2.5.jarinto your java environment. On ubuntu 9.10 with Sun Java this is somewhere like
/usr/lib/jvm/java-6-sun-126.96.36.199/jre/lib/ext/This should enable Oracle SQL developer to locate the driver
- Start sqldeveloper. You should see the following screen
- Click the big green plus in the connections pane and the following window will pop-up
- If, for some reason, the (MS) SQLserver pane/entry is not there (only the Oracle) them the jTDS JDBC driver was not successfully loaded (perhaps copied to the wrong destination). The JDBC driver can be installed manually by choosing Preferences in the Tools menu
Click “Add enty” and located the jtds-1.2.5.jar file on your system
- Enter the address of the MS SQL server and your log-in credentials and you’re ready to go. Read more in the documentation on the Oracle website
I was trying to use pydb with ddd in order to debug a python script. However when invoking ddd with e.g.
ddd clamied that it could not find pydb. I tried running pydb from the command line and I was left with a message like
The program 'pydb' is currently not installed. You can install it by typing:
sudo apt-get install pydb
pydb: command not found
Ok, so I tried to install it
sudo apt-get install pydb
Reading package lists... Done
Building dependency tree
Reading state information... Done
pydb is already the newest version.
Hmmm, strange. Google, google, google……….
It turned out that some else had experienced the same problem as me and provided a fix. Apparently the link to pydb in /usr/bin is broken. The fix is
sudo rm /usr/bin/pydb
sudo ln -s /usr/lib/python2.4/site-packages/pydb/pydb.py /usr/bin/pydb
Note: I just checked that the procedure (svn) given below also works for Ubuntu 10.10, and it does.
Here’s a brief description on how I managed to compile and install cantera 1.8 on Ubuntu 9.10 (32 bit), with the full python interface. However, first a little description of what cantera is (taken from the website):
Cantera is a suite of object-oriented software tools for problems involving chemical kinetics, thermodynamics, and/or transport processes.
Cantera is written in C++, and can be interfaced also from python, matlab and Fortran.
- First step is to install any dependencies. This is handled by apt-get:
sudo apt-get install subversion g++ gfortran python2.6-dev python-numpy libsundials* graphviz
- Next step is to get the source for cantera. This can be done by either downloading the cantera-1.8.0-beta-tar.gz from the cantera site our checking the latest version from svn
svn checkout http://cantera.googlecode.com/svn/cantera18/trunk/ cantera
- change to the cantera directory (either the svn checkout or the untarred/gunzipped cantera-1.8.0)
- Edit the file named preconfig and make sure the following lines are included by uncommenting/editing
- The entire preconfig file can be viewed here
- then in a terminal run the following commands
sudo make install
- If everything went well you should be able to import the Cantera module in python:
>>>from Cantera import *
Her følger en kort gennemgang hvordan jeg har fået Huawei E1752 3G usb modem til at virke under Ubuntu 9.10 med Telenor mobilt bredbånd.
- Første skridt er at aktivere modem med PUK kode og sætte PIN kode (se vejledningen som fulgte med eller her). Dette kan gøres under Windows, hvis man har dette tilgængeligt. Det skulle efter sigende også kunne gøres ved at sætte kortet i en mobiltelefon, men har dog ikke prøvet det.
- Under Ubuntu er det nødvendigt at installere pakken usb-modeswitch,som findes i universe. Dette kan gøres i terminal med komandoen
sudo apt-get install usb-modeswitch
- Derefter skal
usb_modeswitch.confkonfigurationsfilen redigeres (findes under
/etc)og følgende indsættes (opskrift fundet andetsteds)
# Huawei E1752
- Indsæt modem i usb port
- Under System -> Indstillinger (Preferences) vælges “Network connections” og vælg Tilføj/Add (ignorer forbindelsen som allerede eksisterer i screendumpet)
- Hvis modemet ikke figurerer i næste skærmbillede, så kør da kommandoen
- Derfefter skulle modemet gerne figurere
- Vælg forward/videre og vælg land: Danmark
- Vælg Sonofon som udbyder
- Fra næste skærmbillede videre
- Indtast pin-kode i næste skærmbillede og Apply/Anvend
- Herefter skulle den nyoprettede mobile bredbåndsforbindelse optræde når der klikkes på netværksikonet
Der kan åbenbart være problemer med at se modemet efter standby/suspend, hvorefter det kan være nødvendigt at køre ubs_modeswitch kommandoen igen
After having downloaded Skype for Ubuntu (ver. 188.8.131.52-1) 9.04 and installed it, I found a problem when trying to make a test call. Skype simply displays a message saying “Problem with audio playback”. I found a solution to this problem on the blog of Kholid Fuadi. In brief the solution is (in a shell):
- killall pulseaudio
- sudo apt-get remove pulseaudio
- sudo apt-get install esound
- sudo rm /etc/X11/Xsession.d/70pulseaudio
That brought me one step further in getting Skype to work. The next problem appearing was the fact that the internal microphone did not capture any sound/voice. Btw my laptop is equipped with an Intel AD1984HD codec device. I found a comprehensive step-by-step guide at Mage Blog.
Start alsamixer (from a shell). Turn up the gain on everything except those named something with “boost”. Press tab and turn up the gain on the capture devices. The input source is set to “internal” (in case you don’t plug in a mic in the mini-jack port).
In System -> Preferences -> Sound i have used the following settings
Play around with the setting e.g. make a test recording with the Sound Recorder in order to verify that the capture device is working properly. In Skype I found it necessary to also specify the input device manually:
I have been using linux the last 8 years with different flavors (RedHat, Debian Gentoo, Suse). Personally I like the Debian based distros the best.
Now time has come that I wanted to install Ubuntu 9.04 on my home laptop. I have noticed all the buzz around this “relatively” new distribution and how easy it is to install/use and now I wanted to see it with my own eyes. The installation was like a breeze and everything was easy to set up (WLAN, audio, additional plugins like flash, java, Adobe reader etc.).
Since I work from home from time to time I need to access the internal network at work using a VPN connection (to a Ciscoserver). I found the tutorial at McMaster University for installing Cisco VPN client on linux very useful. See the tutorial yourself, however the steps are basically:
- wget http://www.mcmaster.ca//uts/network/software/vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
- tar xzvf vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
- cd vpnclient
- sudo ./vpn_install
- /etc/init.d/vpnclient_init start (loading vpn client module into kernel)
- Copy an existing VPN profile *.pcf to /etc/CiscoSystemsVPNClient/Profiles
- Fire up the vpnclient: vpnclient connect YOURPROFILE
In order to connect to the Citrix MetaFrame XP I installed the Citrix Receiver from http://www.citrix.com/English/SS/downloads/details.asp?downloadID=3323. I downloaded the tar.gz file and followed the instructions . It seems as if the Citrix Receiver automatically adds itself to the firefox plugins.