Category Archives: Ubuntu

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: Dependency is not satisfiable: libnautilus-extension1 (>= 1:2.22.2)” while installing dropbox

I downloaded nautilux-dropbox Ubuntu deb package from Dropbox Linux Download Page. When I tried to install it via gdebi deb installer in Debian, I got the following error:

Error: Dependency is not satisfiable: libnautilus-extension1 (>= 1:2.22.2)

If you add repos and try to install it from there via Synaptic, you will get the error:

nautilus-dropbox:
Depends: libnautilus-extension1 (>=1:2.22.2) but 2.30.1-2 is to be installed

If you install it with dpkg -i, you will get the following error:

Selecting previously deselected package nautilus-dropbox.
(Reading database … 229404 files and directories currently installed.)
Unpacking nautilus-dropbox (from nautilus-dropbox_0.6.7_i386.deb) …
dpkg: dependency problems prevent configuration of nautilus-dropbox:
nautilus-dropbox depends on libnautilus-extension1 (>= 1:2.22.2); however:
Version of libnautilus-extension1 on system is 2.30.1-2.
dpkg: error processing nautilus-dropbox (–install):
dependency problems – leaving unconfigured
Processing triggers for gnome-menus …
Processing triggers for desktop-file-utils …
Processing triggers for hicolor-icon-theme …
Processing triggers for man-db …
Errors were encountered while processing:
nautilus-dropbox

Using the dpkg method will result in broken packages.

I had downloaded the version 0.6.7 32 bit (i386) i.e. nautilus-dropbox_0.6.7_i386.deb and was unable to install it cleanly. However, when I ran it by force installing, it ran without problems but the package was broken. So, the problem was not with the unmet dependencies but the deb file wrongly specifying dependencies.

So, I decided to fix the deb file. I unpacked the deb:

mkdir -p extract/DEBIAN
dpkg-deb -x nautilus-dropbox_0.6.7_i386.deb extract/
dpkg-deb -e nautilus-dropbox_0.6.7_i386.deb extract/DEBIAN/

Then edited the extract/DEBIAN/control file with gedit. You can use any other text editor of your choice.
The “Depends:” line looks like the following:

Depends: libatk1.0-0 (>= 1.20.0), libc6 (>= 2.4), libcairo2 (>= 1.6.0), libglib2.0-0 (>= 2.16.0), libgtk2.0-0 (>= 2.12.0), libnautilus-extension1 (>= 1:2.22.2), libpango1.0-0 (>= 1.20.1), python (>= 2.5), python-gtk2 (>= 2.12)

Notice the entry “libnautilus-extension1 (>= 1:2.22.2)”. In my installation, the version of libnautilus-extension1 is 2.30.1 and not 1:2.30.1 (which is the version format for libnautilus-extension1 in Ubuntu). So, I edited the version number to 2.22.2 instead of 1:2.22.2. So, the new depends line looks like the following:

Depends: libatk1.0-0 (>= 1.20.0), libc6 (>= 2.4), libcairo2 (>= 1.6.0), libglib2.0-0 (>= 2.16.0), libgtk2.0-0 (>= 2.12.0), libnautilus-extension1 (>= 2.22.2), libpango1.0-0 (>= 1.20.1), python (>= 2.5), python-gtk2 (>= 2.12)

After the change, create a directory called build and run the dpkg-deb command with -b switch to build the new deb file:

mkdir build
dpkg-deb -b extract/ build/

You will find a deb file in build/ directory which should install without dependency problems.

After installing, install the service by running the following as root and you are all done:

dropbox start -i

Hope this helps.

[HOWTO] Install Greasemonkey Firefox Addon in Firefox 4

I have installed Firefox 4 in my Debian Testing installation from Launchpad PPA. It is quite stable and I have decided to use it instead of Firefox 3. Most of the addons I used is compatible with Firefox 4 by now. However, the version of Greasemonkey available in Mozilla Firefox Addons Site is not compatible with Mozilla Firefox v4 latest build. To install the latest nightly build of Greasemonkey, I went to Greasemonkey Nightly Download and installed it. However Greasefire is not available, we can install userscripts directly from Userscripts website for now.

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

