|
Project
Looking Glass is based on Java technology bringing 3D windowing and
visualization to your JDS system. Currently the proof of concept
LG3D-CORE demo is available for download at
https://lg3d-core.dev.java.net/.
This page explains how to prepare and install lg3d-core on to your
JDS.
Before
beginning the process of setting up your LG3D environment, you need
to first check to make sure that your system meets the necessary
requirements:
Operating
System = "Sun Java Desktop System Release 1 or 2".
As
this tutorial is based on SJD no other Linux flavour will be
mentioned.
CPU =
"2 GHZ or faster"
It
is recommended by Sun Microsystems that you have a fast processor; I
am personally using a 2.3GHZ SMP.
RAM=
"512 or more"
Graphics
Card "3D accelerated graphics card with supported drivers for
OpenGL, version 1.2 or greater.
If
intending to use LG3D with full screen resolution a 24-bit display
depth is required!
So
now we have that information out of the way lets start by collecting
some information on your system just to make sure we cover the
minimum system requirement.
#
Step One:
Open
a Terminal session within you SJD Graphical interface.
.
Launch
Applications
System Tools
Terminal
The next couple of steps are simple commands
executed in the new Terminal Window that you have just opened.
#
Step Two:
As
the Project Looking Glass requires a colour depth of at least 24 bits
and many systems are configured by default with 16 bit colour depths
the Project Looking Glass will not run correctly as it is supposed
to. So for you to be able to identify your current display depth
there are many ways to do it but the two most popular methods used by
myself are mentioned here:
Command:
# cat /etc/X11/XF86Config | grep DefaultDepth
By
executing this command you are using the standard Unix - Linux "cat"
command to display the content of the XF86Config config file,
followed by a pipe sign and the simple "grep" command. By using
the "grep" command you are gripping the only information that you
are interested at this point in time and discarding all the other
information.
Now assuming your screen depth is set to the
minimum depth of 24 this is the result you should expect to see from
the above command:
DefaultDepth 24
Now the second option to display your current
screen depth is a simple command that you can run to view the same
information as the one above:
Command:
# xdpyinfo | grep "depth of "
Once
again assuming your screen depth is set to the minimum depth required
this is the result you should see from the above command:
depth
of root window: 24 planes
Once
you have run the above commands and you are satisfied that you meet
the necessary requirement go directly to step four omitting step
three. Or if the result does not meet the requirements i.e. display
"DefaultDepth = 24" or "depth of root window: = 24 planes"
then continue with step three.
#
Step Three:
From
within a terminal session you have earlier open, run the sax2
command:
Command: # /usr/X11R6/bin/sax2
SaX: root Password: "enter
root password" if you are not yet logged in as root.
Once
the SaX2 application has opened:
Colour
and Resolution Properties
In
the "colour selection panel", click on the menu and choose
"16.7 Mio. [24 Bit]".
Following
that on the "Resolution(s) for 16.7 Mio. [24 Bit] colours"
tab, select the preferred resolution for your desktop.
For
example the maximum resolution available to my monitor is 1280x1024
so I have selected the following options:
[x]1280
x 1024
[
]1280 x 960
[x]1024
x 768
[x]
800 x 600
[x]
640 x 480
Once
you have made your choice press "OK" followed by the
Finish button.
Now
you should be back to your original sax2 window and to complete the
configuration select "Finalize …"
When
you click on Finalize, a new window will pop up and it is recommended
that you do run the test to make sure that the new setting will work
correctly.

