Category Archives: Debian

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

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.

[HOWTO] Change GDM 3 Theme and Wallpaper

I am using Debian Squeeze Testing and I have gdm3 installed.  I wanted to change the default gdm theme and here is how I did it.

I opened the file /usr/share/gdm/greeter-config/20_debian in a text editor as root and changed the line containing “/desktop/gnome/background/picture_filename” and gave the full path to the new location of wallpaper. I also changed the line containing “/desktop/gnome/interface/gtk_theme” and wrote the name of theme instead of the default (in my case it was Clearlooks and I changed it to an installed theme Equinox). Then I saved the file and logged out to see the changes.

While changing the theme, make sure that the theme is installed as available to all users (i.e. in /usr/share/themes).

[HOWTO] Enable Ubuntu-like “sudo” in Debian Squeeze

In Ubuntu, when you need to run a command as root, you just have to run the command with a preceding “sudo” i.e.

sudo command-to-run

. However, in Debian (and many other Linux) it is may not be set as such by default. To set it as default and to allow the normal user to execute the command as root, just follow the following instructions:

Install Sudo
To install sudo, just run the following commands:

su
apt-get install sudo gksu

Add yourself to Sudoers list
First to open /etc/sudoers as root in terminal, run the follwing commands:

su
visudo

Now, scroll to the bottom of the file and add the following line:

username ALL=(ALL) ALL

where “username” is the username you use to login to your computer.
Press Ctrl+O followed by ENTER to save /etc/sudoers and you are done.

Hope this helps.

[HOWTO] Install Chromium v9 in Debian Squeeze Testing using Ubuntu PPA

As I mentioned in my previous post, you can install software from Ubuntu Lucid Lynx PPA to Debian Squeeze Testing. Using the same method, Chromium v9 can be installed in Debian Squeeze using the Ubuntu Chromium Daily PPA.

In Synaptic Package Manager, navigate to Settings>Repositories>Third Party Sources and then add the following:

deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu lucid main 

Open up the terminal and type in the following as root (type in “su”, press ENTER and enter root password to change to root first or enable sudo in Debian and use sudo instead):

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4E5E17B5