NetBeans in Wonderland (Part 2)
By seapegasus on Feb 05, 2009
In part one, I talked about what project Wonderland is and where you can try out a live demo of version 0.4. Much like SecondLife, Wonderland is a 3D world with avatars and audio/text chat. But unlike SecondLife, Wonderland is open-source and more business-oriented, for instance there's live application sharing. You can use it to collaborate on projects with your team of developers in a private 3D world.
Part two is about how to set up your own Wonderland server and client. I will share an instance of NetBeans in this example, but of course you can share any Xwindows application, including the Terminal.
Windows and Mac versions of the Wonderland 0.4 server don't seem to be available yet, so presently Solaris or Linux are a prerequisite. Note that Wonderland clients (including a webstartable one) are available for all operating systems. In this example I use OpenSolaris, and the instructions should be identical for Linux.
Before running Wonderland, make sure you have JDK 6 installed. (Use the terminal commands javac -version to check). If you don't have javac, install the JDK 6. On Solaris, go to the main menu, choose System > Administration > Package Manager, and install the java-dev package from the Development category.
Prerequisites: Installing the Shared Application
Obviously the application that you want to share must be correctly installed and on your PATH. In this example I downloaded and installed NetBeans. Check whether NetBeans is in your PATH by typing which netbeans at a fresh Terminal prompt. If the command returns empty, you need to add NetBeans to your PATH before proceeding. Find out where the NetBeans binaries were installed -- in my system, it's in the /opt/netbeans-6.5/bin/ directory. Remember this path and add it to your config file (I use the bash shell, so for me the file is .bashrc).
ruth@sonnig:~$ gedit ~/.bashrc
Add your netbeans binary path in the following way and save the file.
Reload the .bashrc configuration (in every open Terminal window).
ruth@sonnig:~$ source .bashrc
Test whether NetBeans was successfully included in your PATH.
ruth@sonnig:~$ which netbeans /opt/netbeans-6.5/bin/netbeans
ruth@sonnig:~$ unzip wonderland-0-4-0-solaris-i86pc.zip
Change into the wonderland directory and edit the settings.
ruth@sonnig:~$ cd lg3d-wonderland/bin/ ruth@sonnig:~$ gedit ../my.run.properties
Modify the following lines to include your host name and IP address, and save the file. (You will have to redo that if you use DHCP and are assigned a new IP address.)
wonderland.local.hostAddress=123.454.32.1 sgs.server=sonnig sgs.port=1139
Starting the Wonderland Server
OK, you're all set! Now it's time to start the server. According to the instructions, you run the binaries as follows:
ruth@sonnig:~$ ./wonderland-bridge.sh ruth@sonnig:~$ ./wonderland-server.sh ruth@sonnig:~$ ./wonderland-smc.sh
Starting the Wonderland Client
Finally, start a Wonderland client and connect to your server. The client can run on any operating system, on the same host or on a different one, webstart or desktop app, it's up to you. The only requirement is that the host must support 3D graphics. (Since my OpenSolaris runs in a virtual machine and VirtualBox cannot handle 3D graphics, I use the Mac client.) When the login dialog appears, enter the IP address that you specified above, pick any username, and connect.
Welcome to your very own Wonderland. :-) You walk around using the arrow keys. Select Netbeans from the Shared Apps submenu and find the window floating in the room. Gain/release control of an application by Shift-Left_clicking the window title. Tip: I don't know what Solaris thinks ctrl-space is, but it didn't trigger code-completion; so I'm using ctrl-\\ instead.
A shared application (here NetBeans) in 3rd-person view and in Best View (Shift-Right_click)
Now it's time to invite some friends over: Ask them to webstart the client, give them the Wonderland server's IP address, and have a little chat around the campfi-- um, around the IDE. Hmm. Around the IDE...? Well, it is a 3D world... What if I walk around the IDE and look at it from behind?
Behold. The far side of NetBeans! :D
The next step is to load custom 3D models (more documentation is here). But I'll wait until I migrated my stuff to a Linux machine -- VirtualBox is nice, but seeing that it takes up way over 50% of my RAM gives me fits of claustropobia. ;)