Least Action

Nontrivializing triviality..and vice versa.

Archive for the ‘Technology’ Category

Ubuntu 11.04 Natty Narwhal 64-bit Guide Part 2 – Installing GNOME3

leave a comment »

In this post, we are going to install GNOME3.

Step 1: Make sure you got Unity to work. This is very important. We don’t want to install Gnome3 on an ailing system.

Step 2: Update everything, if not already one in Part 1.

sudo apt-get update
sudo apt-get upgrade
sudo reboot

Step 3: Install GNOME3

sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install gnome-shell gnome-session
sudo apt-get -f install
sudo apt-get install gnome-shell
sudo apt-get install gnome-session
sudo apt-get remove gnome-accessibility-themes
sudo apt-get install gnome-themes-standard
sudo apt-get install -f

Step 4: Now, reboot your system.

sudo reboot

And then, log into the session named ‘GNOME’. If everything worked out alright, you should be in GNOME3.

The gnome-tweak-tool lets you make minor modifications to the way the Gnome Shell looks/interacts. In a subsequent post, we will look at various customizations that are possible.


1. http://ubuntuforums.org/showpost.php?p=10734567&postcount=1. Read this for a detailed description of all the steps.


Written by Vivek

June 1, 2011 at 14:29

Posted in Linux, Technology

Ubuntu 11.04 Natty Narwhal 64-bit Guide Part 1

leave a comment »

This is meant to be a record of all that I did to customize Ubuntu 11.04 Natty Narwhal 64-bit on my self-assembled desktop (Core i7 920, 6 GB Corsair TR3X6G1600, Gigabyte EX58 Extreme, NVIDIA GTX295) and my laptop (Dell XPS 15 L501x: Core i7 740 QM, 6GB DDR3 RAM, NVIDIA GT435M, 1920×1080 dp HD screen). It is mostly unoriginal, and credits have been given where they are due to various sources on the internet.

First of all, I strongly recommend a fresh install. There are lots and lots of threads out there with people posting problems after problems with upgrades from Maverick Meerkat 10.10. Typically most of you will need to back up your home directory $HOME (or ~/). You can just create a tarball and save it to a USB drive or a CD. If you’re an expert/intermediate user who knows what the stuff in all those ‘hidden’ directories beginning with a . is, then you probably won’t need to do that either.

After a fresh install, the first thing to do is to get the latest updates

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo reboot

The first updates will take a long time. You can also use the update-manager. In this post, I will always provide command line interface (CLI) solutions, as I don’t care much for GUIs. But they have their advantages, and if you are more comfortable with GUIs use them instead. There will be some instances where you’ll need to be familiar with the CLI (e.g. if you’re installing accelerated NVIDIA drivers, or if X windows fails to load).

Installing proprietary accelerated NVIDIA Drivers

When you first boot into Natty, you will most likely get a message indicating that your hardware is not capable of running Unity, and that you will be taken to the classic GNOME interface. This is because by default, restricted drivers are not installed. To install restricted drivers, click on the System menu, and select ‘Additional Drivers’ under Administration (System -> Administration -> Additional Drivers). Your window will look a little like this:

Additional Drivers - NVIDIA

You will most likely see two entries – we’re interested in the first one. I have taken a screenshot after installing these drivers, and then switching to drivers downloaded directly from NVIDIA. Most people will not require this, unless they intend to program in CUDA. Anyway, activate the first entry on the list. This will download and install the restricted driver. Now, reboot your system. You should be able to boot into Unity. This will be our starting point.

Installing Sun Java

By default, Natty comes with Open JDK. I prefer Sun’s JDK/JRE. To install it, type

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

To use Sun’s Java, you’ll probably have to change the default java version using

sudo update-alternatives --config java

There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                      Priority   Status
  0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
* 2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode

Press enter to keep the current choice[*], or type selection number:

Pick option 2 (or the one which does not correspond to OpenJDK). To confirm that the change occurred, type

java -version

You should see something like

 java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)</pre>

Install JDownloader (optional)

JDownloader is a Java-based download manager, which in my experience, is more reliable than many other download managers I’ve used. To download and install JDownloader, type

sudo add-apt-repository ppa:jd-team/jdownloader
sudo apt-get update
sudo apt-get install jdownloader

Installing proprietary NVIDIA drivers from http://www.nvidia.com

Power users, especially programmers, will find it necessary to have support for additional libraries such as CUDA. The drivers we just installed above do not provide CUDA support (at the time of writing). But NVIDIA provides Linux drivers, and they can be downloaded from http://www.nvidia.com/Download/index.aspx?lang=en-us.

To install this driver, log out of Gnome/Unity, and at the graphical log-in screen press Ctrl+Alt+F1 to switch to console mode. Then, type

sudo service gdm stop

Then, navigate to the directory containing the nvidia driver .sh file, and type

sudo sh ./filename.sh

Follow the on-screen instructions. Reboot the system. You should see an NVIDIA splash screen before the log-in screen. Note that you may have to do this a couple of times for it to work.

Installing CUDA

Download the CUDA toolkit and SDK from http://developer.nvidia.com/cuda-downloads or http://developer.nvidia.com/cuda-toolkit-40#Linux. Add the following lines to $HOME/.bashrc

export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

Follow the installation instructions in the Getting Started guide: http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_C_Getting_Started_Linux.pdf

You will most likely face a bunch of errors, which can be resolved by reading an earlier post of mine: https://leastaction.wordpress.com/2011/01/25/cuda-on-ubuntu-maverick-meerkat-10-10/.

