Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

SEARCH ::

Custom Search

Monday, October 10, 2011

Share Picasa web album with friends who are not in Google+

Since Google+ came into the picture, I found it slightly difficult to share Picasa web albums with friends who don't have a Google+ account. However, when I clicked on the 'Share' button, a popup window appeared with an option to share my album with G+ friends. There was also a link 'Share via email only' in the bottom of the window. I clicked on that link and .. voila ! I can now share Picasa web albums with anyone.




Saturday, July 16, 2011

Virtual Box guest OS Solaris 10 U9 networking

I'm running Virtual Box 4 on Ubuntu 10.04 in my Toshiba laptop. I downloaded Oracle Solaris 10 9/10 Virtual Machine for Oracle VM VirtualBox and the installation was pretty simple and straight forward. My VBox was configured to use NAT. I chose networked - yes and name service - none during installation. After successful installation I took the following steps to enable networking by configuring DNS.

1. Added "nameserver 192.168.1.1" at /etc/resolv.conf
2. Aadded "10.0.2.2" at /etc/defaultrouter
I took these two information from another virtual machine, Solaris 11 Express 2010.11
3. Copied /etc/nsswitch.dns to /etc/nsswitch.conf
4. Enabled dns/client service using SVCS (svcadm enable dns/client)

However, I was not able to access internet after taking these steps. "netstat -rn" output was showing the default gateway was not configured properly and "route add" command was failing as well. My system was not able to ping the gateway. I got fed up with this and ran "sys-unconfig". After that I took the following configuration steps  -

Networked -> Yes
DHCP -> yes
IPV6 -> No
Kerberos -> No
Name Service -> None
NFSV4 domain config -> derived by system

and repeated steps 1-4 again. After a reboot networking started working as intended.

Sunday, January 3, 2010

Real Player 11 on Ubuntu 8.10 : Audio not working


Recently I have installed Real Player 11 on my ubuntu box , V 8.10 . I am using a Dell Precision M4400 laptop.
 [ Note : I've download the DEB Package from   http://www.realplayer.com/linux
 and opened with  GDebi Package Manager . ]
The player was working fine, but there was no sound. I tried with different formats, but there was no luck !
After googling a bit, I came to know about medibuntu. Medibuntu's repository can be added using the following command :
sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update
[ Note : 
Be sure your package manager is not opened, otherwise you will get 
an error message like : 
Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
Unable to lock the administration directory (/var/lib/dpkg/), is another process 
using it? ]
 
Then I opened Synaptic Package Manager and searched for alsa-firmware . 
I installed following packages and automatically determined dependencies -
alsa-firmware loaders, dell-dup, firmware-tools, libertas-firmware
and linux-firmware .
 
[Note : All above mentioned packages are not required to get audio
on realplayer] 
 
