Category Archives: Natty Narwhal 11.04

[SOLVED] Netbeans svn error “Duplicate extensions not allowed, OPTIONS request failed on ‘path'”

I have installed sun-java-jre/jdk on my Ubuntu and Fedora. I am using svn for my project and have been running it well with my old Fedora 15 installation on my old PC. However, recently I installed Fedora on my other machine and installed Netbeans 7.0.1 on top of sun-java. Fedora did not handle graphics very well, so I installed Ubuntu alongside as well. But every time I tried to access subversion functionality from Netbeans, I got the following error:

org.tigris.subversion.javahl.ClientException: java.io.IOException: Duplicate extensions not allowed
OPTIONS request failed on ‘/relative/path/to/some/project/directory’

This happened in both of my newer installations, Fedora 15 and Ubuntu 11.04, both with Netbeans 7.0.1. I tried several things but all in vain. Finally, when searching for installed Java related packages in my old machine (where subversion always worked), I found the required package. The cryptic error message will simply stop appearing and Netbeans subversion will start working after the installation of svn client adapter for Netbeans. Here is how you can do it from the terminal:

For Fedora:

su -c 'yum install netbeans-svnclientadapter'

For Ubuntu:

sudo apt-get install libnb-svnclientadapter-java

Hope this helps.

[SOLVED] Blank dark screen after installing ATI Proprietary Drivers (fglrx) in Ubuntu 11.04 Natty Narwhal

Having video and sound issues with Fedora 15, I decided to try out Natty on my HP Pavilion G4 1009tx. Surprisingly, sound and 3D effects ran great with Intel onboard graphics so I installed it onto the Hard drive. In all excitement, I decided to try out proprietary ATI drivers for the switchable dedicated AMD Radeon HD 6470M graphics. However, when I rebooted, it would not boot. It seems that plymouth crashes and system ends up with a black screen. So, I decided to remove fglrx and keep on using Intel card but it seems that I can’t even boot into recovery mode. So, I had to remove fglrx and make the system usable again using the Live CD and chroot. Here is how I did it.

Note: If you are trying to get the fglrx to work, you should look somewhere else. I just removed fglrx and decided not to use it (for now at least).

First, I booted into the Live Ubuntu Desktop. Then, I opened the terminal and created a directory for mounting everything:

sudo mkdir /mnt/root

Then I mounted the root partition.

sudo mount /dev/sda7 /mnt/root

Please note that my installation’s root partition is /dev/sda7. In your case, it can be something else. Since I have a separate home partition (/dev/sda8), I mounted it too, just in case. You can skip this if you don’t have a dedicated home partition.

sudo mount /dev/sda8 /mnt/root/home

You should also mount other drives if you have dedicated partitions for other directories (for /boot perhaps?).

Then, I mounted other required directories.

sudo mount -o bind /dev /mnt/root/dev
sudo mount -o bind /proc /mnt/root/proc
sudo mount -o bind /sys /mnt/root/sys

Then, I chrooted to the mounted root:

sudo chroot /mnt/root

Now, I got into the root of my installed Ubuntu. Then I just had to run the following to remove fglrx:

apt-get remove fglrx

UPDATE 1:
(ignore this, see UPDATE 2 below)
After upgrading xserver-xorg-video-all, xserver-xorg-video-ati and xserver-xorg-video-radeon, the screen went blank again after reboot. So, I had to downgrade the packages by downloading from repos. Here is how you can do it too (I have included the packages in an archive, please note that you need an active Internet connection for the following):

dhclient
cd /tmp
wget http://www.khattam.info/wp-content/uploads/xserver-ati-old.tar.gz
tar xzvf xserver-ati-old.tar.gz
dpkg -i xserver-xorg-video-radeon_6.14.0-0ubuntu4_i386.deb xserver-xorg-video-ati_6.14.0-0ubuntu4_i386.deb xserver-xorg-video-all_1%3a7.6+4ubuntu3_i386.deb

UPDATE 2:
This blank screen issue would still reappear once in a while and the laptop would get very hot over prolonged usage, so I decided to go for a slightly different solution. I removedxserver-xorg-video-radeon and xserver-xorg-video-ati, blacklisted the radeon module and disabled it via vgaswitcheroo. Here is how I did it:
Remove ATI Radeon drivers:

apt-get remove xserver-xorg-video-ati xserver-xorg-video-radeon

