Anders Andreasen's Blog

Setting up CentOS 5.4 for laptop/desktop use (work in progress)

December 16, 2009 · Leave a Comment

This post list my experience with the post-installation configuration of CentOS 5.4 for desktop usage on my laptop.

SELinux

If not already done during installation I suggest to turn off SELinux especially if you want to use wine (you do if you want to use google picasa). To do this follow the screen shots below

Adding user to sudoers

The first thing to do is to add yourself to the wheel group by editing /etc/group.Do the following:

su

gedit /etc/group

Change the following line:

wheel:x:10:root

to

wheel:x:10:root,useralias

where useralias is to be substituted with your real username. Next edit the sudoers file by excuting the visudo command:

/sbin/visudo

comment out the following line

# %wheel ALL=(ALL) ALL or

#%wheel ALL=(ALL) NOPASSWD: ALL without prompting for password every time the sudo command is run

Next thing to do is to install additional repositories in order to get additional software not present in the official CentOS repos. The additional packages are required for wireless networking, vpn, non-free stuff like adobe reader, flash plug-in, vlc, codecs, TrueType fonts etc. etc.

Additional repos

The CentOS wiki is a good ressource for setting up additional repos. Here’s a brief summary of what I added

  1. DAGs repository for CentOS5. Do the following:

    sudo rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

    sudo rpm -ivh http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

  2. Extra Packages for Enterprise Linux (EPEL)

    sudo rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

  3. Adobe respository for Adobe reader and flash

    sudo rpm -ivh http://linuxdownload.adobe.com/linux/i386/adobe-release-i386-1.0-1.noarch.rpm

Now applications from additional repos can be installed from the PackageManager or from the command line using yum

Wireless networking

CentOS 5 does not come with support for the Intel PRO/Wireless 3945ABG in my laptop. The steps required to get wire less networking up with this particular hardware is well described elsewhere(howtoforge). Once the RPMforge repo has been added as described above do

yum install ipw3945d ipw3945-firmware dkms dkms-ipw3945 wpa_supplicant

In contrast to what is described on howtoforge I like the gnome network-manager tool so instead of turning it off (as in the tutorial) I have turned it on

chkconfig NetworkManager on .

I messed a little around with the wireless stuff, but I actually think that the two steps described here should do the trick. Verify that the file /etc/sysconfig/network-scripts/ifcfg-wlan0 looks something like this

# Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection

DEVICE=wlan0

BOOTPROTO=dhcp

ONBOOT=no

HWADDR=00:00:00:00:00:00 # Insert actual MAC address

The MAC address for the wlan0 (or what ever suits your particular hardware e.g. eth1 or something) do

[ada@localhost ~]$ /sbin/ifconfig wlan0

wlan0 Link encap:Ethernet HWaddr 00:1C:BF:02:19:14

inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0

inet6 addr: fe80::21c:bfff:fe02:1914/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:1711 errors:1 dropped:249 overruns:0 frame:0

TX packets:1868 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:1252822 (1.1 MiB) TX bytes:361391 (352.9 KiB)

Interrupt:74 Base address:0x6000 Memory:df3ff000-df3fffff

Enabling VPN connection in the NetworkManager

In occasionally need to access my company network through a (Cisco) VPN connection. These are the steps required for setting up a VPN connection.

sudo yum install NetworkManager*

This should install the following package (and some dependencies)

NetworkManager.i386 1:0.7.0-9.el5 installed

NetworkManager-devel.i386 1:0.7.0-9.el5 installed

NetworkManager-glib.i386 1:0.7.0-9.el5 installed

NetworkManager-glib-devel.i386 1:0.7.0-9.el5 installed

NetworkManager-gnome.i386 1:0.7.0-9.el5 installed

NetworkManager-openvpn.i386 1:0.7.0-18.svn11.el5.3 installed

NetworkManager-pptp.i386 1:0.7.0-2.svn16.el5 installed

NetworkManager-vpnc.i386 1:0.7.0.99-1.el5.4 installed

Now your VPN connection can be set-up by clicking the small NetworkManager applet and choosing “VPN connections” ->”Configure VPN”

Installing Citrix Receiver (ICAClent)

  1. Go to http://www.citrix.com and download the rpm package choose to “Open with” /usr/bin/system-install-packages (Software installer), it should handle a few depencies (OpenMotif).
  2. run:sudo mozilla-plugin-config && mozilla-plugin-config

Setting up multimedia

