• [HOWTO] Enable Maximize, Minimize buttons on the title bar in Gnome 3 Gnome-Shell (Ubuntu 11.10 Oneiric Ocelot)

    I have just installed Gnome 3 in Ubuntu 11.10 Onieric Ocelot. In Gnome-Shell interface, there are no title bar controls for minimize, maximize/restore. To enable them, open up the terminal and type in (or copy/paste) the following command:

    gconftool-2 --set /desktop/gnome/shell/windows/button_layout --type string close,minimize,maximize:

    Now, press Alt+F2, type in “r” without quotes and press enter. This will reload Gnome-Shell and the changes will come into effect.

    Note: The above will set the buttons in left side as in Ubuntu default theme (or Mac OS X). To place them in the right (like Gnome 2 default, Windows), use the following command instead:

    gconftool-2 --set /desktop/gnome/shell/windows/button_layout --type string :minimize,maximize,close

    Hope this helps.

  • [HOWTO] Install Gnome-Shell (Gnome 3) in Ubuntu 11.10 Oneiric Ocelot

    I have installed Ubuntu 11.10 Oneiric Ocelot on my laptop. I had been using Ubuntu 11.04 Natty Narwhal on it and since I use this PC for work, I was reluctant in installing Gnome-Shell from PPA. But since Gnome-Shell is available in official repositories, I decided to give it a go. To install, just open Ubuntu Software Center, search for Gnome-Shell and click “Install”. After installation is complete, log out and when logging back in, select Gnome (see screenshot below).

  • [HOWTO] Install M2Crypto for Python 2.7 on Windows

    I am using Windows 7 Home Premium 64-bit and had to setup M2Crypto required for a Python program that I am writing in Python 2.7 (32-bit). After hours of trying and searching, I finally managed to get it installed and working.

    Here are some of the things that I tried, please move on to “How I managed to get it to work” if you don’t want to go through boring “What I tried” stuff.

    What I tried:
    First of all, I tried to install M2Crypto via pip. I got an error saying that swig.exe was not found, so I downloaded copy of swigwin and extracted it, then added the directory to system PATH. I installed easy_install (setuptools), opened the terminal and changed dir to Python27\Scripts and installed pip (easy_install pip). Then, I tried to install M2Crypto using pip:

    pip install M2Crypto

    Unfortunately, I got the following error:

    SWIG\_m2crypto.i(31) : Error: Unable to find ‘openssl\opensslv.h’

    SWIG\_m2crypto.i(45) : Error: Unable to find ‘openssl\safestack.h’

    SWIG\_evp.i(12) : Error: Unable to find ‘openssl\opensslconf.h’

    SWIG\_ec.i(7) : Error: Unable to find ‘openssl\opensslconf.h’

    error: command ‘swig.exe’ failed with exit status 1

    So, I downloaded openssl source files and copied the include directory to swig_dir/lib, then I got errors that from swig. I also tried giving build_dist parameter to setup.py but in vain. I was thinking of compiling openssl myself, but I figured that I would require Visual Studio (which I do not have). I thought of using MingW, but turns out you need to compile Python with MingW for it to work. I almost gave up on this, but I found that some developers had contributed build of OpenSSL and M2Crypto, so that I could just install them. Move on to next section to do it yourself.

    How I managed to get it to work
    I downloaded pre-built binaries of M2Crypto built against OpenSSL 1.0 from M2Crypto Wiki. The one that I downloaded is M2Crypto-0.21.1.win32-py2.7.msi. Then, I set it up. It detected my Python installation and installed the package. However, when I ran the Python script, I got the following error:

    import __m2crypto
    ImportError: DLL load failed

    I don’t know if it was because I did not restart my computer after installation or if OpenSSL dlls were missing, in either case, you may want to install Win32 OpenSSL V1 Light and install it and it should work.

    Hope this helps.

  • [HOWTO] Install easy_install and pip in Python 3 (Windows)

    I am just starting with Python 3 on Windows and I wanted to install easy_install and/or pip for installing other available packages easily. However, I found that setuptools setup for Python 3.3.2 (the version I am using) is not available.

    I discovered distribute, a fork of setuptools, which provides easy_install. I downloaded source from Python Package page for distribute and extracted it. In the elevated command prompt (cmd->Run as Administrator), I changed to extracted directory and then ran distribute_setup.py. Then, easy_install was successfully installed in Python_Directory\Scripts. Then, I could install pip by changing directory to Scripts and running the following:

    easy_install pip

    Hope this helps.

  • [SOLVED] “Warning: Could not find package list for PPA: ppa:some/ppa” while trying to use ppa-purge in Ubuntu

    When trying to purge Gnome3 PPA, I had to cancel the ppa-purge process and when I tried to run the same, I got the following message:

    Updating packages lists
    PPA to be removed: gnome3-team gnome3
    Warning: Could not find package list for PPA: gnome3-team gnome3

    I had to add the PPA again to be able to successfully run ppa-purge. For example, if your ppa is ppa:gnome3-team/gnome3, you should run the following:

    apt-add-repository ppa:gnome3-team/gnome3

    Then you should be able to run ppa-purge again.

    Note: In my case, I also got the following error after adding the PPA again:

    E: Type ‘ain’ is not known on line 3 in source list /etc/apt/sources.list.d/gnome3-team-gnome3-natty.list
    E: The list of sources could not be read.
    Warning: apt-get update failed for some reason
    PPA to be removed: gnome3-team gnome3
    Warning: Could not find package list for PPA: gnome3-team gnome3

    This seems to be some bug. I had to manually edit /etc/apt/sources.list.d/gnome3-team-gnome3-natty.list and remove the line containing ‘ain’. This should not be required in your case.

    If this does not work, you should check if the PPA exists at all and if you have packages installed from that PPA.

  • [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 which you can download here, please note that you need an active Internet connection for the following):

    cd /tmp
    tar xzvf ˜/Downloads/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:


    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.

  • [SOLVED] Booting up stuck at “Starting Wait for Plymouth Boot Screen to Quit” after ATI Driver Installation

    I installed Fedora 15 on HP Pavilion G4 1009tx Notebook recently. It has Intel Onboard Graphics and ATI Radeon HD 6470M Graphics 1024MB GDDR3, with switching option in Windows. However, it was disappointing to see that Gnome-Shell does not load on it while used to run fine on my old Desktop with onboard Intel Graphics. I tried to install ATI Properiatary drivers from RPM Fusion repos. However, after reboot, the booting process halted after showing the following:

    Starting SYSV: Enable monthly update of Smolt...
    Started SYSV: Enable monthly update of Smolt.
    Starting SYSV: Grant or revoke access to X for the ATI External Events Daemon...
    Started SYSV: Grant or revoke access to X for the ATI External Events Daemon.
    Starting SYSV: Late init script for live image....
    Starting /etc/rc.local Compatibility...
    Started SYSV: Late init script for live image..
    Started /etc/rc.local Compatibility.
    Starting Wait for Plymouth Boot Screen to Quit...

    I discovered that I could still navigate to virtual terminals by pressing Ctrl+Alt+F2, F3 and so on. So, I decided to remove the catalyst drivers so that I could boot into my PC again. I logged in as root and ran the following to show the latest installed packages:

    cat /var/www/yum.log

    The most recently installed were the packages related to ATI drivers:

    Aug 31 02:29:01 Installed: xorg-x11-drv-catalyst-libs-11.7-1.fc15.x86_64
    Aug 31 02:29:08 Installed: xorg-x11-drv-catalyst-11.7-1.fc15.x86_64
    Aug 31 02:29:08 Installed: akmod-catalyst-11.7-1.fc15.x86_64
    Aug 31 02:29:10 Installed: xorg-x11-drv-catalyst-libs-11.7-1.fc15.i686

    So, to remove I typed the following:

    yum remove xorg-x11-drv-catalyst

    Then, I rebooted the PC with the reboot command. Now, the Laptop boots successfully but still has no 3D graphics. I guess I will have to stay with the boring Gnome 3 fallback interface unless I figure something else out. 🙁

  • [HOWTO] Install Wireless support for Fedora 15 in HP Pavilion G Series (G4) Notebook

    To install Wireless driver for HP Pavilion G4, I followed the instructions here. Basically, I just connected it to the internet using a cable and here is what I did in the terminal (System Tools>Terminal):

    su #enter password when prompted
    sudo yum localinstall --nogpgcheck http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
    yum install akmod-wl
    akmods --akmod wl
    modprobe wl

    Then, I disconnected the cable and reboot and the Wifi started working. Hope this helps.

    Hope this helps.

  • [HOWTO] Install Sun/Oracle Java JDK 7 in Fedora 15

    Sun/Oracle Java JDK 7 may be required to run some applications that are not compatible with OpenJDK which can be installed using package manager in Fedora 15. Here is how to do it. Open the terminal and use the following commands:

    For 64-bit

    wget "http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.rpm"
    su -c 'rpm -i jdk-7-linux-x64.rpm'

    For 32-bit

    wget "http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.rpm"
    su -c 'rpm -i jdk-7-linux-i586.rpm'

    If you already have OpenJDK/OpenJRE installed, you will need to configure your system so that the applications use the Sun/Oracle Java version instead of OpenJDK/OpenJRE. Here is how to do it:

    su -c 'alternatives --install /usr/bin/java java /usr/java/jdk1.7.0/jre/bin/java 20000'
    su -c 'alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.7.0/jre/bin/javaws 20000'
    su -c 'alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0/bin/javac 20000'
    su -c 'alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0/bin/jar 20000'

    For 64-bit:

    su -c 'alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jdk1.7.0/jre/lib/amd64/libnpjp2.so 20000'

    For 32-bit:

    su -c 'alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/jdk1.7.0/jre/lib/i386/libnpjp2.so 20000'

    Hope this helps.