个人工具

UbuntuHelp:Ww2dhowto

来自Ubuntu中文

跳转至: 导航, 搜索

About

WW2D is an application like Google Earth. Here is the WW2D main site WW2D Here are the instructions for installing it on Ubuntu 5.10 (Breezy) and Ubuntu 6.06 (Dapper) on the x86 platform. For this I will be installing everything to Desktop - you can choose where you would like to do this and change Desktop to the directory you want to use. Before we get started here are a few things you need to do.

Installing Sun Java 1.5

To install java enable the multiverse repository. You can find instructions Here on how to enable extra repositories.

sudo apt-get update
sudo apt-get install sun-java5-bin
sudo update-alternatives --config java

You can find more options for installing java Java. After you run the last command type your password than you will see a list of 3 or so, pick the one you just installed. After you do that run

java --version

To make sure you have right one being used. Once that is done you need to go to the site listed above or if you are still there download the next file: JOGL-inst.jar. When the download is done you need to "cd" to where you saved it. Run this command "cd Desktop" now you should be in the directory where it is installed. Now you need to execute the .jar do this by typing

       
sudo java -jar JOGL-Inst-1.10.jar

It will than have a pop up asking what platform you are on - I used x86 because that is my platform.

Installing WW2D

The main file that you want to grab is on the same page. Click the link for WW2d it will be in zip format. After it is done downloading you want to unzip the file type this in terminal:

       
unzip ww2d-0.99.87.zip

You will see a lot of things scrolling in the terminal; this is normal because those are the packages that it contains. Now you will want to test your installation. Type:

      
cd ww2d-0.99.87 
java -jar WW2D-0.99.87

Make sure they are capital letters just as shown here. Now it should start up fine.

Running WW2d

Follow These Instructions for easy access to running it

Now that you have the program working as you would like here is a few steps to make the program easier to run. Take this script save it in your favorite text editor (i used anjuta for ease) and save it as ww2d you dont want to use a .sh or .anything. I will explain later. Here is the script:

#!/bin/sh
#This is going to run ww2d
#I used Desktop because that is where mine is saved.
#Written by John Vivirito
#[email protected]
cd Desktop
cd ww2d-0.99.87
java -jar WW2D.jar

You will want to use the path to your WW2D.jar file. If you saved the file to home instead of Desktop you would take Desktop out and put

      
cd /home/username

When you cd into Desktop the D has to be capitalized. Now that you saved the script into home folder (if thats where you saved it) you will want to issue these commands:

chmod +rx ww2d  

Test it by running:

./ww2d

If everything was done right you should see ww2d start up. Close WW2d and type in the terminal:

  
cp ~/ww2d  /usr/local/bin

Once that is done you can run it in terminal by typing the file name. In this case it's ww2d.

Adding a Panel Launcher

After you have done the above, you can add a launcher to Gnome's panel:

  1. Right-click the Gnome panel (or whatever panel you use) and choose Add To Panel.
  2. choose "Custom Launcher".
  3. For the Name slot, put WW2d or something similar.
  4. You can skip the rest if you like until you get to "Command"
  5. In the Command space, put ww2d.
  6. Choose an icon that you would like to use (if you want one).
  7. Than click OK.

Now that you have the launcher made all you have to do is click it to start WW2d.