This step is well described on the CentOS wiki. The steps are (tanks to Sklav)

  1. Disabel the EPEL respository in PackageManager (Applications menu -> Add/Remove Software) by choosing Edit and unchecking the EPEL repository. This is due to conflicts between RPMForge and EPEL.
  2. sudo yum install flash-plugin
  3. yum install libdvdcss libdvdread libdvdplay libdvdnav lsdvd mplayerplug-in mplayer compat-libstdc++-33 flash-plugin gstreamer-plugins-bad gstreamer-plugins-ugly vlc

  4. cd /tmp && wget www1.mplayerhq.hu/MPlayer/releases/codecs/mplayer-codecs-20061022-1.i386.rpm
  5. sudo rpm -ivh mplayer-codecs-20061022-1.i386.rpm
  6. wget www1.mplayerhq.hu/MPlayer/releases/codecs/mplayer-codecs-extra-20061022-1.i386.rpm
  7. sudo rpm -ivh mplayer-codecs-extra-20061022-1.i386.rpm

Applications I find useful

  1. Adobe Reader (sudo yum install AdobeReader_enu)t
  2. Xmgrace 2-d plotting (sudo yum install grace* )
  3. GNU Octave (sudo yum –disablerepo=rpmforge install octave octave-forge hdf5)
  4. ImageMagick (sudo yum install ImageMagick*)
  5. Inkscape (sudo yum –disablerepo=epel inkscape) #inkscape exits with a segmentation fault for some reason if installed from the epel repo. However the version (0.46) in RPMforge seems to be wotking
  6. Dia (sudo yum install dia)

Installing additional software

Installing skype is done by the following steps (apparently the suggested method on the CentOS wiki is not working any longer), taken from Hackery

cd /tmp
wget http://www.skype.com/go/getskype-linux-beta-static
cd /opt
sudo tar jxvf /tmp/skype_static-2.1.0.47.tar.bz2
sudo ln -s skype_static-2.1.0.47 skype
# Setup symlinks (the first is required for sounds to work, the second is optional)
sudo ln -s /opt/skype /usr/share/skype
sudo ln -s /opt/skype/skype /usr/bin/skype

For installing RealPlayer, Opera, Google Earth and Google Picasa just follow the guidelines on howtoforge. When installed and run from the command line googleearth complains about the following

./googleearth-bin: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./libgoogleearth_lib.so)

./googleearth-bin: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./libbase.so)

A fix is provided here.

Other remarks

The thing that pushed me towards CentOS was the fact that I had some irritating issues with Fedora 12

  • For some reason when resuming from suspend/hibernate Xorg crashed leaving me with a new gdm login screen leading to a blank desktop with all my apps gone. I haven’t found a fix, according to the mailinglists/bugzilla the issue should have been resolved (but obviously its not). Worked out of the box in CentOS.
  • Too many updates
  • Couldn’t find a way to get CPU throttling to work i.e. the “On demand” mode. Whenever trying to force this mode I was always reverted to “Performance” i.e. full speed. No problem for workstation doing heavy calculations all the time, but for a laptop it’s really a nive feature. This worked out of the box in CentOS.

→ Leave a CommentCategories: GNU/Linux

Fedora 12. Probably the best GNU/Linux distro in the world?

December 5, 2009 · Leave a Comment


I have recently installed Fedora 12 on my computer (laptop). I have used Linux for many years, and my best experience has been with Debian derived systems like Debian itself, Ubuntu and Mint, so far. However, when I started out using Linux it was on RedHat 6.2, although I jumped the RedHat wagon after 8.0. Nevertheless, I thought it was a good time now to see the current state of the RedHat upstream development.
To jump to the conclusion rigth away, I really like Fedora 12. To be more specific:

  1. Installation was very easy just as easy as Ubuntu, in my opinion
  2. Very good and professional documentation
  3. The amount of scientific packages is very good. Numpy, Scipy and Matplotlib is included. Other useful apps: Xmgrace/Grace, Octave, DX, R, hdf5, maxima, paraview
  4. The Gnome NetworkManager comes with good stuff preinstalled e.g. vpnc (Cisco VPN client) and for some reason it seems to connect to my home router faster than on Ubuntu/Mint. Although this is only a subjective impression.
  5. Eclipse comes with many useful plugins e.g. pydev, valgrind. Unfortunately the eclipse sql explorer plugin is not one of them. However, installation is easy,
  6. Compiz works very well. It has caused me some trouble to make it work on OpenSUSE 11
  7. Gnote instead of Tomboy. I have never been a fan of .Net/Mono. Again this is my personal opinion
  8. The default configuration of Gnome is good, and pleasant
  9. YUM is very easy to use. Very much like APT. The yum history command is very useful

