262

Cocoa-Way – Native macOS Wayland compositor for running Linux apps seamlessly

Forgive the naivety, but what graphical Linux apps are people trying to run that don’t have native MacOS builds? In my experience, Linux GUIs are generally written in Qt or GTK, both of which are multi-platform.

I don’t doubt that they exist, I’m just struggling to think of a popular example.

10 hours agocyanmagenta

That's not the use case. The use case is running apps from a remote Linux host as a local window. A performant VNC for specific windows if you will.

For example, you could run VS Code on that machine as a window on your Mac. A more real world example is people accessing guis (e.g. matlab) on lab clusters.

The closest set up for x11 would be to use x11 forwarding with xpra.

5 hours agofny

> The closest set up for x11 would be to use x11 forwarding with xpra.

Older versions of macOS even had an X server distributed by Apple that you could install on your machine, and if memory serves right you were then easily able to forward X11 from a remote Linux host (or other operating systems running X11 applications) using ssh and have it render to your macOS desktop.

From a quick google search there is apparently still an Apple supported third-party open source project called XQuartz one can use.

https://en.wikipedia.org/wiki/XQuartz

X11 forwarding with ssh and XQuartz looks to work the same way that I remember using the Apple distributed X server in the past. Install the X server and then use the -X flag of ssh. Same way that you forward X11 between two Linux computers, or Sun workstations or whatever with an X11 desktop, over ssh.

https://docs.cse.lehigh.edu/xforwarding/xforwarding-mac/

3 hours agoQuantumNomad_

This is Wayland. You could use xprs

2 hours agoLeFantome

wprs? Does not work for mac yet IIRC...

an hour agovasvir

Or running applications within fully sandboxed VMs on the local machine, but with native-ish forwarded GUI. Great for dev.

4 hours agoadastra22

We run TurboVNC from macOS to beefy Linux servers on the daily. Just tunnel the connection over SSH. It's been solid for 5+ years.

3 hours agosemi-extrinsic

This is Wayland. You could use xprs (or Waypipe).

Sorry, I responded to the wrong comment.

2 hours agoLeFantome

Isn't better to run native VS Code and have remote SSH session? It very much works as if it was local (on fast low latency network). Only issue is moving files.

2 hours agovarispeed

This is very interesting to me for two reasons:

1. I'd really like to run my development environment for things under Siri for its tiling window management but for better or worse I'm deeply embedded in the Apple ecosystem for everything else, this looks like it could be a really nice way of doing it (possibly once multi monitor support is in).