Blacklist kernel module:
To disable kernel module, I opened the file /etc/modeprobe.d/blacklist.conf and add a line ‘blacklist radeon’. You can use nano to do this:

nano /etc/modprobe.d/blacklist.conf

Ctrl+O to save and Ctrl+X to exit nano.
Re-enable kernel module after startup and switch the card off:
To do this, I just added two lines before the line ‘exit 0’ in /etc/rc.local (you can use nano for this too) so that the file looks like the following:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

modprobe radeon
chown USERNAME /sys/kernel/debug/vgaswitcheroo/switch
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

exit 0

In the file above, USERNAME is my login username. Don’t forget to replace USERNAME with your username before saving the file. (If you are not sure what your username is, just do this: ls /home/, you should see it in the name of the directory.)

When done, I just exited from the chrooted environment:

exit

Then, I unmounted everything:

sudo umount -a

(You’ll see some error messages, like device is busy, just ignore them)

Now, I am able to boot into the installed Ubuntu again. Hope this helps.

[HOWTO] Install Linux Kernel 3.0 in Ubuntu 11.04 Natty Narwhal

Linux Kernel 3.0 RC 1 was recently released. Although it does not have real changes to anything, but is just a renaming of 2.6.40, however, you may want to install it for testing and using it if it works good for you in your Ubuntu Natty installation. It has bug fixes and additional drivers so it may solve problems. However, it may also introduce new problems, so be careful not to remove the other kernel (2.6.38) after installing it. This tutorial also contains instructions to remove it safely, so read along. Ubuntu 11.10 Oneiric Ocelot will be released with kernel 3.0.

As of writing this, only amd64 (64 bit version) of the kernel is available in Kernel PPA, so if you are using 32-bit, it will not work for you. However, if you find i386 builds in the kernel ppa, you can install it. (UPDATE: Now both 32-bit and 64-bit versions are available)

First of all, download the debs from Kernel PPA. Then install in this order:
linux-headers
linux-headers-generic
linux-image

Once installation is done, reboot and Ubuntu should boot into 3.0 by default. If everything works right, you may want to keep it, however, if it does not, don’t worry, just reboot and select one of the previous versions and boot into it. Then open up synaptic, search for linux-headers-3 and linux-image-3 and remove the 3.0 versions.

If you are reading this after other versions are released, you may want to check out kernel ppa.

[HOWTO] Setup a Live Testing Environment for Ubuntu Daily Builds right from the Harddisk

If you are keen about the changes in the next version of Ubuntu, 11.04 (Natty Narwhal), and want first hand experience, you can setup your own live testing environment which boots right from the harddisk. You can of course test the ISOs in Virtualbox, but if your card is not supported for Virtualbox 3D, you won’t be able to test the new Ubuntu Unity interface.

Requirements
Computer running Linux with Internet Access
The computer must have graphics card supported by default by Ubuntu

Assumptions
I am assuming you are running another copy of Ubuntu. If the instructions don’t actually fit with your system, feel free to do whatever applies to your distro.

Getting the latest CD Images
Ubuntu 11.04 Natty Narwhal is under heavy development. The CD images are updated daily for users and developers to test. They are available here. However, if you download full ISO images daily, you will be wasting a lot of data transfer and time. Instead, you can download the changes only using zsync. Here is how.

Open up the terminal and install zsync:

sudo apt-get install zsync

Now, go to the daily images page and look for .zsync files of the ISO you want to try. For instance, if you want to try Ubuntu 11.04 32bit, you will need the zsync file natty-desktop-i386.iso.zsync. Don’t download the zsync file though. You will just need the URL to the zsync file. To get that on Firefox, right click and click “Copy Link Location”.

Now, you will need a directory where you want to download the images. Create a directory and make sure about 2 GB of space is available in the drive. Then, just open up the terminal and change to that directory and type in the following:

zsync http://cdimage.ubuntu.com/daily-live/current/natty-desktop-X.iso.zsync

where X is one of amd64+mac, amd64, i386, powerpc+ps3 or powerpc.
(The second part of the above command is the link you copied in the above step.)

Now, whenever you wish to get the latest Ubuntu ISO image, just run the same command from the same directory and your ISO will be updated. zsync will download only the changed parts from the server and the download will require less data transfer and hence will be faster.