In order to get a full installation, even with applications such as Adobe Reader, VLC, Google Earth, Google Picasa, Skype, RealPlayer, I can recommend to go through the step-by-step guide on HowtoForge. It is extremely useful. Cadeau!

However, I have found a few things I do not like so much about Fedora 12, which has pushed me towards CentOS 5.4 instead

  • For some reason when resuming from suspend/hibernate Xorg crashed leaving me with a new gdm login screen leading to a blank desktop with all my apps gone (Intel MobileGMA 965). I haven’t found a fix, according to the mailinglists/bugzilla the issue should have been resolved (but obviously its not). Works out of the box in CentOS.
  • Couldn’t find a way to get CPU throttling to work i.e. the “On demand” mode. Whenever trying to force this mode I was always reverted to “Performance” i.e. full speed. No problem for workstation doing heavy calculations all the time, but for a laptop it’s really a nive feature. This works out of the box in CentOS.

The post is brought to you by lekhonee v0.7

→ Leave a CommentCategories: Computers · GNU/Linux · Python

Poor WiFi connection data performance with Intel PRO/Wireless 3945ABG Network Connection

August 20, 2009 · Leave a Comment

On my Lenovo T61 equipped with Intel PRO/wireless 3945ABG network card I have had an issue, a PITA to be more precise, for some time now. I have experienced very poor performance of the wireless networking when running Windows XP SP3, despite the fact that signal  strength was “excellent”  at a speed of 54 Mbit/s.

I tracked down the problem, after extensive searching on the internet, to be related to so-called “Power-save Polling”after reading an Intel note on the issue (PSP is described at TechRepublic in more detail, and also why PSP may be no good at all). The issue seems to appear when the wireless router does not properly support power-save polling. I have a Zyxel P-2602HW-D1A wireless router, and I have not been able to find any info on power-save polling for this hardware. So Intel may be correct that the router does support this feature.

In order intelto disable power-save polling on the Intel wireless adapter go to   Control Panel -> Network Connections -> (Right click) Wireless Network Connection -> Properties  and press the “Configure” button for the wireless adapter.  In the “Advanced” tab choose the “Power management” property and set the slider to the highest value for maximum performance i.e. no PSP. This certainly did the trick (at least temporarily) – I could now browse the internet at full speed. However, my new found happiness was soon spoiled when I realized that the problem resurfaced after some time (actually after being in standby mode etc.). After reopening the previous configuration utillity I could also see that the power management had been reset to the lowest value (i.e. PSP on). I guessed it might be related to some kind of power save management between win XP and the Intel driver (since the issue never occured when running Ubuntu 9.04). Nevertheless, I could not find any configuration for this particular “feature” literally driving me nuts. I noticed that I had the Lenovo ThinkVantage Power Manager installed. After removing this everything worked fine, and my settings was not reset after standby. Btw. the driver for the Intel adapter is version 12.4.0.21. Updating the driver did not make any difference.

→ Leave a CommentCategories: Computers

Perspective in Science Mag

July 18, 2009 · Leave a Comment

norskov_science

Nørskov et al. recently wrote a perspective in Science Magazine entitled “Rate Control and Reaction Engineering“  with a short description “A concept for evaluating. the relative importance of steps in complex reactions may guide the development of better catalysts”. The article also addresses our recently published paper “Degree of Rate Control: How Much the Energies of Intermediates and Transition States Control Rates” in JACS. Thanks guys!

→ Leave a CommentCategories: Catalysis · Kinetics · Modelling · Research

JACS cover: Degree of Rate Control: How Much the Energies of Intermediates and Transition States Control Rates

June 10, 2009 · Leave a Comment


The paper “Degree of Rate Control: How Much the Energies of Intermediates and Transition States Control Rates” co-authored with Carsten Stegelmann and Charles T. Campbell has finally been published in Journal of the American Chemical Society. The full citation info is:

Degree of Rate Control: How Much the Energies of Intermediates and Transition States Control Rates,
Carsten Stegelmann, Anders Andreasen, Charles T. Campbell Journal of the American Chemical Society 2009 131 (23), 8077-8082 DOI: 10.1021/ja9000097

As an additional honor our graphich has been selected for the cover page.

→ Leave a CommentCategories: Catalysis · Kinetics · Modelling · Research

Ubuntu VPN revisited

June 2, 2009 · Leave a Comment


