Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My Minecraft server (Bukkit) .sh bash file is not opening! I did make it executable (in permissions, I clicked "anyone" for executable). Here's the code:

#!/bin/bash
cd "$( dirname "$0" )"
java -Xms1024M -Xmx1024M -jar craftbukkit.jar -o true

The server runs fine when I put the code in Terminal but not when it's in a .sh file.

I am using Lubuntu 12.10.

share|improve this question
    
How are you trying to start it? What's the error message? –  André Stannek Mar 10 '13 at 12:44
    
I tried double clickin on it but dosent open any damn thing! i just copy pasted the code from bukkit wiki! –  harikrishnan Mar 10 '13 at 12:47
    
Open a terminal and enter the `java -Xms…' command? Does it print out anything? If yes, please add it to your question. –  qbi Mar 10 '13 at 12:54
    
Again: What's the output if you run the script? –  André Stannek Mar 10 '13 at 14:16
    
What should be the path in .sh file if my server folder in in desktop? –  harikrishnan Mar 10 '13 at 14:34
add comment

3 Answers

The script has to be in the same path then your craftbuckit.jar. Alternatively you could add the absolute path to the script:

#!/bin/bash
java -Xms1024M -Xmx1024M -jar /path/to/craftbukkit.jar -o true

Also you should execute the script in a terminal to be able to see the output. I think the minecraft server starts an admin console in the terminal. I don't know how it will behave if you don't run it in a terminal. At best you will have problems to gracefully stop the server later on and have no access to the admin console.

share|improve this answer
add comment

You have to open the .sh file in terminal, if you want to have the console. As far as I know, it'll open in the background as far as I know.

bukkit.sh should be in the same directory as the craftbukkit.jar file.

Press Ctrl-Alt-T and open the terminal, and do as follows:

cd /path/to/bukkit
./bukkit.sh

I sat with the same problem yesterday, and this worked for me. Another bonus could be, if the application opens in the background and crash, you're not going to see the output. I

In terminal (foreground) you will get any errormessage. (Please comment so, if an error should appear. I will respond to that too. Alternatively create a new question)

share|improve this answer
add comment

The script won't open a Terminal window by default. Put the Bukkit start script somewhere else (maybe in your Bukkit folder) then use this script on the desktop:

#!/bin/bash
gnome-terminal --command=~/path/to/start.sh
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.