Ubuntu to become a rolling release distro

UPDATE: Rick Spencer, Ubuntu Desktop Development Team Lead, wrote in his blog:

Ubuntu is not changing to a rolling release. We are confident that our customers, partners, and the FLOSS ecosystem are well served by our current release cadence. What the article was probably referring to was the possibility of making it easier for developers to use cutting edge versions of certain software packages on Ubuntu.This is a wide-ranging project that we will continue to pursue through our normal planning processes.

The Register, OMG Ubuntu, Webupd8, Ostatic and a few other sites that feature articles about Ubuntu have recently posted articles regarding Ubuntu becoming a rolling release distro. However, it has not been officially announced, there has been quite a buzz.

Ubuntu has started as a release-cycle-based distro, in that a new version is rolled out every 6 months (and not daily). However, for a desktop based distro, it is not unrealistic to think the possibilities of a rolling release type distro considering the fact that it has been difficult to get the latest and greatest software in old Ubuntu installations. Currently, that either has to be done manually or via PPAs or it is not even possible in some cases due to dependency hell. Linux Mint has taken a step recently to explore this possibilities by launching Linux Mint Debian Edition, which is a rolling release type distro based on Debian testing.

When I used Ubuntu, I used to try and get the latest software by using daily builds or alpha/beta releases with a lot of PPAs, which made it almost like a rolling release – updated but unstable linux installation with a lot of manual work involved, just for maintaining the OS and of course the need to download latest versions of applications daily. This is what I have to do with Debian anyways, so I recently moved to Debian testing to see how it works.

Making Ubuntu a completely rolling release based distribution would make it either unstable or it will have to give up on latest software anyways and only let tested and stable software for upgrades. Both of these will mean that Ubuntu will either be unsuitable for Enterprise use or stale for Desktop use.

One option will be to start an unstable branch for Ubuntu which will be a rolling release and will contain the latest and greatest software and another testing branch, also a rolling one, which will have software which has been passed from unstable but still might have issues and a different branch for Enterprise use. Enterprises will also need that their software will not be changed on updates. So, they will need fixed release cycles for Enterprise Editions anyways. So, Canonical could decide to release Ubuntu stable versions every few years or so. Debian does this in a similar way. They could of course choose different names for the branches; something like Ubuntu Current, Ubuntu Standard and Ubuntu Enterprise version X (codename Y). They could also use animal names for the same, as they currently do.

However, I think there are better ways to do things so that the users are given a choice. That can be done by releasing standard editions at longer intervals. The base system shall be released every few years (like they release LTS) and it will have a standard softwares suitable for Enterprise use.  Ubuntu-base could consist of linux kernel, drivers and other base packages which will not get upgrades but only critical fixes. All other softwares will have their own PPA like repositories, which can either be maintained by Canonical or by software developers themselves. When a newer version upgrade is available for a software, users can be prompted to either stay with the current version or upgrade to the newer version. If a user chooses to stay with the current version, the users repositories for the software remains the same and the user will continue getting minor updates and bug fixes for the same unless the support ends. If a user chooses to upgrade, the repository for that particular software is changed and the older software is replaced with the newer one (with a choice to either remove the older version or to keep it). If the user wants development version of the package, the user may manually choose to upgrade to development version. Also, the user must be able to downgrade to the previous version without any problems.

This approach will fulfill the users needs. On a Enterprise front, the administrator may choose not to upgrade to the latest version, for stability and consistency. However, a casual home user may want to explore the latest version and may install it. A developer or a geek may choose to install development version too.

There might however be problems with this approach too. The problem is when it comes to libraries. If an application depends on one version of a library and the other depends on another version of the same, they may not co-exist. However, a workaround is to name the libraries with version names. That way, multiple versions of the same library can be installed. If this is allowed, multiple version of the same application can be installed too.

All of this is already possible with apt, so it can be done if they wish to. However, it will require a complete overhaul, it could be worth it.

[HOWTO] Add/Change plymouth theme in Debian Squeeze Testing