Previously I posted how to install and configure the Cisco VPN client on linux. However an easier method exists also benefitting from being integrated into the network-manager. What you do is

  1. Install the vpnc (cisco compatible vpn client) and the network-manager interface/plugin for vpnc: sudo apt-get install vpnc network-manager-vpnc
  2. In System->Preferences->Network Connections choose the VPN tab
  3. In order to import connection settings from a Cisco VPN *.pcf file click the “import” button and localize your pcf-file. Otherwise fill in your connection settings manually by pressing the “Add” button.
  4. Before being able to connect through VPN I have experienced that a reboot is necessary. I don’t know the exact reason for this. There may be other issues preventing the VPN connection from working properly – see the bug report
  5. After reboot pres the network-manager icon, by choosing VPN connections, your newly created connection should be there. Click connect and after a while you should be connected.
  6. If something fails it is always possible to connect manually. Edit /etc/vpnc/example.conf to reflect your connection settings and save it with a different name e.g. MYVPN. Connect by executing vpnc-connect MYVPN in a terminal.

→ Leave a CommentCategories: Uncategorized

Getting Skype up and running on Ubuntu 9.04

May 26, 2009 · Leave a Comment

After having downloaded Skype for Ubuntu (ver. 2.0.0.72-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):

  1. killall pulseaudio
  2. sudo apt-get remove pulseaudio
  3. sudo apt-get install esound
  4. sudo rm /etc/X11/Xsession.d/70pulseaudio
  5. reboot

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:

That did it. Now I have Skype working (haven’t tried video yet – but the internal web-cam captures just fine, so I guess it should work out of the box).

→ Leave a CommentCategories: Uncategorized

My life with Ubuntu 9.04: VPN and Citrix Receiver

May 26, 2009 · 2 Comments

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.).

VPN
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:

  1. wget http://www.mcmaster.ca//uts/network/software/vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
  2. tar xzvf vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
  3. cd vpnclient
  4. sudo ./vpn_install
  5. /etc/init.d/vpnclient_init start (loading vpn client module into kernel)
  6. Copy an existing VPN profile *.pcf to /etc/CiscoSystemsVPNClient/Profiles
  7. Fire up the vpnclient: vpnclient connect YOURPROFILE

Citrix Receiver
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.

→ 2 CommentsCategories: Uncategorized

Fix: Time off in evolution mail client on Ubuntu 9.04

May 26, 2009 · Leave a Comment


Having just installed Ubuntu 9.04 on my home laptop, I wanted to import my Google Calendar (see this tutorial). It worked like a charm, however all my appointments from my Google Calendar where off by 2 hours.
It turned out that despite specifying the correct time zone (Copenhagen/Europe) during installation of Ubuntu, Evolution was still set to UTC. The fix is really easy:

  1. Open Evolution
  2. Goto Edit -> Preferences
  3. Change the timezone from UTC to whereever you are located

→ Leave a CommentCategories: Uncategorized

Degree of Rate Control: How Much the Energies of Intermediates and Transition States Control Rates

April 12, 2009 · Leave a Comment

Recently I co-authored a paper with Carsten Stegelmann and Charlie Campbell. I have the pleasure to announce that the paper has just been published as an ASAP article in the Journal of the American Chemical Society (doi:10.1021/ja9000097). In Nature Magazine a Research Highlight by Gavin Armstrong is addressing the publication.

Here’s the abstract:

For many decades, the concept of a “rate-determining step” has been of central importance in understanding chemical kinetics in multistep reaction mechanisms and using that understanding to advantage. Yet a rigorous method for identifying the rate-determining step in a reaction mechanism was only recently introduced, via the “degree of rate control” of elementary steps. By extending that idea, we argue that even more useful than identifying the rate-determining step is identifying the rate-controlling transition states and the rate-controlling intermediates. These identify a few distinct chemical species whose relative energies we could adjust to achieve a faster or slower net reaction rate. Their relative energies could be adjusted by a variety of practical approaches, such as adding or modifying a catalyst, modifying the solvent, or simply modifying a reactant’s molecular structure to affect electronic or steric control on the relative energies of the key species. Since these key species are the ones whose relative energies most strongly influence the net reaction rate, they also identify the species whose energetics must be most accurately measured or calculated to achieve an accurate kinetic model for any reaction mechanism. Thus, it is very important to identify these rate-controlling transition states and rate-controlling intermediates for both applied and basic research. Here, we present a method for doing that.

→ Leave a CommentCategories: Uncategorized