As far as I can remember, system restart was required for this updatatiion,
and after a reboot, my real player started working as intended.
[ Ref :  https://help.ubuntu.com/community/Medibuntu ]




Thursday, November 26, 2009

Picasa surprised me




Last night this pop-up window appeared when I was trying to delete a comment from a Picasa album. I tried it thrice , same thing happened each time. Anyway, today morning it didn't happen again.
I have no clue how did this happen, but no way Google has done it intentionally.


Tuesday, September 2, 2008

Build NetBeans IDE from source : getting started

Building Netbeans IDE from source is considered as the primary task of Netbeans developers. Here I am sharing my experience in working with Netbeans source. I built it on SXDE (solaris express developer edition) 1/08 which is installed in my laptop with 1 GB of physical memory and enough harddisk space. One thing I need to mention first that if you don't have a high speed internet connection the total process will take a lots of time and don't even try it with a dial up connection.

Now the requirements : JDK , Mercurial and Apache Ant.

JDK 1.5 update 13 was already installed in my SXDE 1/08 system.
SUNWmercurial-0.9.5 was also installed in my system.
Apache Ant version 1.6.5 was also there.

I tried to build with the above said configuration but faced lots of problems and finally build failed. So don't try to build if you don't have the following configuration :

JDK 1.5 update 13 is working fine and version 1.6 will not work !

Mercurial 1.0+ is recommended.

Apace Ant 1.7.0+ is also necessary.

If you don't know whether they are already installed in your system or which version is installed , check it first :

You may have multiple instances of jdk installed in your system. In my system version 1.5 and 1.6 both were installed. '/usr/jdk/instances' contained both 1.5 and 1.6 but '/usr/java' was linked to 1.6 . You may check the version of working java by executing '$java -version' , my output was something like :

java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

It's not necessary that the output will be 1.5.0 , just make sure that 1.5 is installed in your system.

Mercurial version can be determined by : '$/usr/bin/hg -v'

first line of the o/p will contain the version name , my o/p was like :

Mercurial Distributed SCM (version 0.9.5)
------------- Many lines omitted --------------

Ant version can be determined in a similar way : '$/usr/sfw/bin/ant -v'

first line of the o/p will contain the version name, mine o/p was like :

Apache Ant version 1.6.5 compiled on November 29 2007
---------------------- Many lines omitted ----------------------

Now I will share how I updated mercurial and ant in my system but before that make sure that .profile file at your home directory doesn't contain '/usr/sfw/bin' as path variable. Otherwise you will get an error during build like : '~/main/nbbuild/build.xml:60: Class org.apache.tools.ant.taskdefs.condition.Not doesn't support the nested "antversion" element' .

I tried to update mercurial to version 1.0.2 . I downloaded it from http://www.selenic.com/mercurial/release/mercurial-1.0.2.tar.gz , extracted to /opt and tried to build it. But 'make' / 'gmake' failed with the same error : 'make: Fatal error in reader: Makefile, line 3: Unexpected end of line seen'. Same thing happened while I tried Mercurial version 1.0.1 (http://www.selenic.com/mercurial/release/mercurial-1.0.1.tar.gz) as well as Mercurial version 1.0 (http://www.selenic.com/mercurial/release/mercurial-1.0.tar.gz ). Finally I installed Mercurial 1.0 from Blastwave repository , by using '#pkg-get install mercurial'. If you don't know how to use pkg-get , Click here. I observed that mercurial-1.0 , Rev = 2008.04.03 was installed during the installation process , Python 2.5.1 and Berkleydb 4.4.20 was also installed as dependancy. After successful installation I checked the version by executing '$/opt/csw/bin/hg -v' and o/p was 1.0 . Then I removed '/usr/bin' from .profile at my home directory to avoid conflict between two hg versions and '/opt/csw/bin' was already added in my path.

Then I updated my ant version to 1.7.1 . I downloaded apache-ant-1.7.1-bin.zip from http://ant.apache.org/bindownload.cgi and extracted it to /opt. Then I added '/opt/apache-ant-1.7.1/bin' to my path :

'PATH=$PATH:/opt/apache-ant-1.7.1/bin'

and defined two environment variables ANT_HOME and JAVA_HOME :

'export ANT_HOME=/opt/apache-ant-1.7.1' &
'export JAVA_HOME=/usr/jdk/jdk1.5.0_13'.

You may check this out by executing '$env'.

Though I removed /usr/bin from my path and added /opt/csw/bin to my path , but '$hg -v' o/p was giving me version 0.9.5 .

Now you need to get a working copy by cloning the Netbeans repository. To do so , I executed :

bash-3.2$ /opt/csw/bin/hg clone http://hg.netbeans.org/main

you may also try main-golden repository which is guaranteed to always build by executing the following :

'bash-3.2$ /opt/csw/bin/hg clone http://hg.netbeans.org/main-golden'

It took a long time to be completed and produced an o/p like :

bash-3.2$ /opt/csw/bin/hg clone http://hg.netbeans.org/main
destination directory: main
requesting all changes
adding changesets
adding manifests
adding file changes
added 99216 changesets with 425778 changes to 94011 files
updating working directory
83779 files updated, 0 files merged, 0 files removed, 0 files unresolved

Now you will find a 'main' directory inside your home directory. If you have write access and want to push changes back you need to edit '~/main/.hg/hgrc' file. Initially it would be something like :

[paths]
default = http://hg.netbeans.org/main

Now edit this file so that it will look like :

[hooks]
pretxncommit.crlf = python:hgext.win32text.forbidcrlf
[ui]
username = username@netbeans.org
[paths]
default = http://hg.netbeans.org/main
default-push = https://username:password@hg.netbeans.org/main/

** Replace username and password with your original username and password.

Now if you have multiple instances of JDK installed in your system you need to mention JDK 1.5 as nbjdk.home. As some modules require additional heap to build, you need to increase javac's, the compiler's, heap size. For these purposes I created a new file '~/main/nbbuild/user.build.properties' and add the following lines:

build.compiler=extJavac
javac.compilerargs=-J-Xmx512m
nbjdk.home=/usr/jdk/instances/jdk1.5.0

Now you are almost done !! Just increase the heap size for ant as the default may not be enough by using a command like :

bash-3.2$ ANT_OPTS=-Xmx512m

Now the final building part :

bash-3.2$cd main
bash-3.2$ant

you must be connected to internet during this part as external binaries would be fetched from a server during first build. You will get an o/p like :

Buildfile: build.xml
clean-cluster-flags:
-jdk-pre-preinit:
-jdk-preinit:
-jdk-warn:
-jdk-presetdef-basic:
-jdk-default:
-jdk-init:
assure-ant:
-load-build-properties: bootstrap:
[mkdir] Created dir: /export/home/ritwik/main/nbbuild/build/antclasses
[javac] Compiling 4 source files to /export/home/ritwik/main/nbbuild/build/antclasses

After that I got a warning like :

[validate-hg-configuration] ======== WARNING ========
[validate-hg-configuration] You seem to be using a version of Mercurial older than 1.0.
[validate-hg-configuration] Please upgrade as your version may have serious bugs fixed in later versions.

Though mercurial 1.0 was installed in my system.

Anyway , build operation was going on smoothly for a long time .... but suddenly build failed due to hash check error in '/export/home/ritwik/main/o.n.soa.libs.xmlbeans/external/xmlbeans-2.1.0.zip'. I became confused and deleted all files from '/export/home/ritwik/main/o.n.soa.libs.xmlbeans/external' and tried to build again. Then it failed with a 'file not found exception' ... because I deleted the file i.e xmlbeans-2.1.0.zip which the build process was searching . Then I downloaded xmlbeans-2.1.0.zip from http://ftp.wayne.edu/apache/xmlbeans/binaries/ . Place the zipped file in '/export/home/ritwik/main/o.n.soa.libs.xmlbeans/external' and tried to build . But it failed again with another file not found error , it was searching for 'xmlpublic.jar' file to copy somewhere in the following path : '/export/home/ritwik/main/o.n.soa.libs.xmlbeans/external/xmlbeans-2.1.0/xmlpublic.jar' but it was not there. Then I found that 'xmlpublic.jar' file is present in the following path : '/export/home/ritwik/main/o.n.soa.libs.xmlbeans/external/xmlbeans-2.1.0/xmlbeans-2.1.0/lib' with 4 other *.jar files. I copied all 5 jars and paste them in the following directory : '/export/home/ritwik/main/o.n.soa.libs.xmlbeans/external/xmlbeans-2.1.0'. Then I tried to build again and this time everything was normal and finally it was successful.

Then I run '/export/home/ritwik/main/nbbuild/netbeans/bin/netbeans' , accept the license agreement and Netbeans IDE 6.5 'development version' was launched .

Everything I have already mentioned happened on yesterday. Today I tried to update my sources . I undergo the following way to pull other people's changes from the server into my repository :

bash-3.2$ hg pull -u
pulling from http://hg.netbeans.org/main

searching for changes
adding changesets
adding manifests
adding file changes
added 309 changesets with 514 changes to 414 files
414 files updated, 0 files merged, 33 files removed, 0 files unresolved

References :

http://wiki.netbeans.org/WorkingWithNetBeansSources

http://wiki.netbeans.org/HgHowTos

http://wiki.netbeans.org/ExternalBinaries

http://wiki.netbeans.org/HgMigration