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

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.


[SOLVED] “BADSIG 40976EAF437D05B5” when reloading package lists in Synaptic/apt/update-manager in Ubuntu 10.04 Lucid Lynx

I am using Ubuntu 10.04 Lucid Lynx Beta 1 and got the following set of warnings while updating my package lists

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://archive.ubuntu.com lucid Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key 

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/Release  

W: Some index files failed to download, they have been ignored, or old ones used instead.

This was preventing the package list updates and hence preventing package updates. I don’t know what caused this or when exactly I started to get these, but I guess it was after I changed my packages server from np.archive.ubuntu.com to archive.ubuntu.com.

Anyways, I managed to fix it by (re)moving all the old package lists and updating again. This can be summed up in the following three lines of terminal commands:

sudo mv /var/lib/apt/lists /var/lib/apt/lists.old
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get update

This did it for me. Hope it does it for you too.

Ubuntu 10.04 Lucid Lynx beta 1 released

Just letting you all know that Ubuntu Lucid Lynx Beta 1 has been released a few hours ago. Get it here. If you have been using Lucid Lynx Alpha, you can simply update your package repositories and you will have the Beta 1.

Also, Kubuntu 10.04 Beta 1 has also been released. Kubuntu also has a Netbook remix now. Get them here.

Lets not forget Lubuntu 10.04 Beta 1, Xubuntu 10.04 Beta 1 and Edubuntu 10.04 Beta 1. Find Lubuntu here, Xubuntu here and Edubuntu here.

Enjoy the new themes and features.

[HOWTO] Move the Minimize, Maximize, Close buttons to the Right in Ubuntu 10.04 Lucid Lynx

I am using Ubuntu 10.04 Lucid Lynx in my PC. The Ubuntu Design Team has decided to move the Minimize, Maximize and Close buttons to the left of the title bar. Not exactly like Mac OS X, which looks like the following:

while Ubuntu button layout is as follows:

Maximize, Minimize, Close in Ubuntu Lucid

The difference is the order in which they appear.

UPDATE April 2: The button order in Lucid will now follow Mac OS X style.


[HOWTO] Downgrading from Ubuntu 10.04 Lucid Lynx to 9.10 Karmic Koala

I was wondering if we could downgrade from Ubuntu 10.04 Lucid Lynx Alpha to Ubuntu 9.10 Karmic Koala. So I decided to put it upon test and I succeed. So, I am sharing this with those who wish to keep using stable Karmic Koala till the final version of Lucid is out.

Please note however, that all the installed applications will be lost, however the settings and files in your home directory will be preserved. So, for example if you have a huge list of saved sites on your Filezilla client, Filezilla will be gone, but when you install Filezilla on your Karmic, the settings should work. Also, your Firefox browsing history, preferences and other settings will also be preserved.


[SOLVED] Gtk-Message: Failed to load module “rgba”: librgba.so: cannot open shared object file: No such file or directory

I had enabled the ppa


and upgraded and installed nautilus, murrine-themes , gtk2-module-rgba and gtk2-engines-murrine to enable rgba transparency in my Ubuntu 10.04 Lucid Lynx Alpha. That looks really cool. It was supposed to be coming with Lucid, but was dropped due to bugs. The programs started crashing for me too. I was done with adding exceptions to /etc/profile.d/gtkrgba.sh because almost every new program crashed. So I decided to remove the rgba module altogether. Just removing the repository does not help. So, here are the removal instructions.
Find and removing the PPA Packages and installing original versions:
Open up synaptic. Make sure you have not disabled the rgba repository.
Click on “Origin” in the lower left of Synaptic and in the upper left pane, select LP-PPA-erik-b-andersen-rgba-gtk/lucid.
Now, the packages installed via the repository can be seen in the main window of synaptic.
Select gtk2-engines-murrine and click on Package>Force Version and choose non-ppa version. Repeat the same for libnautilus-extension1, murrine-themes and nautilus.
Mark gtk2-module-rgba for removal.
Apply the changes.
Now, you can safely remove the PPA repository.
Remove the rgba module listing from profiles:
Even after the removal of ppa versions, you will still get a message


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

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, I had to delete the DSL connection from my network manager (which I had configured to connect at logon). Then I would need to configure pppoe connection via pppoeconf. To do so, I bring up my terminal and type in:


[HOWTO] Moving Gnote Notes to Tomboy and vice versa

I had moved to Gnote from Tomboy notes in my Ubuntu 10.04 Lucid Lynx Alpha because I wanted to free some space by removing mono (I don’t play gbrainy and I do not have a photo collection in my PC :)).

However, I have been facing crashes with Gnote recently. I updated to latest version of Gnote from the PPA with no success. I get the following error when I try to launch Gnote version 0.7.1-1ppalucid3 from the terminal: