Linux: Difference between revisions

From PZwiki
No edit summary
(Add standalone instructions, CaptainBinky gave the permission)
Line 1: Line 1:
Project Zomboid has been made to run on Linux. However, as java and the java browser plugin do not come pre-installed, if you do not already then you shall have to download and install yourself.
Project Zomboid has been made to run on Linux. However, as Sun's official Java and the Java browser plugin do not come pre-installed, if you do not already then you shall have to download and install yourself.


==Ubuntu==
==Ubuntu==


You need to [https://help.ubuntu.com/community/Repositories/Ubuntu#Adding%20Canonical%20Partner%20Repositories enable the "partner" repository] in "Software Sources" and then see the [https://help.ubuntu.com/community/Java#Sun%20Java Ubuntu wiki page about Java]
You need to [https://help.ubuntu.com/community/Repositories/Ubuntu#Adding%20Canonical%20Partner%20Repositories enable the "partner" repository] in "Software Sources" and then see the [https://help.ubuntu.com/community/Java#Sun%20Java Ubuntu wiki page about Java]
==Playing outside the browser==
There are at least two reasons why you would want to play the standalone rather than in-browser. First, Java and Linux don't mix that well and is quite unstable in any browser. Second, there is a focus problem with the game inside a browser currently which does not occur in the standalone version.
At any rate, you need to first login inside a browser to download the game. This only works once you have first logged in with your account and downloaded.
Create a file which has these three lines in it:
#!/bin/sh
DATA=$HOME/.java/deployment/cache/lwjglcache/cloud.projectzomboid.com/ProjectZomboid
java -Djava.library.path=$DATA/natives -cp $DATA/zombie.jar:$DATA/lwjgl.jar:$DATA/lwjgl_util.jar zombie.GameWindow
Call it "projectzomboid" or whatever you want. Make it executable (chmod +x projectzomboid) and run it (./projectzomboid).
Worth noting is that the standalone is currently limited to one resolution only, 1440x900, and is NOT officially supported and does not have auto-update feature in it. You always need to use the browser to update the game.


==Manual install==
==Manual install==

Revision as of 09:31, 31 May 2011

Project Zomboid has been made to run on Linux. However, as Sun's official Java and the Java browser plugin do not come pre-installed, if you do not already then you shall have to download and install yourself.

Ubuntu

You need to enable the "partner" repository in "Software Sources" and then see the Ubuntu wiki page about Java

Playing outside the browser

There are at least two reasons why you would want to play the standalone rather than in-browser. First, Java and Linux don't mix that well and is quite unstable in any browser. Second, there is a focus problem with the game inside a browser currently which does not occur in the standalone version.

At any rate, you need to first login inside a browser to download the game. This only works once you have first logged in with your account and downloaded.

Create a file which has these three lines in it:

#!/bin/sh
DATA=$HOME/.java/deployment/cache/lwjglcache/cloud.projectzomboid.com/ProjectZomboid
java -Djava.library.path=$DATA/natives -cp $DATA/zombie.jar:$DATA/lwjgl.jar:$DATA/lwjgl_util.jar zombie.GameWindow

Call it "projectzomboid" or whatever you want. Make it executable (chmod +x projectzomboid) and run it (./projectzomboid).

Worth noting is that the standalone is currently limited to one resolution only, 1440x900, and is NOT officially supported and does not have auto-update feature in it. You always need to use the browser to update the game.

Manual install

First, go here and download java. You want the normal Linux file, NOT the RPM. If you have a 64-bit computer, get the x64 version. You must now extract the file. The easiest way to do this is to take the downloaded file, place it in the home directory, rename it to "java.bin", and open the terminal and type in "bash java.bin". This will install Java.

Now, you need to install the Java plugin. Oracle's installation instructions say thusly, and these instructions work, but only on a 32-bit computer.

This is a problem for those of us who have a 64-bit computer, as the 32-bit plugin path is different from the 64-bit path. Be sure that you downloaded the x64 version if you have a 64 bit computer.

So, once java is installed, pull up the terminal again. cd to your firefox plugin directory, unless you moved it the command will be: cd /usr/lib/mozilla/plugins

Then you need to create a symbolic link to the java plugin. In that same terminal window, now type one of the following depending on the type of computer you have:

If you have a 32-bit computer:

close firefox, then type:

sudo ln -s /home/<username>/<Java installation directory>/lib/i386/libnpjp2.so

Filling in the appropriate blanks. For example, to install, the author of this page wrote:

sudo ln -s /home/peter/jre1.6.0_24/lib/i386/libnpjp2.so

Be sure to check your installation directory, it will change depending on the version of java you have.

If you have a 64-bit computer:

close firefox, then type:

sudo ln -s /home/<username>/<Java installation directory>/lib/amd64/libnpjp2.so

Filling in the appropriate blanks. For example, to install, the author of this page wrote:

sudo ln -s /home/peter/jre1.6.0_24/lib/amd64/libnpjp2.so

Be sure to check your installation directory, it will change depending on the version of java you have.


To Double Check

Then, open a file explorer window, and go to usr/lib/mozilla/plugins, and be sure that the link is in the proper place. If it is, you should be all set. Head off to the website. If it isn't, delete it. You may need to use the terminal to do so, the command will be: sudo rm <filepath> Then check your steps and try again. If you continue to have trouble, go to the forums and send a pm to rdsqc22. Also try google.