PlaneShift
Support => Linux Specific Issues => Topic started by: ArbySauce on May 14, 2007, 01:16:58 am
-
I am VERY new to Linux. I just loaded Ubunto 7.04 and thought I would check to see if there were any MMORPGs supported for this OS. I searched on the Internet and came up with this game. It looks pretty cool so I thought I might give it a try. I downloaded the .bin file to the desktop. Now what? Of course with Windows you would just doubleclick on the file to run it. That doesn't seem to do anything with Ubuntu. I see in the instructions "You will need to 'chmod +x PlaneShift_CBV0.3.017.bin' after downloading". I think chmod is to change permissions but how do I 'chmod' something? What is the next step after that? Sorry about the newbie question...
-
you can change the permissions via the GUI
but to use chmod in the command line just type:
chmod permissions filename
eg
chmod 755 whatever.bin
then type
./whatever.bin to execute
-
Assuming the .bin file is still on your desktop you can do one of two things:
Right click on the file, and click on properties. This will bring up a screen with several tabs along the top. Click the permissions tab. Check the box near the bottom of the screen that says "Allow executing file as program". Then hit the close button. Now double clicking on the file will allow you to run the installer as usual.
The reason for this is security. Linux makes you set a file to executable before it can be executed, which makes it tougher for malicious programs that find their way to your computer to run automatically.
But, there is another method. I want you to try this method since it will help you get a bit more comfortable in linux, plus its fun!
First open a command line terminal by Clicking the Applications menu and selecting -----> Accessories ------> Terminal
This brings up a command line window you can type in.
First type this:
cd ~/Desktop
This command will take you to your desktop no matter where you have browsed to on the command line. The ~ is a symlink (similar to a shortcut on windows ... sort of ) to your home directory. ~ is just a quick way of saying $HOME which is another shortcut or symlink to your home directory. Your home directory resides in /home/username where username is the login name you use. My home directory is /home/brant yours will be different. Thanks to the Linux symlinks and builtin shortcuts though, I can tell you a command to take you to your desktop without knowing your username. The above command for me would be the equivalent of typing:
cd /home/brant/Desktop
you could also have typed:
cd $HOME/Desktop
All of those commands are equal. The ~ and also the $HOME automatically substitute your home directory into the path you typed.
Now that you are on the desktop we will change the permissions of the file to be executable. You can do this for any user or just your user. I usually just set it to executable to anyone since I delete the installer file anyways later. The minor security issue then becomes moot point.
To change the permissions of the file you will use the chmod command. This command can be used in a variety of ways and can be a bit daunting to grasp at first, however using it to make a file executable is dead easy.
chmod a+x PlaneShift_CBV0.3.018.bin
Be sure that PlaneShift_CBV0.3.018.bin is the file name. I'm pretty sure thats what it is but my memory is fuzzy :D
That command is divided into a few parts. The first part is the command. "chmod" this launches a program called chmod which is essentially a program for modifying permissions of files. a+x is the second part of the command. It is what is called an "argument" An argument is essentially a bit of instructions given to chmod about what to do to the file. The "a" means that the changes will be set for all users of the computer so that if someone else had a different login the change would be available to them too. The "x" portion means to make the file executable. The third portion of the command is the filename you want to change! So the command can be read as "Change the permissions of PlaneShift_CBV0.3.018.bin so that it is executable for all users of this computer"
Now that that is done you may run the installer. In Linux to run a command in the directory you are in you prefix it with ./ which is another security thing. So that means you cannot simply type: PlaneShift_CBV0.3.018.bin and have the program run. Instead you must type:
./PlaneShift_CBV0.3.018.bin
This command means "Execute file PlaneShift_CBV0.3.018.bin"
I hope this helps you get started with Linux. I'm an ubuntu fanboy loser dude so if you need any help with Ubuntu just let me know.
-
A few things I would like to mention, in the terminal you can type
ls to see the contents of the directory. You can then highlight the name of the file you will be working with and copy it with a right mouse click. Then you can paste it onto the command-line in a similar manner. Easier still is to use the tab completion function or wildcards. For example suppose the Planeshift binary is the only file in the directory starting with "P" you can then chmod +x P* or chmod +x P{TAB} where {TAB} indicates pressing the tab key. Tab completion may or may not be set up automatically in Ubuntu, it is fairly standard so it likely is. The asterisk in the first example means any sequence of characters so that if you have more files that start the same you need to put enough to uniquely identify the file you want e.g. if Planeshift, Piano and Pleat are all files in the directory and you only want to work with the first one you would use Pla*. Remember, too, that Linux is case sensitive, so Pla* would not match planeshift or PLANESHIFT.
-
Thanks so much for the great information. I feel much more comfortable now that I have some kind of idea what I am doing. Unfortunately, double clicking on the .bin file on my desktop or doing the ./PlaneShift_CBV0.3.018.bin command in the terminal has the same result..nothing happens! No error messages at all. I first opened up the Permissions on the .bin file on my desktop and checked the "Allow executing file as program" checkbox. I then double clicked on the file. Nothing happend. So I opened a terminal, did the "cd ~/Desktop" command, then did the "chmod a+x PlaneShift_CBV0.3.018.bin" command. No problem so far. I then attempted to run the .bin file by typing "./PlaneShift_CBV0.3.018.bin" in the terminal. I just got the prompt back. Nothing executed. No installation.
I must be doing something wrong. This is a very fresh install of Ubuntu 7.04. I performed a fresh installation tonight and a new download of the PlaneShift file. Still, nothing happens when I try to install the program.
Totally confused....
-
Some variations of linux require you to execute such binaries with the sh command. Try
sh ./PlaneShift_CBV0.3.018.bin . Also check to see the ownership of the file, if it does not belong to you try sudo ./PlaneShift_CBV0.3.018.bin this will prompt you for your password and then run it as root. I believe Ubuntu still makes the first user have the privilege to use sudo although I haven't looked at it lately. I'm guessing you do not have multiple users set up.
-
Thanks for the additional help Bilbous. The first command returned a syntax error when ran:
./PlaneShift_CBV0.3.018.bin: 1: Syntax error: "(" unexpected
The second command did indeed prompt for my root password. I input my password and was returned to the prompt without any errors. Unfortunately nothing else happened either.
I am curious about something. I right clicked on the .bin file and checked its properties. There are 5 tabs across the top of the properties. One tab is "Open With". It states: Select an application to open PlaneShift_CBV0.3.018.bin and others of the type "executable". The list below that is empty except for the words "No application selected".
Could this be my problem? If so, what should be listed there?
Thanks again for the help.
-
It is possible your file is corrupted, try running the command
md5sum PlaneShift_CBV0.3.018.bin in the termonal in the directory where your file is.
Mine came out as: be2e9b92ff1b4e1a56ec77da83fe8b26 The linux md5 is not listed on the main download page for some reason but I think my copy is good and yours should match. I actually only had the one bin file in the directory so I did md5sum *.bin and the output looked like this: [bill@bill2 ~]$ md5sum *.bin
be2e9b92ff1b4e1a56ec77da83fe8b26 PlaneShift_CBV0.3.018.binYou might find this useful:[bill@bill2 ~]$ ./*.bin --help
PlaneShift 0.3.018
Usage:
--help Display the list of valid options
--version Display product information
--optionfile <optionfile> Installation option file
Default:
--mode <mode> Installation mode
Default: qt
Allowed: qt gtk xwindow text
.
.
.
in that you could try --mode text
as a failsafe effort. I find it hard to believe it would not complain if you do not have qt installed but it is possible.
-
I think bilbous is on the right track. I'd bet your download didn't work right, or failed part way through. If for some reason though your md5 hash checks out and you still cannot get it to run you might try this alternate installer:
Applications ---> Accessories ----> Terminal
wget -c http://vaalnor.mine.nu/Downloads/PlaneShift%20Crystal%20Blue-0.3.018-Linux-x86-Install
chmod a+x 'PlaneShift Crystal Blue-0.3.018-Linux-x86-Install'
sh 'PlaneShift Crystal Blue-0.3.018-Linux-x86-Install'
-
Here is what happened when I ran those commands in the terminal:
daniel@daniel-desktop:~$ wget -c http://vaalnor.mine.nu/Downloads/PlaneShift%20Crystal%20Blue-0.3.018-Linux-x86-Install
--18:54:27-- http://vaalnor.mine.nu/Downloads/PlaneShift%20Crystal%20Blue-0.3.018-Linux-x86-Install
=> `PlaneShift Crystal Blue-0.3.018-Linux-x86-Install'
Resolving vaalnor.mine.nu... 24.124.93.175
Connecting to vaalnor.mine.nu|24.124.93.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 287,608,967 (274M) [text/plain]
100%[====================================>] 287,608,967 61.06K/s ETA 00:00
20:13:30 (59.22 KB/s) - `PlaneShift Crystal Blue-0.3.018-Linux-x86-Install' saved [287608967/287608967]
daniel@daniel-desktop:~$ chmod a+x 'PlaneShift Crystal Blue-0.3.018-Linux-x86-Install'
daniel@daniel-desktop:~$ sh 'PlaneShift Crystal Blue-0.3.018-Linux-x86-Install'
PlaneShift Crystal Blue-0.3.018-Linux-x86-Install: 1: Syntax error: "(" unexpected
daniel@daniel-desktop:~$
I did the md5sum against the PlaneShift file that I downloaded earlier on my desktop and its code was exactly like what was posted by bilbous.
Bilbous mentioned that:
I find it hard to believe it would not complain if you do not have qt installed but it is possible.
What is qt? Is it possible that I don't have it installed?
-
QT is a widget toolkit for building guis (I think) as are the others. GTK is what the KDE desktop is built with and QT is used by Gnome, unless I got that backwards. I usually load a whole bunch of crap just incase I need it.
Ubuntu is a Gnome distribution, Kubuntu is their KDE version.
Did you try the --mode text switch?
-
I did try the --mode text but might have done something wrong...
goran@Redstar-portable:~/Desktop$ sudo sh PlaneShift_CBV0.3.018.bin --mode text
PlaneShift_CBV0.3.018.bin: 1: Syntax error: "(" unexpected
-
Ubuntu changed to using dash as its internal shell instead of bash. Bash is still included but sh is now a symlink to dash. You could see if there are any problems because of this with the script and try executing it like so:
sudo bash PlaneShift_CBV0.3.018.bin --mode text