I have been using Xephyr and dwm for a while in a nested X11 session, and I grew sick and tired of having all the weird aliases in my bashrc and decided to make a little project that handles this for me in a nicer way.
It’s not really an ideal situation, but I do like having Gnome around with all its niceties it brings. A lot of this stuff could be achieved with tmux for sure. I’m not arguing that. I use tmux extensively as well. But since I’ve been using dwm for a long time, this kind of marries the best of both world for me.
Maybe this would vibe with some of you.
https://github.com/mitjafelicijan/clutch
Thanks for any feedback or comments.
Cheers
One limitation that may or may not matter for your particular use case: I don’t believe that Xephyr has a mechanism to do pass-through 3d acceleration. So if you’re gonna have everything go through Xephyr, one constraint is that any window that you’re sticking in a dwm is just gonna have access to a plain-Jane framebuffer.
If you’re only managing terminal windows – you mention tmux as an alternative, so that may be what you’re going for – then that may not be a concern, though there are some accelerated virtual terminal software packages.
EDIT: I have not done this myself, but it sounds like it’s possible to run nested compositors inside Wayland.
https://old.reddit.com/r/swaywm/comments/196h5bl/is_nested_swaywm_supported/
I don’t know if that can be used in the same way, but running dwl – like the X11 dwm window manager, but a Wayland compositor – inside a host Wayland session might work, if you’re using Wayland rather than X11 as the “host” environment. I’d guess that that wouldn’t have the same limitation.