Tag Archives: Linux

[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] java.security.AccessControlException: access denied (java.net.SocketPermission host connect,resolve)

[ad#ad-1]I am building a Java Applet which needs to connect to foreign host to operate. I created it and it runs good on OpenJDK Runtime Environment (IcedTea6 1.8pre) installed on my Ubuntu 10.04 Lucid Lynx Beta. But it does not run with Sun Java Runtime Environment 1.6.0_18 on Windows. I don’t know if it also does not work with Sun JRE in Linux. Also, as far as I know, OpenJDK/OpenJRE for Windows does not exist.

The applet shows somewhat this kind of when run in Windows under Sun JRE:

java.security.AccessControlException: access denied (java.net.SocketPermission host connect,resolve) 

and the page just stalls.

When I searched for help on the internet, I discovered that unsigned files do not run in Windows. So, I needed to sign it. The Certificate can cost at least a couple of hundred dollars for a month. If you are using it for commercial purposes, I advice you to buy a certificate. However, I just wanted my code to run in Windows and to do that I bundled the code inside a Jar file (I was just using the class file i.e. code=”Classname.class”. Now I need to use code=”Classname” archive=”JarName.jar” for applet in the HTML file.). So I am sharing what I did to make it run.

After building the Jar File (Netbeans IDE that I am using builds the Jar file automatically inside the dist sub-directory of the Project directory), I used the command

keytool -genkey

and entered the details. You can choose your own password for keystore. You can either use the same password for key password or choose a different one. Now a keyfile named .keystote is created in the home directory. I need to certify the key. Since I have not purchased a security certificate, I needed to certify it myself using the following command:

keytool -selfcert

. Now a key named mykey is created for me to use. This should only be done once.

Now, I changed my directory to the dist directory and executed the following command to sign a MyJarApplet.jar:

jarsigner -storepass KeySorePassword -keypass KeyPassPassword MyJarApplet.jar mykey

Here KeyStorePassword is the password used while creating the keystore and KeyPassPassword is the password used in the key mykey.

Now, the applet asks for authentication instead of showing nothing at all in Windows too.

Hope this helps.

References:
http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html
http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/jarsigner.html
http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/keytool.html

[HOWTO] Auto Re-Connect to dsl pppoe in Linux

[ad#ad-1] I am using Ubuntu 10.04 Lucid Lynx Alpha. I have a dsl connection (WiZoom, Wireless via ubnt but wired to my PC) from Worldlink Pvt. Ltd., Nepal. I need to connect via pppoe. I occasionally keep my PC to download overnight while I sleep or even when I am away. It works well with torrents (with deluge as my torrent client, I haven’t used transmission torrent client much) but sometimes it disconnects from the internet. So, I had to configure it to auto re-connect on disconnect. It should also connect on logon. Since network manager does not meet my requirements, Continue reading [HOWTO] Auto Re-Connect to dsl pppoe in Linux

[HOWTO] Change Ubuntu 9.10 Karmic Koala to Linuxmint 8 Helena

[ad#ad-1]As you know, Linuxmint is based on Ubuntu. So I thought, it might be possible to take Ubuntu as a base and turn it to Linuxmint with available Linuxmint software. Thats what I did.

I used Ubuntu Karmic Koala and turned it into Linuxmint Helena. You might use other Ubuntu base and turn it to respective Linuxmint distro, but you may need to follow different (yet similar) steps. Here is how I did it. Continue reading [HOWTO] Change Ubuntu 9.10 Karmic Koala to Linuxmint 8 Helena

[HOWTO] Getting Started with J2ME on Ubuntu Karmic Koala with Netbeans

[ad#ad-1]I want to build my college project on J2ME platform. I use Ubuntu and want to use NetBeans as my IDE.

I just installed netbeans, Sun Java Wireless Toolkit for CLDC and Mobility pack for netbeans. Here is how I did it. Continue reading [HOWTO] Getting Started with J2ME on Ubuntu Karmic Koala with Netbeans

[SOLVED] Problem Playing Media on Firefox on Ubuntu Linux

[ad#ad-1]

I am using Ubuntu 9.10 Karmic Koala on my Desktop with Firefox 3.5 as my primary browser. Recently I was facing problems playing online media (streaming mp3s, non-flash) including FM from my own page on Firefox. Continue reading [SOLVED] Problem Playing Media on Firefox on Ubuntu Linux

Listen to Nepali FM Radios Online (Kantipur FM, Hits FM, Maitri FM, Nepal FM, Ujyalo FM)

[ad#ad-1]If you are outside of the country or somewhere where you cannot listen to these FMs or simply want to waste your bandwidth, you can listen to them online, LIVE.

Here you will find links to Kantipur FM, Hits FM, Maitri FM, Nepal FM and Ujyalo FM:
http://www.khattam.info/fm (fixed)

[ad#ad-2]

However, you may like to listen to them with your favourite media player (VLC, what else). This can be possible if you have VLC installed. You will just need to download this small file and extract it somewhere. Then you may open those with VLC and listen to them.

In Ubuntu Jaunty Jackalope, I was unable to listen to Kantipur FM from their site, but am able to play the pls with VLC and Totem Media Player.

[ad#ad-3]

Goto FM Page at:
http://www.khattam.info/fm

[ad#fms]