Setting it up to boot
When you have the latest ISO, you will need to test them by booting. As I mentioned earlier, you could use Virtualbox but it may not support your graphics card for 3D and hence testing Unity may not be possible. Another program you can use is “Startup Disk Creator” (also known as usb-creator-gtk), but it only lets you create USB disks. If you have USB disks and don’t mind writing lots of files to it on a daily basis (assuming you will be testing all the daily builds), you could use that. However, USB Flash drives are prone to failure if used in that way.
The program we are going to use is unetbootin. It allows you to setup booting ISOs right from the Harddisk. It is available in the repositories in most Linux distributions but the latest version may not have hit the repositories yet, so it is recommended to download it from the official page. But it is recommended to install the one from your repositories too so that the dependencies are installed.

Make it executable by doing a chmod +x or by right clicking the downloaded file and selecting properties and checking the “Allow executing file as program” in Permissions tab.

Now, launch unetbootin and select the DiskImage option (and not the distribution) and browse to locate the latest daily ISO you downloaded using zsync. Select Type as Hard Disk and Drive as / and click OK.

When done, reboot and hold on Shift when the computer just starts to bring up the Grub menu. In the Grub menu, select the “Unetbootin” entry (and not the other ones, they may not work).

To setup the latest downloaded ISO again, run Unetbootin and uninstall the existing entry and repeat the same process.

Note: If you are using this setup, skip any updates to grub.

Happy testing.

[SOLVED] Compiz text input problem in Ubuntu 11.04 Natty Narwhal Alpha 1

If you are using Ubuntu 11.04 Natty Narwhal Alpha, you may face compiz crashes. To recover from compiz crash, you can do a

compiz --replace

, but sometimes, you are not able to input text any more so doing that is not possible. Then, all you can do is restart the system. However, compiz can be restarted from other terminals. If you encounter a crash and are no longer able to input text, press Ctrl+Alt+F1 and login. Now, type in the following:

DISPLAY=:0.0 compiz --replace

Now, when you press Ctrl+Alt+F7, you will see that compiz has restarted and you can type text again. If some components (like unity) fail to load, bring up the terminal by pressing Ctrl+Alt+T and type in

compiz --replace

to load compiz again.

If it does not work, login to the terminal (Ctrl+Alt+F1-F6) and remove the compiz settings directory from your home directory. Here is how you do that:

cd
mv .compiz-1 compiz-old

Now, restart compiz:

DISPLAY=:0.0 compiz --replace

Hope this helps.

[HOWTO] Enable Alt+F2 in Ubuntu Natty 11.04 Narwhal Alpha 1

If you have installed Ubuntu Natty Narwhal Alpha 1, you will notice the new Unity interface and hence no Gnome Panel(s) anymore. Since “Run Application” dialog is a part of gnome-panel, it is not possible to enable the same “Run Application” dialog. If you wish, you can achieve that by running the gnome-panel, but this is not the recommended course of action if you wish to keep running unity.
So, the other way to make it work is to use third party run dialogs from repositories. One of the best run dialog is gmrun. It is available in Ubuntu universe repositories. Open up the terminal (by pressing Ctrl+Alt+T) and type in the following to launch Synaptic Package Manager:

sudo synaptic

Then, go to Settings>Repositories and Enable the Universe repository as shown below.

After having done that, close the repository window and synaptic. In the terminal, type in the following:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gmrun compizconfig-settings-manager

Now, lets launch compizconfig-settings-manager. Just type in the following in the terminal:

ccsm

Search for commands and enable it. Click on Commands to set commands and Key Bindings. In Command line 0, type in gmrun and in Key Bindings tab, click on the Disabled button and check Enable to Enable it. Press the Grab key combination button and press Alt+F2. In the dialog that pops up, click “Disable Run Applications”.

If all goes well, you can now press Alt+F2 and a “Run Program” dialog will pop up. You can use tab to complete fields and press Ctrl+R to search older run entries.

Hope this helps.

[HOWTO] Disable Unity Interface and restore original (classic) interface in Ubuntu Natty Narwhal

Unity interface is the default interface in Ubuntu 11.04 Natty Narwhal. It consists of the dock and launchers. However, if you don’t like the dock, animations and the interface as a whole, you can just disable it and login to Ubuntu Classic Desktop.

Logout and type in(or select) your username and in the bottom panel, select “Ubuntu Classic Desktop” instead of “Ubuntu Desktop Edition”. When you login next time, the same will be selected by default.