2. There are still a few applications which have supported Linux builds but no support for macOS (Iridium's Niagara Workbench application for configuration of building management systems springs to mind here). Since Apple ended support for Quartz this has been a bit of a pain to deal with.

9 hours agojon-wood

Popular apps? Probably not many.

But in the field of integrated circuit design there’s lots of apps that are Linux-only. I’ve tried to run some of them in containers on Mac. But XQuartz is awful.

If they ever transitioned to Wayland perhaps this would let us run these apps on Mac in a nice way.

On the other hand some of them have started getting ARM builds (for running simulations on certain cloud environments) so maybe native Mac GUI builds could happen someday soon.

9 hours agoaudunw

> But XQuartz is awful.

What issues are you seeing with it? I use it pretty heavily and have no complaints…

4 hours agoaddaon
[deleted]
3 hours ago

What about this plus XWayland? Would that do it?

6 hours agoMBCook

Apart from just running Linux apps, you can use this to run graphical applications remotely on a Linux server, like X11 forwarding.

9 hours agoubercow13

I thought Wayland was different from X11, and didn't allow this. But I'm far from an expert on this topic so I'd like to learn more.

8 hours agopkaeding

Wayland natively isn’t built for forwarding the way X11 is. Waypipe fixes this, providing an X11 protocol equivalent for Wayland. This project is a waypipe client for macOS.

4 hours agoadastra22

https://github.com/neonkore/waypipe proxies Wayland over a network. It’s straightforward enough in theory: Wayland core is just a communications protocol plus shared memory; so you just need to forward the messages, and detect and send changes in the shared memory. Not the cheapest thing, but perfectly tractable. Of course, there are also more difficult extensions, like GPU integration, but that sort of thing was a problem for X as well.

7 hours agochrismorgan

This is how modern x11 worked too since nobody uses software rendering with x primitives anyway.

7 hours agoTingPing

here is Wayland vs X11 visualised.. it might help - https://vectree.io/c/compositing-window-management-architect...

6 hours agofunctional_dev
[deleted]
3 hours ago

According to that page Wayland's architecture is simpler than X11.

6 hours agoamelius

If you put everything into a monolith, it looks simpler than if you have components that have to speak protocols to each other.

5 hours agodsr_

Rio and its predecesor in Unix v8/v10 did it better than X. In some cases we got the worst:

- POSIX bloat vs Plan9's simple C and even simpler API

- ioctl's vs everything it's a file

- Complex socket spawning vs open() and dial() under Plan9/Go

- ALSA vs tuned up OSSv4, or plaing audio/mixerfs under 9front

- find -which syntax is huge- vs walk -f (or -d for dirs) | grep

- RDP/VNC/SSH/NFS/SMB vs just rcpu+auth (9p) and run rio(4) and for files... 9fs which does a simple bind()

- Symlinks and hard links vs bind and namespaces.

- GDB and SSH vs importing a remote /proc in a rio window and remote-debugging your damn remote machine as if it were your own. How cool is that? Ditto with devices. Import sound cards, network cards with the whole IP stack. NAT you say? No more.

- FFSv2 (hello OpenBSD) vs current GeFS under 9front which is like a miracle over what OBSD it's trying, the bad ZFS license or BTRFS not being ready on GNU yet. Probably the Hurd people will port GeFS to Hurd/Mach first, before BTRFS gets even ready...

- Dynamic vs static linking. 9front, a suite of multiarch compilers. Set $objtype, compile, link, deploy a standalone binary. Ready, as if it were a Go binary under Unix, but without glibc oddities. ARM binaries from 386? Done. You need a crazy long i686-gnu-foo-bar and the rest of crazyness? Not anymore. These come in src form, compile and install them, no internet required. Literal two damn commands to do so, from any to any arch.

- SH/KSH/Bash. Complexity ridden shells. Here's rc. No aliases there, just functions. No complex escaping, just () for strings, ^ to concat, ' ' for quoting. Problem solved. Even the conditonal words' syntax it's like throwing down all the complexity giving you a weirdly simple shell.

- PCRE and ex commands under vi/nvi/vim (bloat) vs Sam and structural regexes. Sam it's like a graphical vi, period, there's nothing alien of it. Imagine a modeless vi with a small frame to input commands with an easier syntax:

     x/lookup/c/replace 
These can be chained with ease.
3 hours agoanthk

I want to use KDE Plasma instead of Mac OS ugly (in my opinion) interface

9 hours agoxlmnxp

This is possibly the first time in human history this opinion has been stated.

9 hours agovovavili

I've been using Linux on the desktop for decades at this point. KDE Plasma is my current favorite and I've been using it for a few years now. It has everything you'd want in a desktop (maybe a bit more), looks great, and is very fast even on modest hardware.

My current job has me using MacOS on an M3 Pro Macbook and I find it barely tolerable compared to KDE. Usually when I want to do something new or change some configuration, either there is no way to do it, or it's hidden behind some key combination that I never would have guessed. I would describe the overall feel of MacOS as "syrupy." When using the mouse or typing, there is almost always some kind of barely-perceptible latency. Nothing is ever crisp and instant. (This isn't specific to this machine, it feels the same way on every Mac I've borrowed.) It's sort of like someone decided that the only way to make it smooth was to also make it slow.

4 hours agobityard

It really isn’t. There are a great many people who use macs for work but who do not like Apples design choices. And that number has skyrocketed even further since Liquid Glass was pushed onto people.

In fact one of the front page articles today is literally calling macOS “ugly” in the title.

8 hours agohnlmorg

Sir I’m here stuck on somewhat workable Sonoma, dread the day enterprise IT forces the push of Tahoe and would take a kde box in a heartbeat.

21 minutes agobaq

I don't want KDE but I would much prefer gnome to macos desktop, I think it's both prettier and more functional, and that's not a tahoe thing. I hate finder too, and don't see any way to properly use an alternative.

9 hours agopolshaw

not sure about the looks but I also find KDE much better in usability

6 hours agoozgrakkurt

Similar opinions are voiced in about every recent macOS UI thread, and even occasionally in Windows threads.

9 hours agolayer8

I mean Apple hasn't done itself any favours with Macos Tahoe.

9 hours agosersi

“Liquid Ass” as some people say.

7 hours agodrob518

To be honest, I agree a little bit because I remember from my time at customizing KDE that everyone wanted it to make it look like Mac OS

but it feels a bit of peer-pressure/cool-factor, people used to like how Mac OS look but after Tahoe, I feel like most people don't.

To be honest, I am on mac right now but I really like Niri/Hyprland and to a degree KDE as well. I definitely feel like those were immensely more customizable and I miss that customizability, even if some people might use that customizability to make it look like MacOS default.

9 hours agoImustaskforhelp

Then you want to run KDE on Linux. This is not going to replace your native mac desktop environment.

7 hours agocoldtea

Honest question: why use MacOS at all then? If you prefer KDE, why not run a system that KDE natively supports? Is it a particular MacOS application? Or is it that Linux support on Mac hardware is not good enough?

7 hours agoMarsIronPI

Linux has good support for m1 and m2, so for newer devices running a custom desktop would be neat.

7 hours agoTingPing

I think there are many use cases for this software.

For example, you may not want to run some graphical applications directly on your Mac for security, isolation or testing purposes.

If this software turns out to be lower latency than RDP and CRD, I could also see it being very useful for accessing a remote graphical workstation (e.g.: running heavy software on an beefy machine in a data center instead of taking up resources on my skinny laptop).

9 hours agoboschetto

The first thing I wondered about was running GUI apps in a Linux container.

2 hours agoLeFantome

There’s a bunch of old Fortran stuff I use regularly (AVL, XFoil), but that’s all X, not Wayland, and XQuartz has worked great for decades.

4 hours agoaddaon

It's not necessarily something only available for Linux, but something that you want to containerise. (And then it's inherently running on Linux.)

