Wink Saville’s Blog

December 15, 2007

Eclipse – install

Filed under: Android, Eclipse, linux, programming — wink @ 3:37 pm

To install Eclipse you need to install sun-java, the gcj version installed in Ubuntu 7.10 isn’t capable of fully supporting Eclipse. What I did was install sun-java-6-* via synaptic, but of course its not that simple.

I installed all of the sun-java6-* files via synaptic, of course that didn’t install flawlessly as you need to download jdk-6-doc.zip from here selecting download for “Java SE 6 Documentation” which was here (you need to “Accept the license agreement”) and place it in /tmp/. Next I downloaded Eclipse from here and untar’d it into /usr. I then setup a symbolic link from /usr/local/bin/eclipse to /usr/eclipse/eclipse, the I ran ecplise. It boots but said “Error creating the view”. I did a little searching, turns out had the wrong jvm. I needed to uninstall java-gc-compat and create a symbolic link from /etc/alternatives/java to /usr/lib/jvm/java-6-sun/bin/java. Then it finally ran!

The short list of instructions:

*) Download Eclipse I chose “Eclipse Classic 3.3.1.1″.
*) Download jdk-6-doc.zip and place in /tmp/
*) Uninstall java-gcj-compat via synaptic or apt
*) Install all sun-java-6-* via synaptic or apt
*) Besure there is a symbolic link from /etc/alternatives/java -> /usr/lib/jvm/java-6-sun/bin/java

sudo ln -sf /usr/lib/jvm/java-6-sun/bin/java /etc/alternatives/java

*) Untar Eclipse into /usr (creates /usr/eclipse/)

cd /usr
sudo tar -xvf ~/downloads/eclipse-SDK-3.3.1.1-linux-gtk-x86_64.tar.gz

You should now be able to run eclipse and the Welcome screen should appear, if you drop right into Eclipse and a warning that you couldn’t create a view then you’re executing the wrong jvm. Start by using the comand:

wink@ic2d1:$ which java
/usr/bin/java
wink@ic2d1:$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 2007-12-04 09:55 /usr/bin/java -> /etc/alternatives/java
wink@ic2d1:$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 32 2007-12-04 20:59 /etc/alternatives/java -> /usr/lib/jvm/java-6-sun/bin/java
wink@ic2d1:$ ls -l /usr/lib/jvm/java-6-sun/bin/java
lrwxrwxrwx 1 root root 15 2007-12-04 17:53 /usr/lib/jvm/java-6-sun/bin/java -> ../jre/bin/java
wink@ic2d1:$ ls -l /usr/lib/jvm/java-6-sun/jre/bin/java
-rwxr-xr-x 1 root root 50650 2007-09-24 23:34 /usr/lib/jvm/java-6-sun/jre/bin/java

As you can see on my machine there are several links before getting to the actual executable.

December 13, 2007

scm – Build ID’s

Filed under: linux, programming, scm — wink @ 10:21 pm

A BuildID is being added to the gnu linker, ld, by Roland McGrath. I saw this mentioned in these instructions for building the Android kernel from source, which didn’t support the new switch and it had to be disabled.

Anyway, Roland had a problem where he wanted to identify exactly where the binaries came from when inspecting a post-mortem dump. Especially when the dump could have happened long after the build was actually done. While at nxp we had this problem and generally relied upon the svn release number. That worked but isn’t actually unique enough especially when a particular build might be one by a developer and not an official release.

Anyway, this looks to be a possible solution

Linux – nfs mounting

Filed under: linux — wink @ 7:06 pm

I had a little trouble doing an nfs mount today. I wanted to mount a directory on my laptop onto my desktop so I could do some backups. I modified /etc/exports on my laptop, which has successfully exported nfs mount file systems for a long time, by having /etc/exports be:

/home/wink *:(rw,no_root_squash,no_all_squash,sync,nohide)

Then on my destop I did:

mkdir mntdir
sudo mount 192.168.0.1:/home/wink mntdir

