thecoder-001 / MineColab

Run Minecraft Server on Google Colab.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]forge server: No X11 DISPLAY variable was set

smoofine opened this issue · comments

Describe the bug
I cant start the server it seems like when trying to execute the server.jar it doesn't take into account the nogui because the error message says it wants to open the install window you would get if you run the jar file for the first time in your pc.

I'm trying to run a modpack server but I don't think it is what is causing the issue or at least not yet, because I also tried to run a clean forge install and had the same result.

PD: i'm sorry if i'm not technical enough i know nothing about coding or this stuff i just read what the error says so I'm probably totally wrong in my interpretation.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the first cell
  2. Click on 'start'
  3. See error

JVM info: Private Build - 17.0.8.1 - 17.0.8.1+1-Ubuntu-0ubuntu122.04
java.net.preferIPv4Stack=true
Current Time: 15/10/2023 02:07:28
Host: files.minecraftforge.net [51.79.83.165]
Host: maven.minecraftforge.net [51.79.83.165]
Host: libraries.minecraft.net [13.107.246.70, 13.107.213.70]
Host: launchermeta.mojang.com [13.107.246.70, 13.107.213.70]
Host: piston-meta.mojang.com [13.107.246.70, 13.107.213.70]
Host: authserver.mojang.com [52.85.132.7, 52.85.132.70, 52.85.132.124, 52.85.132.75]
Found java version 17.0.8.1
Exception in thread "main"
java.awt.HeadlessException:
No X11 DISPLAY variable was set,
but this program performed an operation which requires it.
at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:166)
at java.desktop/java.awt.Window.(Window.java:553)
at java.desktop/java.awt.Frame.(Frame.java:428)
at java.desktop/java.awt.Frame.(Frame.java:393)
at java.desktop/javax.swing.SwingUtilities$SharedOwnerFrame.(SwingUtilities.java:1919)
at java.desktop/javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1995)
at java.desktop/javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1695)
at java.desktop/javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:874)
at java.desktop/javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:676)
at java.desktop/javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:647)
at net.minecraftforge.installer.SimpleInstaller.launchGui(SimpleInstaller.java:191)
at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:161)

Expected behavior
starting the server

Minecraft server Version
1.20.1

Mod/Datapack list
I don't think this is what is causing the problem.

Additional context
As I said in the description above I also get the same error on a fresh forge server installe the version 1.19.2

If you are using forge change these 3 lines of code. It should work for you after that.

image

!java $memory_allocation $server_flags @libraries/net/minecraftforge/forge/1.18.2-40.2.9/unix_args.txt nogui "$@"

! playit & java $memory_allocation $server_flags @libraries/net/minecraftforge/forge/1.18.2-40.2.9/unix_args.txt nogui "$@"

!./cloudflared-linux-amd64 tunnel --url tcp://127.0.0.1:25565 & java $memory_allocation $server_flags @libraries/net/minecraftforge/forge/1.18.2-40.2.9/unix_args.txt nogui "$@"

The version of forge depends on the one you are using, change it to the one you have.

Error: could not open `/libraries/net/minecraftforge/forge/1.16.5-36.2.42/unix_args.txt'

Error: could not open `libraries/net/minecraftforge/forge/1.12.2-14.23.5.2859/unix_args.txt' Help

Error: could not open `libraries/net/minecraftforge/forge/1.12.2-14.23.5.2859/unix_args.txt' Help

The error is due to 1.12.2, it uses Java 8, otherwise I'm wrong, sorry for my bad English.

Hi to everyone, due to the inactivity of MineColab (thecoder-001), I've re-done the whole Colab and know works almost for every version and software.
The first version (actual) is a beta testing and in Spanish, so if someone could test it and talk to me about what problems it has, it would be greatful.

Nothing more to say. Here you have the link: 700s MineColabs, by Prozoon700

I hope it works good for everyone and don't forget to follow the steps on the oficial github.
Have a nice day!