Jump to content

[RESOLVED] [Debian 11] Headless Installer


radj307

Recommended Posts

  

Expected Behaviour

An installation method that doesn't require an X server for no reason.

Actual Behaviour

While attempting to create a window on a machine with no screen, the installer crashes with the error 'No X11 DISPLAY variable was set' - since there is no X server installed.

Log

java -jar forge-1.18.2-40.1.31-installer.jar
JVM info: Debian - 17.0.2 - 17.0.2+8-Debian-1deb11u1
java.net.preferIPv4Stack=true
Found java version 17.0.2
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.<init>(Window.java:553)
        at java.desktop/java.awt.Frame.<init>(Frame.java:428)
        at java.desktop/java.awt.Frame.<init>(Frame.java:393)
        at java.desktop/javax.swing.SwingUtilities$SharedOwnerFrame.<init>(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:177)
        at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:147)

 

Edited by radj307
resolved
Link to comment
Share on other sites

  • radj307 changed the title to [Debian 11] Headless Installer

It looks like there is an argument --installServer when referring to this page

also make sure you run this in a folder made for the server because it will put all the files wherever you run it

though as I am scared to mess up peoples stuff Although the things I have said have been tested safe (on a non-headless PC), I am not legally responsible for any data loss or issues that may occur when doing this

 

Edited by Stoutscientist
  • Like 1
Link to comment
Share on other sites

  • radj307 changed the title to [RESOLVED] [Debian 11] Headless Installer

You can run with --help to get a list of possible command line arguments.

But to be explicit you can see them here: <https://github.com/MinecraftForge/Installer/blob/2.0/src/main/java/net/minecraftforge/installer/SimpleInstaller.java#L82>

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.