Bug 1213074 - A java optifine installer bug.
Summary: A java optifine installer bug.
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Java (show other bugs)
Version: Current
Hardware: 64bit openSUSE Tumbleweed
: P5 - None : Minor (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-06 12:56 UTC by Gregor Podjed
Modified: 2023-07-06 13:58 UTC (History)
1 user (show)

See Also:
Found By: Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gregor Podjed 2023-07-06 12:56:14 UTC
I tried installing optifine using the following command: sudo java -jar preview_OptiFine_1.20.1_HD_U_I5_pre7.jar. It gave the following error: java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
	at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
	at java.awt.Window.<init>(Window.java:536)
	at java.awt.Frame.<init>(Frame.java:420)
	at java.awt.Frame.<init>(Frame.java:385)
	at javax.swing.JFrame.<init>(JFrame.java:189)
	at optifine.InstallerFrame.<init>(InstallerFrame.java:55)
	at optifine.InstallerFrame.main(InstallerFrame.java:115)
Exception in thread "main" java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
	at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
	at java.awt.Window.<init>(Window.java:536)
	at java.awt.Frame.<init>(Frame.java:420)
	at java.awt.Frame.<init>(Frame.java:385)
	at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1763)
	at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1838)
	at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1696)
	at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:863)
	at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:666)
	at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:637)
	at optifine.InstallerFrame.main(InstallerFrame.java:138)
Does this mean I need to set a X11 display variable? If so, how do I do it?
Comment 1 Andreas Stieger 2023-07-06 13:58:00 UTC
Yes, this means that you are trying to run a graphical program in a non-graphical environment. If you do have a graphical environment, "sudo" may swallow it. Use "su -", or "ssh -X" if using ssh. You need of course an X server on the host or the remote side. This may help: https://www.simplified.guide/ssh/x11-forwarding-as-root

Bugzilla is for tracking software defects. This is not a defect but a user problem. Please contact the interactive support (chat, email, forums) if you keep having issues.