To re-enable Unity interface, just select “Ubuntu Desktop Edition” during login.

Compiz in November 27 daily build of Ubuntu 11.04 Natty Narwhal

I just used zsync to download the latest daily build of Ubuntu 11.04 Natty Narwhal. It features Ubuntu Unity Plugin for Compiz among other changes.

Compiz version is 0.9.2 and it features several plugins by default for functionality and effects. However, extra plugins are not available in current repository (0.8.6 version is available, which breaks 0.9.2)

Clicking the Workspace Switcher icon on Unity brings up Expo interface and it is easy to switch to another workspace and move windows between workspaces.

You can enable autohide in Unity by installing compizconfig-settings-manager:

sudo apt-get install compizconfig-settings-manager

After it is installed, you can launch it by pressing Alt+F2 to bring up the Run Application Dialog and then typing in ccsm.

The hidden unity dock can be brought back by putting mouse over the Ubuntu icon in the top left corner.

It also features a global menu (indicator-appmenu) which removes the menu bar from the applications and puts it up on the top panel. The menu shown is the menu of the application in focus. This feature is similar to Mac OS X. However, only GTK Applications are supported currently. This means, Openoffice and Firefox are not supported till date.

The current interface lacks an easy way to launch applications (it has to be done via Alt+F2 if compiz is enabled), compiz crashes a lot, sometimes when opening up Appearance Preferences, sometimes when changing compiz settings and sometimes just while doing something arbitrary.

Currently compiz in Natty is far from being perfect, but this is quite some change considering the fact that even the final relase is scheduled in April 28, 2011. The first alpha however, should arrive shortly and hope we see something better.

[SOLVED] Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.

I was trying to run Oracle Virtualbox in my Debian testing installation in which I have just installed Ubuntu Natty Kernel from Ubuntu repositories. I got an error followed by a dialog prompting me to run:
/etc/init.d/vboxdrv setup
as root.

However, it could not compile the kernel modules and I got the following error:

Uninstalling modules from DKMS
removing old DKMS module vboxhost version 3.2.10

——– Uninstall Beginning ——–
Module: vboxhost
Version: 3.2.10
Kernel: 2.6.32-5-686-bigmem (i686)
————————————-

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
– Uninstallation
– Deleting from: /lib/modules/2.6.32-5-686-bigmem/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

vboxnetflt.ko:
– Uninstallation
– Deleting from: /lib/modules/2.6.32-5-686-bigmem/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

vboxnetadp.ko:
– Uninstallation
– Deleting from: /lib/modules/2.6.32-5-686-bigmem/updates/dkms/
– Original module
– No original module was found for this module on this kernel.
– Use the dkms install command to reinstall any previous module version.

depmod……

DKMS: uninstall Completed.

——————————
Deleting module version: 3.2.10
completely from the DKMS tree.
——————————
Done.
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxhost/3.2.10/source ->
/usr/src/vboxhost-3.2.10

DKMS: add Completed.
You can use the –kernelsourcedir option to tell DKMS where it’s located, or you could install the linux-headers-2.6.37-6-generic-pae package.
Failed to install using DKMS, attempting to install without
Makefile:159: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.

I realized that I had just installed linux-image package only and not installed linux-headers while manually installing packages. This can be avoided by installing the corresponding headers. An easy way to do so is to run the following command:

sudo apt-get install dkms
sudo apt-get install linux-headers-`uname -r|cut -d'-' -f3`-`uname -r|cut -d'-' -f4`

If you are using the older kernel and not the latest version available in the repost\itory, run the following:

sudo apt-get install dkms
sudo apt-get install linux-headers-`uname -r`

If you are on Debian, sudo may or may not be installed and it may or may not be configured for your user. Just use su to login as root and run the commands without sudo.

Hope this helps.

[SOLVED] User not authorized to run the X server

My friend recently installed Ubuntu 11.04 Natty Narwhal. He is not able to boot into the Desktop Environment. As he was trying to fix things up, he got this error while running startx:

User not authorized to run the X server , aborted

With a little bit of searching, we were able to find a solution in Ubuntu Forums.

The trick is to reconfigure x11-common for “Anyone”. This can be done by running the following command in the terminal:

sudo dpkg-reconfigure x11-common

Then, select the option “Anyone” and then run startx.