flathub / com.jetbrains.Rider

https://flathub.org/apps/details/com.jetbrains.Rider
1 stars 8 forks source link

Add Wayland support #69

Closed dorianfarrimond closed 1 year ago

dorianfarrimond commented 1 year ago

Enables the Wayland socket so Rider will launch on Wayland-based systems such as Fedora

flathubbot commented 1 year ago

Started test build 47976

flathubbot commented 1 year ago

Build 47976 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/30578/com.jetbrains.Rider.flatpakref
FakeShemp commented 1 year ago

Last time I checked, Jetbrains products did not have Wayland support. Has this changed?

dorianfarrimond commented 1 year ago

Should have added a bit more detail on this. I installed Webstorm and Rider flatpaks on Fedora 38. Webstorm launched fine but Rider did not. This was the error (although I think it's misleading): The IDE cannot execute a test script in the directory. Possible reason: the partition is mounted with 'no exec' option. Using Flatseal, I compared settings between the two flatpaks and noticed that the Wayland socket wasn't enabled on Rider. I enabled it manually and Rider now launches. After checking the flatpak repo for Webstorm I could see they had the YAML entry to enable Wayland so this PR copies it for Rider.

Perhaps the apps run under XWayland? Can confirm that the apps do run.

FakeShemp commented 1 year ago

Trying to start it with Wayland socket gives

Startup Error
Unable to detect graphics environment

so it doesn't really work like it should under Wayland.

Seems to be unfinished according to https://youtrack.jetbrains.com/issue/JBR-3206

Your issue seems more like it's related to a broken config or cache or something like that. Check ~/.var/app/com.jetbrains.Rider/cache/JetBrains/Rider2023.1/.

dorianfarrimond commented 1 year ago

I'm not sure why you get a different result but what OS is this? Doesn't XWayland provide compatibility regardless of native Wayland support? Happy to check that directory but there's a lot in there so what would I be looking for?

They have the socket switched on in the Webstorm Flatpak, which works straight away https://github.com/flathub/com.jetbrains.WebStorm/blob/d1462ea4e87bf27287b2909062c2fa8411c287ff/com.jetbrains.WebStorm.yaml#L16

And IntelliJ https://github.com/flathub/com.jetbrains.IntelliJ-IDEA-Community/blob/35a437b930fae11bb60764642ac0fe914cb01d89/com.jetbrains.IntelliJ-IDEA-Community.yaml#L14

FakeShemp commented 1 year ago

Tested it on Fedora 38. I was able to reproduce the issue you had but it was due to issues with the cache, seemingly unrelated to Wayland. It appears it complains about the tmp folder, but I'm not sure the exact issue. Deleting the cache solved the issue.

XWayland is just a wrapper around X11. So even if you use XWayland you need to expose the X11 socket in the flatpak. The Wayland socket is for the Wayland protocol.

Could it be that those other IDEs have Wayland enabled to run Wayland apps built from the IDE?

dorianfarrimond commented 1 year ago

Thanks for looking at this further.

What made me think the Wayland socket was the fix is because Rider repeatedly failed to launch, and when I enabled that socket, it launched first time, with no errors.

However, I've done some more investigation by going back to Flatseal and disabling the socket. The first time I relaunched Rider, it reported a crash in jspawnhelper but did still launch. On repeated launches, there have been no errors at all. So it does point to more going on than just the Wayland socket. Not sure of the mechanism for why a flatseal change got the app working though.

Ultimately I know very little about low-level Linux so will defer to you! Is a better option to raise a bug on the error that happens when launching post-install, and close this PR?

FakeShemp commented 1 year ago

I appreciate the pull request, I really do.

You can leave this PR open and I'll have a deep dive at what really causes the problem (as well as take a look at the jspawnhelper error) when things get a bit less hectic for me in a couple of weeks.

Thanks!