9 hours agoOJFord

Emacs runs much faster and better on Linux VMs. And I have a VM for each client I work with.

7 hours agookayokay123

Try building Inkscape or GIMP from source on macOS and see how "multi-platform" those GTK apps feel in practice. Even when a Mac build exists, it is often skinned oddly or lags because somebody has to carry Mac patches against an old fork.

This is for the long tail. The compositor path dodges a pile of volunteer-port churn and runs the Linux build directly, which is a lot more appealing for niche GUI tools and dev apps that barely get maintained on Linux, never mind macOS.

8 hours agohrmtst93837

Native GTK apps on macOS are often more broken than running it in a VM or Parallels, in my experience. I used to use Gitg on macOS and it was a terrible experience all around.

5 hours agobigyabai

PuTTY

8 hours agopajko

That's a Windows app.

7 hours agocoldtea

PuTTY is absolutely available for Linux. On Debian-based distros it’s just a `sudo apt install putty` away. But why?

7 hours agoalt219

One possibility is to run its terminal emulation somewhere else. But of course terminal emulators are a dime a dozen on Linux.

2 hours agoasveikau

Perfect.. this will allow me to run GUI apps in a container.

I did a similar thing with X11, but I didn't like so much.

Bit by bit, Apple is loosing it's Desktop position. It all starts at the developers. At soon, every person will be a "developer".

9 hours agojbverschoor

In reply to then throwaway.

Anything I want sandboxed or “grouped”.

Work on a project -> open the relevant container.

Similar to parallels window integration mode.

It’s all from shortcomings to have a hierarchical view on your data and applications.

Goal: isolation. Security-wise, and focus-wise

6 hours agojbverschoor

[dead]

8 hours agothrowaway613746

I need something like this for android, termux-x11 is a good start but if termux gets wayland support or there is a way to expose wayland sockets from the android native linux VM, the only thing missing is a native rendering compositor for a smoother experience

5 hours agojFriedensreich

This looks like slop? The README is full of emojis and kind of incoherent, there are no implementation details, there claims to be a Metal backend that doesn't seem to exist, etc.

The dependency list is also...something: https://github.com/J-x-Z/cocoa-way/tree/main/vendor

6 hours agoskrrtww

This is definitely not worth using. It doesn't even say what hypervisor its using. Is it using QEMU? Docker? Podman? Lima? Colima?

And also this chart is super weird:

    Solution  Latency  HiDPI    Native Integration  Setup Complexity
    Cocoa-Way Low      Yes      Native windows      Easy
    XQuartz   High     Partial  X11 quirks          Medium
    VNC       High     No       Full screen         Medium
    VM GUI    High     Partial  Separate window     Complex
A standard VM will always be the easiest to set up by far. And latency should be the same across all 4. I mean after all it's a VM running on your local machine. Honestly I don't even know what it means when it says "Latency".

I also looked at some of the code and it's using OpenGL 3.3 Core which is... super old. But it makes sense in the context of this being LLM-generated since most of its training data is probably OpenGL 3.3 Core code....

Overall this project is very strange. It makes me feel more confident in my skills, AI isn't all that great. It's all hype. You can get to the frontpage of HN. And if you're Peter Steinberger you can get acquired by OpenAI for a billion dollars. But that's about it. The code isn't getting any better.

This reminds me of that C-compiler-in-Rust publicity stunt by Anthropic. There's no substance. It's just a headline.

4 hours agojhatemyjob

While I agree with the rest of your comment, they do mention they use OrbStack as their hypervisor in their demo video.

3 hours agolights0123

Gotcha thanks for that info. Yeah that's insane. You have to read the description of a YouTube video to understand what a project on Github is doing. There is no architecture here.

2 hours agojhatemyjob
[deleted]
3 hours ago

Now, if only macOS still had the ability to drop to a Darwin shell without a GUI at all… we could just have a nice UNIX with something like KDE or COSMIC, brew as our package manager… what a dream.

