AlloyTools / org.alloytools.alloy

Alloy is a language for describing structures and a tool for exploring them. It has been used in a wide range of applications from finding holes in security mechanisms to designing telephone switching networks. This repository contains the code for the tool.
Other
695 stars 124 forks source link

Graphics Environment xhost issue on Fedora 34 #153

Closed createyourpersonalaccount closed 2 years ago

createyourpersonalaccount commented 2 years ago

Hello,

I am trying out Alloy for the first time. I downloaded the 6.0.0 release (org.alloytools.alloy.dist.jar) from https://github.com/AlloyTools/org.alloytools.alloy/releases and I get this error.

[user@fedora bin]$ uname -a
Linux fedora 5.14.17-201.fc34.x86_64 #1 SMP Mon Nov 8 14:01:06 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[user@fedora bin]$ java -version
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment 18.9 (build 11.0.13+8)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.13+8, mixed mode, sharing)
[user@fedora bin]$ java -jar org.alloytools.alloy.dist.jar 
Unable to start the graphical environment.
If you're on Mac OS X:
   Please make sure you are running as the current local user.
If you're on Linux or FreeBSD:
   Please make sure your X Windows is configured.
   You can verify this by typing "xhost"; it should not give an error message.
[user@fedora bin]$ xhost
access control enabled, only authorized clients can connect
SI:localuser:user

How can I fix it? Fedora 34 by default uses Wayland. Is this perhaps part of the issue?

pkriens commented 2 years ago

This is a Linux problem, your xserver is not authorized for you. Are you running this from a shell?

I am closing this since it is not a problem with our software. You can ask for help on a Fedora forum or maybe someone on alloy.discourse.net can help.

createyourpersonalaccount commented 2 years ago

Yeah I'm running it from the shell as you can see in the code snippet above. I will ask people knowledgeable with Fedora and report back.

createyourpersonalaccount commented 2 years ago

Indeed this is Fedora 34 related. I fixed it with the following steps:

$ dnf install java-latest-openjdk
$ alternatives --config java

In the alternatives command menu, I chose the latest openjdk. After that, I could run Alloy!