If you are using Debian Squeeze, you can install plymouth and it will install some plymouth themes by default. You can list the installed themes by running the following command in the terminal:

/usr/sbin/plymouth-set-default-theme --list

If you wish to install a new theme and if the theme is meant for Ubuntu, you can’t directly install it in Debian testing. If you get a deb, you will either get a failed dependency error like the following or it will not work even if you manage to install it:

Error: Cannot install ‘plymouth-label’

If you have a deb, open it up with file-roller (archive manager) and extract the directory which is inside ./lib/plymouth/themes in the deb archive. If you have a tarball (or some other archive) with instructions, just extract the directory.

Then, just copy the directory to /usr/share/plymouth/themes

If the directory name contains any capital letters, get rid of them and change the name such that the directory name is in all-lower-case. Also, get rid of spaces and such in the directory name. Inside the theme directory, you will see a .plymouth file. Open it up in a text editor and change the paths in it to /usr/share/plymouth/themes instead of /lib/plymouth/themes. Save the file and the theme is installed.

Now, run the following to list the themes:

/usr/sbin/plymouth-set-default-theme --list

You should see the newly installed theme listed. To change the theme, just run the following as root:

/usr/sbin/plymouth-set-default-theme theme-name

To test it, use the plymouth-preview tool. To commit changes and rebuild initrd, use the following command as root:

update-initramfs -u

If everything goes well, the theme should be changed.

plymouth-preview, a tool to preview your plymouth theme

I have written a small shell script to preview plymouth themes. I have successfully tested it in Ubuntu 10.10 Maverick Meerkat and Debian Squeeze Testing. It should also work with other Linux distros. Please make sure you have installed the package plymouth-x11 (or equivalent) before using this script.

In Debian, you can install plymouth-x11 by executing the following command as root:

apt-get install plymouth-x11

For Ubuntu, use sudo in the beginning of the command.

Here is the script:

#!/bin/bash

## Preview Plymouth Splash ##
##      by _khAttAm_       ##
##    www.khattam.info     ##
##    License: GPL v3      ##

chk_root () {

  if [ ! $( id -u ) -eq 0 ]; then
    echo Must be run as root
    exit
  fi

}

chk_root

DURATION=$1

