Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
smoofine opened this issue Oct 15, 2023 · 4 comments
Open

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

smoofine opened this issue Oct 15, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@smoofine
Copy link

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

@smoofine smoofine added the bug Something isn't working label Oct 15, 2023
@DeivydSao
Copy link

DeivydSao commented Oct 21, 2023

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.

@AumJixs
Copy link

AumJixs commented May 7, 2024

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

@AlbertoPierri
Copy link

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

@PabloDevh
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants
@smoofine @DeivydSao @AumJixs @PabloDevh @AlbertoPierri and others