Follow

I've mentioned this a few times but never publicly announced it, so consider this the announcement.

Yes, I have ported (along with a few Weston clients and wl-clipboard) to the (that's what I wrote the epoll server for!)

I've also ported Owl, my Cocoa Wayland compositor, from OS X to the Hurd using GNUstep.

Here's a screenshot of weston-terminal and weston-flower, running on Owl on GNUstep on Hurd, with X forwarded from a QEMU VM via SSH.

@bugaevc

> Yes, I have ported #Wayland (along with a few Weston clients and wl-clipboard) to the #Hurd (that's what I wrote the epoll server for!)

Very cool, congrats!

As someone who hasn't been following the #hurd very closely, how usable/close to usable is it these days?

@codesections hah, this is the question I always get whenever I post about the Hurd :D

It is pretty usable as a (server, command-line) Unix system. Modulo a few bugs and hangs, things work much as they do on GNU/Linux (and you can do all sorts of fun stuff with translators).

It can kind of run X.Org, Xfce/LXDE, and even simple web browsers (you can toot using the Hurd!). But it's very unstable and lacking drivers for any serious/modern hardware, so you wouldn't use it as your daily driver.

@bugaevc

> hah, this is the question I always get whenever I post about the Hurd :D

Sorry for not being more original :D

Thanks for the info, though. Sounds like it's getting really close!

@bugaevc I wonder, which quirks and issues have you found when developing for Hurd?

@espectalll well, the big one was that there was no epoll or anything similar (kqueue would suffice), only select and poll. So I had to write my very own epoll server & client implementation with the same API as Linux implements.

Of course, there's no PATH_MAX and no limitation on the length of file paths (number 1 problem with trying to port any software to the Hurd); I had to workaround this in the wl-clipboard port, and since it's my project I'll actually upstream the changes, so that's nice.

(1/3)

@espectalll

Then of course I had to port Owl from OS X Cocoa to GNUstep Cocoa (so these few following quirks are due to GNUstep, not Hurd). There are a bunch of differences: there was no libdispatch and block support, so I had to rewrite all those dispatch_once calls (Owl is otherwise single-threaded, so that wasn't too hard). GNUstep's NSRunLoop works differently compared to Apple's (which wraps CFRunLoop), so I had to rewrite OwlRunLoopSource to use GNUstep's API extension instead of a CFSocket.

(2/3)

@espectalll And GNUstep doesn't really have CoreGraphics (there is Opal, but GNUstep is usually built without it), so I had to rewrite the actual OwlShmBuffer rendering code to use the old Cocoa drawing APIs (and do some manual pixel format conversions — that was fun to debug!).

And since the Hurd doesn't use a bootstrap server nor has IOSurface's, I dropped zowl_mach_ipc_v1 and zowl_iosurface_v1 protocols & their implementations, so there's no shared GPU buffer OpenGL rendering, just CPU & shm.

3/3

@bugaevc That's awesome! Are you planning to publish the Wayland patches and possibly the Owl source? I think that could prove to be useful, or at least very interesting for a number of people.

@YaLTeR no need to pretend we haven't talked about this 😉 Yes, I plan to eventually publish Owl & the patches, but I haven't done so yet (gotta release wl-clipboard 2.0 first :D)

I've already sent several people (including you!) the sources dump; if anyone else is interested, ask me & I'll PM you the sources.

@bugaevc @mike That are so many terms that I'm 100% confident I'll never get that to work.

@bugaevc As you say it's lacking drivers would it be an idea to focus on hardware like a T400, which can be run only on open source software incl. the bios (libreboot)? So at least to make it work there without driver issues and the expand the number of drivers step by step?
@bugaevc I tried to merge the work that @slp did on Wayland backend for GNUstep, but it was broken when I last tried. Long ago I tried to figure out why is it that the events were being accepted into a surface (indicating a window is opened), but nothing is drawn in Weston.

Would you be interested in merging your work, or helping me figure out what's broken in the relevant branch? To my limited understanding of Wayland, back when I was trying to merge it, Sergio's work should have functioned ok.
@bugaevc (I'm not sure if you added a gnustep-gui/gnustep-back or just used gnustep-base, but either way I wouldn't mind help, as my fiddling with Wayland is really just tapping in the dark.)

@slp

@ivan @slp oh hi!

I think you're misunderstanding my post. I did not write a Wayland backend for GNUstep; I kind of did the reverse, I wrote a GNUstep backend "for Wayland". Namely, Owl is a Wayland compositor/server and a Cocoa app; it renders its clients' windows that it receives over Wayland using Cocoa as its backend (a lot like XQuartz does for X11).

The Cocoa implementation (here, GNUstep) then of course uses a backend of its own to render; here it's X11.

@ivan @slp that being said, I'd love to hack on a Wayland backend for GNUstep, please point me to your branch :D

@bugaevc
I probably shouldn't try to reply when I'm overly sleepy -- in the second toot you can see I sort-of figured out you did a compositor, but even so, my brainses skipsy wordie and messez up meaningses.

See the work from last year:
https://github.com/ivucica/libs-back/tree/ivucica-wayland
https://github.com/ivucica/libs-gui/commits/ivucica-wayland

I have not touched it since.

If you want to talk over XMPP, let me know your JID so I can whitelist that domain for federation. Or we can talk on IRC, or we can just email. Or I can just work on merging changes you spot need to be done into upstream, if that's enough!

@slp

@ivan @slp thanks! I'll check it out and get back to you.

Sorry, I don't use XMPP; email or IRC (or just ActivityPub!) are fine. Which one do you prefer?

@bugaevc
For more detailed discussion let's do email. I might see emailed things sooner than the fediverse ones.

My email matches my fediverse id :) and I am sometimes on IRC.

We can use fediverse or email to figure out realtime chat. If you want to look at things on a particular evening or weekend day while chatting over IRC, lmk.

PS XMPP is awesome these days, and on mobile it's gotten really good on Android with a client called Conversations. :)
Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!