cerus / observatorycore-linux

Unofficial ObservatoryCore builds for Linux
https://github.com/Xjph/ObservatoryCore
2 stars 0 forks source link

Current state of ObservatoryCore on Linux #3

Open cerus opened 1 year ago

cerus commented 1 year ago

Hello all,

the maintainer of ObservatoryCore, Xjph, has recently announced that Linux support will be completely dropped. They are planning on rewriting the UI with WinForms, which is not compatible with Linux. To directly quote Xjph from their post on the Frontier forums:

I originally chose AvaloniaUI as my UI framework because it [...] was compatible with both Windows and Linux [...]. Well no Linux build I ever did was in what I would consider a "releasable" state, and on top of that my use of AvaloniaUI has not really been a great time. For Linux users who were perhaps holding onto the hope of an official Linux release, this is unfortunately the final nail in the coffin for that particular goal. Sorry I never made it work.

This means that all future updates to ObservatoryCore will not be compatible with Linux. I will try to maintain a fork that keeps using Avalonia, but I can't guarantee anything. I don't know how much work it's going to be or if it is even possible, especially since I'm really not that skilled in C#.

Let me know your thoughts.

Ambient-Impact commented 5 months ago

That's really disappointing considering more of us continue to jump ship to Linux now that it's become a real and viable platform due to Valve's and other organizations' efforts. I'm a web developer, so it's a bit outside of my area of expertise, but I know of multiple cross platform toolkits, so it's strange to pick a Windows-only one at this point. Don't get me wrong, I fully appreciate that we're getting this for free by someone doing it in their spare time who doesn't owe us anything, so this more just frustration on my part seeing this wonderful tool put another barrier up for people like us wanting to move away from Windows.

That said, given that we've gotten the EDHM UI working on Linux - which I can confirm does indeed work once you jump through all the necessary hoops - the next best thing might just be to see if ObservatoryCore using the WinForms UI runs under Wine. Might save you some work.

Ambient-Impact commented 5 months ago

Wine update: it totally works:

Screenshot from 2024-04-02 02-32-16

Mind you, this is still with Avalonia so it'll be interesting to see if Wine can handle the WinForms version.

I'm planning on throwing together a script and a guide for how to do this for newbies, but the short version is:

The only major issue is probably unrelated to this but the Observatory notifications always steal focus from my game which is incredibly annoying. That's more a GNOME issue though, so will document a fix if I find one.

cerus commented 5 months ago

Thank you for sharing your findings. The focus stealing thing is also a problem on KDE, my workaround was to simply set "Focus stealing prevention" to "High" whenever I used the app. Not sure if Gnome has a similar setting.

Ambient-Impact commented 5 months ago

Unfortunately, GNOME only seems to have a setting for things launched from a terminal but it doesn't do anything for anything launched in other ways. I'll have to keep looking, but I don't have high hopes at this point. The only alternative without switching to Plasma (which I may do at some point) seems to be to run Observatory in its own virtual desktop, which does prevent focus stealing but the big downside is that the notifications can't be displayed outside of the virtual desktop window, and so they're less useful.

Ambient-Impact commented 5 months ago

Also started using Bottles to sandbox and manage Wine stuff, and it does work very well for Observatory, so I recommend people use that instead of the manual method if only for the sake of security and that it's got a nice UI.

Note that the default runner is soda, which doesn't seem to work, but if you change the bottle runner to Wine, then it works perfectly.

Ambient-Impact commented 5 months ago

I don't know much about .NET stuff or desktop programming in general, but I do wonder how easy it would be hook into Observatory to alter those notifications, either completely disabling them and sending off their content to whatever native API for notifications exist in GNOME and other desktop managers, or worst case, we figure out how to watch for those notification windows being spawned and immediately return focus to the window or app that had focus just before.

Thinking farther ahead to the WinForms port that's planned, it looks like Wine uses something called Mono to run .NET stuff, and apparently Mono has a WinForms implementation, so maybe it'll just work?

cerus commented 5 months ago

I wrote a observatory core plugin a while ago that replaces these popup notifications with notifications from notify-send (from package libnotify on Arch). I'll see if I can find it on my drive, maybe it solves your issue.

Ambient-Impact commented 5 months ago

Heck yeah. That would be awesome. Will that work on the Windows build under Wine?

Mlippo commented 3 months ago

Thanks to all the discussion around this I got Observatory Core running under bottles. One thing I can't figure out is what font the Bioinsights plugin uses for the icons. Right now it's just the default white squares. Anyone have any ideas? image

Ambient-Impact commented 3 months ago

@Mlippo Glad to help! I noticed that too but only briefly messed with the plug-in's settings to try and fix without luck. I don't recall seeing the source for that plug-in being available, which would have been the first thing I would check to see if the font was set in there somewhere.

cerus commented 3 months ago

I think those are emojis (https://archlinux.org/packages/extra/any/noto-fonts-emoji/)

Ambient-Impact commented 3 months ago

Yup, pretty sure you're right. I'll try setting the font to Noto when I get a chance and see if that fixes it. Not home at the moment.

Ambient-Impact commented 3 months ago

Alright, so I took a look at my set up, and my workaround was to choose "Set 3 [No emoji]": image

It's not as fancy, but it's at least something: image

I have the Noto fonts installed, but it doesn't seem like they're being used for this, so maybe someone can figure out what font it's expecting and how we can get Bottles/Wine to provide that.

Ambient-Impact commented 3 months ago

Not sure what changed, but apparently using soda as the runner in the bottle works for me now. I think I may have installed the .NET runtime in the bottle during some tinkering and that might be the reason, but not 100% sure. If someone can try creating a new bottle using the default settings, install an appropriate .NET runtime that Observeratory requires, and see if it launches, that would help verify this.

Edit: Looks like soda-8.0-2, which was the default when I first installed Bottles, has some weird issues when the game is focused, where it seems to lock up Observatory and its notifications until they get alt-tabbed to. I only just clued in that I can install other runners so going to try caffe-9.7 and soda-9.0-1 to see if those fix that problem.

Ambient-Impact commented 3 months ago

Also it looks like Xjph has released a preview build of the WinForms UI overhaul so I'm going to test that out when I get a chance.

Ambient-Impact commented 3 months ago

Side note: as much as I love Pop!_OS out of the box, until the COSMIC desktop environment is ready, I'm very likely going to try KDE Plasma sometime soon because Observatory notifications stealing focus no matter what I try is driving me bonkers.

Mlippo commented 3 months ago

I'm on Linux Mint Cinnamon and I don't have the focus stealing issue.

Ambient-Impact commented 3 months ago

Yeah, I think it's likely an issue with GNOME that I'm running into.

Ambient-Impact commented 2 months ago

Alright, so I finally tried to KDE Plasma and wow is it so much better for gaming. The window rules alone are awesome and completely fixed any focus stealing issues. Here's the rule I set up that works for me:

Screenshot_20240704_004801

Note that this is on Plasma 5.x running X11 so I haven't tested this on Plasma 6.x and/or Wayland.