7 hours agoBirAdam

Yeah, why stick to the inferior kernel used by macs with a worse package manager? Like something like nix is just superior in every sense.

an hour agogf000

But why MacOS then? If you take away the interface what differentiates Darwin from FreeBSD or GNU?

7 hours agoMarsIronPI

That it will actually run on Apple Silicon.

TBH, I would love to install GNU or BSD on my M4 Max Mac Studio. What I really wanted is a modern UNIX workstation. My Studio’s price/performance was the best available, so that’s what I bought. Now, I am happy with that purchase except for the constant diminution in software quality from Apple.

7 hours agoBirAdam

If I could buy modern apple hardware and run the Linux of my choice, I probably would. I have 0 interest in the apple ecosystem.

3 hours agoesseph

I wish I could get an Apple SoC in a 2013 Thinkpad chassis.

3 hours agoMarsIronPI
[deleted]
7 hours ago

Performance on apple chipsets!

7 hours agokomali2

On intel macs there used to be single user mode, but even then I don't think you ever had control over the framebuffer.

2 hours agokrackers

Wow. Would this allow a macos-based wayland-client to create an EGL surface?

8 hours agotsuru

Very interesting, can this run something like android using waydroid within Orbstack too?

It would then essentially run android on macos as well, I do feel like it should be possible.

10 hours agoImustaskforhelp

Now if we could switch MacOS to use Win/Linux keyboard commands, MacOS wouldn't be so insufferable

9 hours agoanArbitraryOne

Many of the keyboard commands are configurable in settings, complete with switching cmd and ctrl keys around. Or you can get used in a week or two when switching, this is what I did years ago and now for me Win/Linux is confusing and find the location of the command key more ergonomic on a Mac.

Here some history on how the command key came to be https://www.folklore.org/Swedish_Campground.html https://en.wikipedia.org/wiki/Command_key

9 hours agojurmous

Incredibly L take. macOS keyboard commands are great for working in the terminal since system shortcuts use a different key and don't interfere with control codes

8 hours agoSuperManifolds

Exactly. You don’t have the terminal itself fight with whatever is running on the other side of the term.

7 hours agodrob518

Sorry having to use ctrl+shift for in a terminal is absolutely awful. macOS keyboard shortcuts are king.

7 hours agocpuguy83

agree. I guess it's a force of habit, but I am so used to the cmd+<whatever> (specially copy & paste) shortcuts, that I configured them into my linux desktop to behave the same way

7 hours agodagi3d

Being limited to just control and alt definitely cuts down on the options. Conversely, having MacOS command key act as “super” in Emacs opens up some possibilities.

7 hours agodrob518

Super key for most keybinds is much nicer than windows in my opinion, where it is entirely wasted on opening the start menu. On Linux it gains a few functions based on the desktop environment but not much.

9 hours agorick_dalton

The use of the Windows key extends far beyond the start menu. Builtin functions include window management, invoking programs on the taskbar, locking the computer, invoking Explorer and Settings, invoking and controlling accessibility functions like Magnifier. The Microsoft Power Toys add a lot of functions using the Windows key by default as well, like screen snipping, screen OCR, color picking, enhanced clipboard, and many more.

9 hours agolayer8

My problem is that I don’t use the majority of these functions at all. Command I can use for almost everything no matter how frequent or infrequent. It also replaces most “ctrl+shift” binds which is a great plus for me.

8 hours agorick_dalton

That’s still like 10 uses vs unlimited uses on macOS

8 hours agodaveidol

It may be ten uses, but it's ten uses I use constantly throughout the day.

7 hours agofreedomben

You must not use MacOS. Command gets used all over the place, even during editing. And in Emacs it gets used as Super, which opens up some options.

7 hours agodrob518

Even just the window management category is more than ten uses. And it is unlimited uses, as you can assign additional shortcuts however you like.

7 hours agolayer8

I mean, you can simply use Linux and save yourself all those hacks…

9 hours agop-e-w

Absolutely. I went through great lengths to install Asahi on my work M1, only to have most things not work (RTFM). So when one is forced to use MacOS, may it round corners in hell, for work…

9 hours agoanArbitraryOne

Aside: the new, large radius Liquid Ass corners that make some parts of the window basically unusable are really annoying me.

7 hours agodrob518

As someone that switches between MacOS (dayjob) and Linux (my own PCs) workstations daily - I wish I could do the opposite for Linux. MacOS keyboard shortcuts are just way more intuitive to me, and they are way more consistent across applications.

8 hours agothrowaway613746

Wonder if this will bring at least a tiny amount of interest to GNUstep.

6 hours agokogasa240p

Neat, but wouldn't it be better to have the windows as "seamless"? I.e. not contained within another window.

9 hours agoIshKebab

[dead]

an hour agolzhgusapp

[dead]