A
blue test screen should appear, adjust it as required so that you
screen is nicely laid out in the middle of your monitor once you are
satisfied click the "Save" button on the display and then
"Ok" when you return to the SaX2 window, followed
by "Yes" to exit from SaX2
If
the test screen did not appear correctly, leave the system IDEL for
30 seconds, the test will exit after that period and your previous
desktop session will be restored. At this point you should then try
alternate resolutions at the 24-bit colour depth to find a resolution
that works for your monitor.
When
you are satisfied with the settings and your test goes correctly log
out and re-login to your desktop session and verify that the colour
depth is now 24-bit or higher by using the same commands provided at
the beginning of this step.
#
Step Four:
Step
four is quite simple all you real doing is downloading the necessary
components for the installation of LG3D Project on to your existing
Java Desktop System.
You
will need to register at the java.net web site before you are able to
download any software so therefore if you have not previously
registered atjava.net
then you will need to open and create an account:
Navigate
to http://www.java.net
and click on the "Register" link at the top of the page.
Enter
your preferred user name and e-mail address and then press the
"Register" button.
You
will receive an e-mail message with instructions on how to set a
password for your account. Once you have entered your password and
accepted the java.net website terms of participation you will be
logged in:
The
installation instructions assume that you download all of the
components into /tmp/lg3d, so before you start downloading execute
the following command:
Command:
# mkdir /tmp/lg3
Now you should be ready to start downloading, so
lets go:
Java 2 SDK, Standard Edition 1.5.0 Beta 2
or later
http://java.sun.com/j2se/1.5.0/download.jsp
The
installation instructions will also assume you download the RPM
version of the JDK Standard Edition for your Sun Java Desktop System.
Java
3D SDK
1.3.2-build4
https://j3d-core.dev.java.net/servlets/ProjectDocumentList
Follow down the directory structure j3d-core Experimental
Builds 1.3.2-build4 and in that sub-folder download
java3d-1_3_2-build4-linux-i586.tar.gz
Java
Advanced Imaging API (JAI) 1.1.2 JDK
http://java.sun.com/products/java-media/jai/downloads/download-1_1_2.html
Select the "JDK(TM) Install: Bundle for installation in a JDK
Download". After reading and agreeing to the Software License
Agreement, choose the "Linux JDK Install" the file you are
actually looking for is "jai-1_1_2-lib-linux-i586-jdk.bin"
Project
Looking Glass installation package
https://lg3d-core.dev.java.net/servlets/ProjectDocumentList
Follow
down the directory structure lg3d-core stable builds.
Select
the link named release_0.5
and select a directory we created earlier on to download the file to.
#
Step Five:
After
downloading all of the components, install them by following the
instructions below
Now
that you have all the necessary components to install and configure
lg3d-core it is a good time to begin the installation, first of all
if you have closed the terminal session you had opened before open a
new one and log in as root.
.
Command:
# su - root
Password: enter root password
For
our first step in the installation process you are going to install
the Java 2 SDK.
NB.
I am assuming that you have download all of the components into
/tmp/lg3d
Command: # cd /tmp/lg3d
This will simply take you to the directory where
all your files have been downloaded to.
Command:
# sh jdk-1_5_0-beta2-linux-i586-rpm.bin
The
above command is now extracting the rpm file and installing it onto
your system.
Well you are now getting closer to seeing your
lg3d working on your system. Now you need to install the Java 3D SDK:
If you are not already in the directory that contains all your source
files for LG3D run the first command otherwise just start at the next
step.
Command: # tar
-zxf java3d-1_3_2-build4-linux-i586.tar.gz
The above command is using the tar archiving tool
to extract the java3d-1_3_2-build4-linux-i586.tar.gz file.
Command:
# cd /usr/java/jdk1.5.0/jre
Now you are entering the directory where all your
java files live, this directory was actually created when you
installed your jdk01_5_0.
Command:
# /usr/java/jdk1.5.0/bin/jar xvf
/tmp/lg3d/java3d-1_3_2-build4-linux-i586/j3d-132-build4-linux-x86.jar
The above command looks complicated but it is
actually quite simple, you have first entered the directory where you
wish to extract the java3d jar file and then all you did was actually
extract the jar file from your source directory /tmp/lg3d
At this point there is only one extra Java
installation needed before you can actually install the Project
Looking Glass files. So now you will install a Java API and the API
you are going to install is the Advanced Imaging API for Java. For
those wondering what a API is – it is a (Application Program
Interface)
Command: # cd /usr/java/jdk1.5.0
Return
to your java installation directory where you are going to run the
next command:
Command: # sh
/tmp/lg3d/jai-1_1_2-lib-linux-i586-jdk.bin
The above command is extract the
lg3d/jai-1_1_2-lib-linux-i586-jdk.bin file into the current
directory.
Now all your java is installed and before you go
any further you can delete some unwanted files.
Command: # cd /tmp/lg3d
You’ve
now returned to your source directory.
Command:
# rm jdk-1_5_0-beta2-linux-i586.rpm
Command: # rm jdk-1_5_0-beta2-linux-i586-rpm.bin
Command:
# rm -r java3d-1_3_2-build4-linux-i586
The
last three commands you have run have removed the source files you
used to install the Java utilities required to run the Looking Glass
Project.
# Step
Six:
Ok the installation of the Java software is now
done, but just before you continue, you need to set some variables to
your environment. I am assuming that you do not normally run as root
but a normal user so your first step will be:
Exit
from the shell as root so that you once again become your normal
user:
Command: # exit
Several environment variables now need to be set
in your shell profile. Here are examples appropriate for bash / sh or
ksh shell:
If
you are running on the default bash shell you need to run the
following command:
Command: # echo "JAVA_HOME=/usr/java/jdk1.5.0" >> ~/.bash_profile
Command: # echo "PATH=$JAVA_HOME/bin:$PATH" >> ~/.bash_profile
If
you are running on the sh & ksh shell you need to run the
following command:
Command: # echo "JAVA_HOME=/usr/java/jdk1.5.0" >> ~/.profile
Command: # echo "PATH=$JAVA_HOME/bin:$PATH" >> ~/.profile
Now
to set the same variable for the root user:
Command:
# su – root
Repeat
the above steps so that you will also have the root user’s
environment setup.
#
Step Seven:
Now
it is the time you have been waiting for as it is time to Install the
"Project Looking Glass Developer's Release"
Command: # cd ~
Command: # tar -zxf
/tmp/lg3d/lg3d-0.5.tar.gz
Those
files will be extracted to a directory named lg3d in the current
directory which if all has gone well that should be your home
directory.
#
Step Eight
In
my point of view this is the most exiting step through the whole
process as you are about to Run "Project Looking Glass"
There
are two ways to run Project Looking Glass (i) in a window within an
existing desktop environment or (ii) as a full-screen desktop.
Remember
that only the full-screen desktop mode supports a key Project Looking
Glass feature, the integration of native, unmodified X11
applications.
The
easiest way to verify that your Project Looking Glass installation is
correct is to run the demo within an existing desktop. Once you are
satisfied it is working correctly, you can then configure your system
to run Project Looking Glass full-screen.
Note
that running Project Looking Glass in a desktop window is a good way
to develop and test 3D applications and enhancements to the Window
Manager (Scene Manager).
Running Project Looking Glass within
an existing desktop environment
In this mode, a Project Looking Glass session runs
in a window in your desktop. This is the simplest way to run Project
Looking Glass but this mode only allows you to run Project Looking
Glass 3D applications, such as the CD chooser. X11 applications, such
as xterm will appear in the X session that you launched the Project
Looking Glass session from.
Log
into your account and change directory to where you installed Project
Looking Glass:
Command: # cd ~/lg3d/bin
Now
start the Project Looking Glass session:
Command: # sh lg3d-dev
If
you have successfully installed Project Looking Glass you should see
the familiar Project Looking Glass desktop in a window on your
desktop:
Running Project Looking Glass
full-screen
This
mode allows you to run Project Looking Glass in full-screen and gives
you the ability to launch other application, including native X11
applications. To do this you must first shutdown your X session
before starting Project Looking Glass.
To
run Project Looking Glass you must first shut down xdm. Since this
process is respawned automatically if you kill it you must first
disable this service using the chkconfig command:
Once
again launch a terminal session and log in as root:
Command: # su - root
Password: enter
root password
Now
to disable the xdm from respawnning automatically every time you kill
it, run the following command:
Command: # /sbin/chkconfig -d xdm
xdm
0:off 1:off 2:off 3:off
4:off 5:off 6:off
Now
close any desktop applications and save any open files. Then shutdown
the display manager:
From the same terminal session run the
following commands:
Command: # pkill gdm-binary
and
if that does not work:
Command:
# pkill X
Starting the Project Looking Glass
desktop session
To start a Project Looking Glass desktop session
from the console not within an X session, login as your self enter in
your password, become root and change directory to where you
installed Project Looking Glass:
Command: # cd ~/lg3d/bin
With the above command you are changing to the
directory where Project looking glass was installed.
Command: #su - root
Now
it time to start the Project Looking Glass desktop session
Command: # sh lg3d-session
If all
steps of the way went successful, after a few seconds the Project
Looking Glass desktop should appear.
####
Congratulations! ####
To
re-activate the X Display manager so that you can launch your Default
Graphical interface, enter the following command as root, and then
reboot your system:
Command:
# /sbin/chkconfig -a xdm
###
END OF TUTORIAL ###
If
you have problems starting the desktop session, refer to the
Troubleshooting
section for assistance.
Explore
the Project Looking Glass desktop and start dreaming of new ways to
enhance the desktop user experience with 3D! When you're ready to do
development, skip over to the Project
Looking Glass Developer's Guide
for information about developing with Project Looking Glass.
Created
on the 15th July, 2004 by Ricardo Wagemaker and based upon
documentation provided by Sun Microsystems imbibed with first hand
experience.
|