if [ $# -ne 1 ]; then
	DURATION=5
fi

plymouthd; plymouth --show-splash ; for ((I=0; I<$DURATION; I++)); do plymouth --update=test$I ; sleep 1; done; plymouth quit

Save the above script somewhere and run as root.

It accepts one command line argument, which specifies the number of seconds you wish to display the splash. The default value is 5, but you can change the script to alter the default value.

References:
http://brej.org/blog/?p=158

[SOLVED] “No packages with the requested plugins found” while playing WMV Totem in Debian Squeeze

I was trying to play a video with Totem in Debian Squeeze Testing and got the following error and only video played.

No packages with the requested plugins found
The requested plugins are:
Windows Media Audio 9 decoder

I have the available codecs installed. I installed Smplayer from the repos but still did not get audio. I even installed vlc player but it didn’t help either. I got the following error with mplayer command line:

MPlayer 1.0rc3-4.4.4 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing DSC0123.WMV.
ASF file format detected.
[asfheader] Audio stream found, -aid 1
[asfheader] Video stream found, -vid 2
VIDEO: [WMV3] 1280×720 24bpp 1000.000 fps 5000.0 kbps (610.4 kbyte/s)
Clip info:
name:
author:
copyright:
comments:
open: No such file or directory
[MGA] Couldn’t open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn’t open: /dev/mga_vid
[VO_TDFXFB] This driver only supports the 3Dfx Banshee, Voodoo3 and Voodoo 5.
[VO_3DFX] Unable to open /dev/3dfx.
==========================================================================
Opening video decoder: [dmo] DMO video codecs
Win32 LoadLibrary failed to load: wmv9dmod.dll, /usr/lib/codecs/wmv9dmod.dll, /usr/lib/win32/wmv9dmod.dll, /usr/local/lib/win32/wmv9dmod.dll
IMediaObject ERROR: 0x83e8e2c could not open DMO DLL (0x0 : 0)
Failed to create DMO filter
ERROR: Could not open required DirectShow codec wmv9dmod.dll.
You need to upgrade/install the binary codecs package.
Go to http://www.mplayerhq.hu/dload.html
VDecoder init failed 🙁
Opening video decoder: [dmo] DMO video codecs
Win32 LoadLibrary failed to load: wmvdmod.dll, /usr/lib/codecs/wmvdmod.dll, /usr/lib/win32/wmvdmod.dll, /usr/local/lib/win32/wmvdmod.dll
IMediaObject ERROR: 0x83e8e2c could not open DMO DLL (0x0 : 0)
Failed to create DMO filter
ERROR: Could not open required DirectShow codec wmvdmod.dll.
You need to upgrade/install the binary codecs package.
Go to http://www.mplayerhq.hu/dload.html
VDecoder init failed 🙁
Opening video decoder: [ffmpeg] FFmpeg’s libavcodec codec family
Selected video codec: [ffwmv3] vfm: ffmpeg (FFmpeg WMV3/WMV9)
==========================================================================
==========================================================================
Opening audio decoder: [dmo] Win32/DMO decoders
Win32 LoadLibrary failed to load: wma9dmod.dll, /usr/lib/codecs/wma9dmod.dll, /usr/lib/win32/wma9dmod.dll, /usr/local/lib/win32/wma9dmod.dll
IMediaObject ERROR: 0x83e8e2c could not open DMO DLL (0x0 : 0)
ERROR: Could not open required DirectShow codec wma9dmod.dll.
ADecoder preinit failed 🙁
ADecoder init failed 🙁
Opening audio decoder: [dmo] Win32/DMO decoders
Win32 LoadLibrary failed to load: wmadmod.dll, /usr/lib/codecs/wmadmod.dll, /usr/lib/win32/wmadmod.dll, /usr/local/lib/win32/wmadmod.dll
IMediaObject ERROR: 0x83e8e2c could not open DMO DLL (0x0 : 0)
ERROR: Could not open required DirectShow codec wmadmod.dll.
ADecoder preinit failed 🙁
ADecoder init failed 🙁
Cannot find codec for audio format 0x162.
Read DOCS/HTML/en/codecs.html!
Audio: no sound
Starting playback…
VDec: vo config request – 1280 x 720 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined – no prescaling applied.
VO: [xv] 1280×720 => 1280×720 Planar YV12
V: 5.5 63/ 63 28% 1% 0.0% 0 0
Exiting… (Quit)

So, I decided to add Medibuntu repo. but it did not list repo for Debian Squeeze in repos page. I found Ubuntu Wiki page on Medibuntu which has instruction on how to install it on Ubuntu, but the instruction does not work for Debian. So, I edited the command to add Lucid Lynx repos. Just run the following command as root and you will be able to add Medibuntu repos:

wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/lucid.list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update

After adding the repos, just run the following command (again, as root of course) to install win32 binary codecs (works for 32 bit and 64 bit installation):

apt-get install w`if [ 'x86_64' == \`uname -m\` ]; then echo 64; else echo 32; fi`codecs

Now, you should be able to play WMV with sound using mplayer or Smplayer (Totem and Vlc still don’t work though).

[HOWTO] Install Eclipse-PDT (PHP Development Toolkit) in Debian Squeeze using Yogarine PPA Repository

While you can download the latest version of Eclipse PDT from Eclipse Download Page and install it manually, it is great to setup a repository instead so that you can get updates from it automatically via update manager. Eclipse is available in the official Debian repos but PDT is not. It is available in Yogarine Eclipse PPA in Launchpad. For Debian Squeeze, add the following line to Sources.list (or add it via Software Sources or in Third Party Repositories in Synaptic):

deb http://ppa.launchpad.net/yogarine/eclipse/ubuntu lucid main

Then execute the following command as root to add GPG keys:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 676DBA91

Now, reload your software list:

apt-get update

Then, install eclipse-pdt:

apt-get install eclipse-pdt

You may not get the latest version, but the repo is constantly updated and easy to manage than to monitor and re-download the same from Eclipse download page and update.