You will also have to update symbolic links:

sudo ln -s /usr/lib/libGL.so.xx.xx.xx /usr/lib/libGL.so

Note: Recent updates to xserver-org-core and xserver-common are likely to crash your Gnome3 and/or OpenGL configuration. To fix this problem, you have to also restore another symbolic link:

sudo mv /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so.orig
sudo ln -s /usr/lib/xorg/modules/extensions/libglx.so.270.41.06 /usr/lib/xorg/modules/extensions/libglx.so

The version 270.41.06 may have to be replaced by the version of the driver you are presently using. This can be determined by typing

nvidia-settings -v


1. http://www.multimediaboom.com/how-to-install-java-in-ubuntu-11-04-natty-narwhal-ppa/

2. http://www.webupd8.org/2010/04/install-jdownloader-via-ppa-repository.html

3. http://ubuntuforums.org/showpost.php?p=10883998&postcount=2

4. https://leastaction.wordpress.com/2011/01/25/cuda-on-ubuntu-maverick-meerkat-10-10

Written by Vivek

June 1, 2011 at 14:15

Posted in Linux, Technology

Use the Ubuntu Live CD to mount your local installation

leave a comment »

If you’re having trouble booting into Ubuntu, you can boot off the Live CD/DVD, and click on “Try Ubuntu”. Then, fire up a terminal window and type

sudo mount /dev/sdXX /mnt  (XX is where your installation is, e.g. sdb1)
sudo mount --bind /dev  /mnt/dev
sudo mount --bind /dev/pts  /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys
sudo chroot /mnt

These commands will mount your Ubuntu system in /mnt, and the last command will change the root directory to /mnt, so whatever commands you issue will now apply to your original Ubuntu installation (not the Live CD).

After you’ve diagnosed and repaired the problem, type

sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt

Written by Vivek

February 5, 2011 at 02:07

Posted in Linux, Technology

CUDA on Ubuntu Maverick Meerkat 10.10

with one comment

(To be edited)

If you’re getting errors like

/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGLU
/usr/bin/ld: cannot find -lX11
/usr/bin/ld: cannot find -lXi
/usr/bin/ld: cannot find -lXmu
/usr/bin/ld: cannot find -lglut

then you need to do the following

sudo apt-get install libxi libxi-dev

Running make again will result in the following errors:

/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGLU
/usr/bin/ld: cannot find -lXmu
/usr/bin/ld: cannot find -lglut

Now, let’s execute:

sudo apt-get install freeglut3 freeglut3-dev

This brings down the errors to

/usr/bin/ld: cannot find -lXmu

So, we just have to do one more apt-get:

sudo apt-get install libxmu6 libxmu-dev

If you get errors suggesting that your libcudart.so.1 is missing, it means your LD_CONFIG_PATH isn’t set right. To set it permanently, use

sudo ldconfig -v /usr/local/cuda/lib64/

on a 64-bit system and

sudo ldconfig -v /usr/local/cuda/lib/

on a 32 bit system.

Written by Vivek

January 25, 2011 at 22:49

CUDA on a Dell XPS 15 in Windows 7 64-bit

leave a comment »

I just figured out how to get NVIDIA CUDA to work on my laptop. You need to replace the generic Dell driver with this one:


You need to do a custom clean installation and make sure the PhysX box is checked.

I had to do some CUDA programming on the Windows partition, so now I have to figure out how to configure all my IDEs to work with CUDA. I will try and post detailed configuration info for Netbeans at least.

Written by Vivek

January 22, 2011 at 11:07

Ubuntu Maverick Meerkat 10.10 Screenshot

leave a comment »

Written by Vivek

November 18, 2010 at 09:31

Posted in Linux, Technology

Thermal Noise Engines

leave a comment »

I just stumbled upon an interesting paper today on arXiv, from a researcher at the Department of Electrical Engineering at Texas A&M University. I am copying the abstract entry on the pre-print archive below.

Thermal noise engines

Authors:Laszlo B. Kish
(Submitted on 29 Sep 2010 (v1), last revised 20 Oct 2010 (this version, v5))

Electrical heat engines driven by the Johnson-Nyquist noise of resistors are introduced. They utilize Coulomb’s law and the fluctuation-dissipation theorem of statistical physics that is the reverse phenomenon of heat dissipation in a resistor. No steams, gases, liquids, photons, combustion, phase transition, or exhaust/pollution are present here. In these engines, instead of heat reservoirs, cylinders, pistons and valves, resistors, capacitors and switches are the building elements. For the best performance, a large number of parallel engines must be integrated to run in a synchronized fashion and the characteristic size of the elementary engine must be at the 10 nanometers scale. At room temperature, in the most idealistic case, a two-dimensional ensemble of engines of 25 nanometer characteristic size integrated on a 2.5×2.5cm silicon wafer with 12 Celsius temperature difference between the warm-source and the cold-sink would produce a specific power of about 0.4 Watt. Regular and coherent (correlated-cylinder states) versions are shown and both of them can work in either four-stroke or two-stroke modes. The coherent engines have properties that correspond to coherent quantum heat engines without the presence of quantum coherence. In the idealistic case, all these engines have Carnot efficiency, which is the highest possible efficiency of any heat engine,without violating the second law of thermodynamics.

Direct Link: http://arxiv.org/abs/1009.5942

This is a very interesting paper. Who knows what the future has in store for us…quantum thermal power stations?

Written by Vivek

October 23, 2010 at 00:20