But this didn’t work it generated an error saying I was stupid:)  After trying a bunch of permutations I did some google searching and found this. Turns out that on my desktop I didn’t have portmap or nfs-common installed. After installing them all was well, and the above mount worked.

December 2, 2007

Getting GEFORCE 7600 working on Ubuntu 7.10

Filed under: linux, ubuntu — wink @ 2:07 am

I had a heck of a time trying to get this to work every time I tried to enable the restricted driver so I could run the enhanced UI all that would happen when rebooting is I’d get a message indicating that we were going to use Low-Resolution.

Things got disparate when I brought my two Dell’s from NXP home and wanted to hook them up to my linux box. So I searched the net and ran across Alberto Milone’s Envy package. To get the enhanced UI going I needed to install xserver-xgl.

sudo apt-get install xserver-xgl

This was found when executing compiz from the command line and an error is seen “Xgl: not present”. After installing I still have a couple of complaints; first X thinks the display is 3200×1600 and tends to put things in the middle of the display. Secondly, the menu bars at the top and bottom extend across both screens. On windows the system understands that there are two screens and it works better.

November 11, 2007

Reduce disk activity

Filed under: linux — wink @ 6:30 pm

Many times my laptop is continuously accessing the hard disk. The cause appears to be two fold. First updatedb is run by the daily cron job. Since I don’t use locate very often and I turn of my computer everyday everytime I turn on the computer updatedb is run and it hammers the disk drive.

To disable updatedb I made /etc/cron.daily/slocate non executable

sudo chmod -x /etc/cron.daily/slocate

The second is an apparent bug in hard disk drives that have smart control, see here, here, and here. An easy solution for me was to just create/add to /sbin/setup.sh:

#!/bin/sh
smartctl -s on /dev/hda
hdparm -B 255 /dev/hda

November 10, 2007

Building kernel for hp zv5000

Filed under: linux — wink @ 8:12 am

Actually, building the kernel wasn’t hard. I cloned linus’ tree then used the existing configuration from /boot as the starting point. I then enabled keyspan support and oprofile, but it wouldn’t boot.

The problem was I needed to have an initrd image, after several tries it turns out with ubuntu there is a script, update-initramfs that does the trick. I ran

update-initramfs -c -v -k 2.6.24-rc2

This command built the image and put it in /boot, I then updated /boot/grub/menu.list to:

title Ubuntu 7.10, kernel vmlinuz
root (hd0,0)
kernel /boot/vmlinuz root=UUID=90ea4e0b-25cb-4fce-8b06-7f9b318ae304 ro single
initrd /boot/initrd.img-2.6.24-rc2

That did the trick.

September 7, 2007

Putty is slow to prompt for password

Filed under: linux — wink @ 1:48 am

Putty is sometimes slow to prompt for the password, today I finally determined what the problem was, it is apparently doing a reverse dns lookup when I ssh into an address and of course a 192.168.0.133 can’t be found. I fixed it by adding entries for the c:\windows\system32\drivers\etc\hosts for myself and the other computer.

127.0.0.1 iris2
192.168.0.103 iris2
192.168.0.133 ic2d1

I discovered this because I was playing around with the simple webserver.py from and it was taking 5 seconds to respond. Using google I searched for:

BaseHTTPRequestHandler send_response slow

And looked at the first entry which was:

http://trac.edgewall.org/ticket/3481

Here they explained that trac could also be slow because of reverse dns lookup. After some searching I figured out that /etc/hosts was used for local lookups so I added an entry for 192.168.0.103 iris2 and 192.168.0.133 ic2d1. This resolved the issue for the webserver. It then dawned on me that this might also be the problem on Putty.

I searched on google for:

windows xp hosts

And found this:

http://www.accs-net.com/hosts/how_to_use_hosts.html

Which says that the hosts file is in c:\windows\system32\drivers\etc. Well there was no such file, so I added it and sure enough, that fixed Putty.

« Newer Posts

Powered by WordPress