f_ changed the topic of #wayback to: Wayback - a wayland-based X11 environment | https://wayback.freedesktop.org/ | preview release 0.1 is out! https://wayback.freedesktop.org/news/2025/07/23/wayback-0.1-released/ | src: https://gitlab.freedesktop.org/wayback/wayback | logs: https://libera.catirclogs.org/wayback | matrix bridge: #wayback:catircservices.org
grufwub has quit [Remote host closed the connection]
grufwub has joined #wayback
<Wayback> @dramforever closed issue: #56 wayback-session with command instead of xinitrc doesn't work and forkbombs (https://gitlab.freedesktop.org/wayback/wayback/-/issues/56)
<Wayback> @kaniini merged merge request: !77 wayback-session: Use &argv[1] not &argv[optind] (https://gitlab.freedesktop.org/wayback/wayback/-/merge_requests/77)
tomate has quit [Quit: The Lounge - https://thelounge.chat]
tomate has joined #wayback
Ariadne is now known as Ariadne-ic
Ariadne has joined #wayback
Ariadne-ic has quit []
_whitelogger has joined #wayback
jvvv has quit [Quit: WeeChat 4.7.0]
__0x1eaf has joined #wayback
hiya has joined #wayback
<hiya> How does it differ from xlibre? Why are there two fork trying to claim the legacy of xorg?
<dramforever[m]1> hiya: wayback is not a fork of xorg and does not claim the legacy of xorg
<hiya> So, xlibre is a proper fork but this is a X11 server backed by Wayland
<dramforever[m]1> that's Xwayland, which is already a thing
<dramforever[m]1> this is a wayland compositor that runs one single client (xwayland) some wrappers to make it more convenient
<hiya> "leveraging wlroots and Xwayland"
<dramforever[m]1> yup
<hiya> so if we have xwayland already, why do we need this yet?
<dramforever[m]1> the goal is that this becomes a drop-in replacement of xorg
<dramforever[m]1> so for example, eventually, you can get your display manager to start Xwayback instead of X and it should just work
<hiya> so not a fork but a replacement? Would it still work without wayland when fully ready?
<dramforever[m]1> hmm, what do you mean by "without wayland"?
<dramforever[m]1> wayland is a protocol between which wayback-compositor and Xwayland communicate
<dramforever[m]1> it is completely internal when you use wayback
<hiya> so, when all of the code of xorg is purged, this is what would still make legacy X11 apps to function?
<dramforever[m]1> yes, but i think i should clarify what i refer to as Xorg. see: https://who-t.blogspot.com/2023/12/xorg-being-removed-what-does-this-mean.html
<dramforever[m]1> hiya: i think i misread, "what would still make legacy X11 apps to function" *is* xwayland
<hiya> dramforever[m]1: I think I need to understand this more, I am even more confused about the role of wayback now
<dramforever[m]1> you can run x11 window managers without wayback
<dramforever[m]1> If you have a wayland compositor, try this out: Xwayland -hidpi :3 & WAYLAND_DISPLAY= DISPLAY=:3 i3
<dramforever[m]1> but this is now how you normally start an X server
<dramforever[m]1> the role of wayback is to make this work the normal way you would start an X server, be it startx, or some display manager, or whatever...
<dramforever[m]1> dramforever[m]1: i meant "not how"
<hiya> Okay
anabelae[m] has joined #wayback
<anabelae[m]> You get to your login manager, select your favorite xwm and it will be started, even without having the xserver binary, which communicates with the underlying hardware, installed on the system. Instead of launching it with startx, it will run as a root Xwayland window started from wayback. That means Wayland is the one communicating with hw through translating x11 calls from xwayland
<f_> hiya: the goal of Xwayback is to replace Xorg while letting you run your favourite X11 WMs. It is essentially a glue for Xwayland but it will be much more than that later on.
<f_> Technically it using Wayland internally is irrelevant to the user, because it's an implementation detail (also you can't run other wayland apps with it)
<f_> But it should make maintaining support for X11 WMs alongside Wayland much easier
<f_> for distro maintainers that is.
<f_> Also compared to Xlibre we are interested in building sustainable solutions, not arguing about DEI and spreading hartred on mailing lists :P
tgirl has quit [Ping timeout: 276 seconds]
<hiya> so, when all of the code of xorg is purged - people could just use wayback, if and when required?
<f_> yep
<hiya> would it eventually do something about xwayland or it would always be required?
<hiya> or there is no comments on this for now, as to what the future of this project holds
<f_> Xwayland is still actively maintained, so no
<hiya> I see.
<hiya> Thank you so much for the kind information.
tgirl has joined #wayback
jvvv has joined #wayback
<f_> hiya: you're welcome!
<f_> Should we do 0.1.1 now?
<f_> that just includes d1642f03ee62ff3b42caf29e1ef6f233e4d12a86 ?
<f_> uh
<f_> 4b2ed58b0d467cc2fd184524c4aa184554581e34 I meant
<Wayback> 4b2ed58b wayback-session: Use &argv[1] not &argv[optind] (https://gitlab.freedesktop.org/wayback/wayback/-/commit/4b2ed58b0d467cc2fd184524c4aa184554581e34)
<axtlos> yeah we probably should
<f_> I'm around for today so I can amend the 0.1 announcement to mention 0.1.1, don't think a separate announcement is needed
<f_> Is this good?
<f_|cat> wouldn't it be nice if matrix stopped pinging me everytime I upload something
<f_|cat> :P
<axtlos> f_: Yep looks good
<f_> okay so that's what I'll push when either Neal or Ariadne do the 0.1.1 tag thing
<dramforever[m]1> looks good, i think the diff looks wrong - might just be the past thing eating something
<dramforever[m]1> *paste thing
<f_> huh?
<f_> weird, I use an irssi script to throw code snippets to soju's filehost thing
<dramforever[m]1> yeah i think that's corrupting the file
<dramforever[m]1> looks like just whitespace getting mangled
<axtlos> i dont see anything wrong with the diff?
<f_> huh even that
<f_> eh anyways
<f_> but stuff like this is fine
<f_> ok that's weird but minor :P
<dramforever[m]1> diff should look like https://fars.ee/wDmc
<f_> yeah I know
<dramforever[m]1> yeah that's for axtlos
<f_> okay
<f_> and no this is not the irssi script this is irssi itself or the double-tmux I have mangling
<f_> whatever
mojo_ has joined #wayback
vimpostor has joined #wayback
<f_> Oh by the way, maybe let's show the wayback version in -version ?
<bigmac> When executed with Xwayback, should it merge Xwayland output and Xwayback version output in a way? -version is a valid Xwayland flag and someone might want to check the version of Xwayland through Xwayback I can imagine
<f_> hmm I thought of that
<f_> but I'm not sure how useful it would be
<Wayback> @funderscore opened merge request: !78 show wayback version (https://gitlab.freedesktop.org/wayback/wayback/-/merge_requests/78)
<bigmac> Well the expected behaviour is to be able to pass flags to Xwayland. So when one passes the -version flag they might expect Xwayland's version
<f_> ^ maybe let's get this in too for 0.1.1? It's a minor thing
<f_> bigmac: hmm we don't pass *all* flags to Xwayland, only those that are unknown to Xwayback
<f_> and that aren't explicitely blacklisted
<axtlos> I don't think it's a common use to request the xwayland version through wayback
<axtlos> it's not like xwayland is exclusively a library, users can execute xwayland to get the version
<bigmac> f_: I am I reading it wrong that everything from argv gets passed over to the xwayland posix spawn?
<f_> nope, not everything gets passed over
<f_> all Xorg-specific options not handled by Xwayland are blacklisted
__0x1eaf has quit [Quit: Lost terminal]
<mccd> Heya, currently all Xwayland apps look blurry to me. Will this still be the case with wayback? Also congrats on the preview release :)
<f_> mccd: DPI?
<dramforever[m]1> mccd: xwayland being blurry is a compositor-specific thing
<dramforever[m]1> wayback-compositor doesn't do the scale thing
<dramforever[m]1> so it won't be blurry
<mccd> Ah nice
<bigmac> f_: I see, thanks. I tested your branch and it shows the version as expected. I am wondering - the log verbosity is being hardcoded to "LOG_INFO" currently, is that planned to change?
<dramforever[m]1> mccd: oh, also try xwayland-satellite
<dramforever[m]1> it might work better than your compositor's xwayland
<bigmac> f_: What I actually meant is - we can be showing useful information on wayback-session launch (such as the version), but there's a lot of wayland logs pushing it out of screen. Out of the scope of the MR, just wondering (And I don't think it has anything to do with the verbosity actually, as it is Wayland logs it seems)
norwoodites has joined #wayback
pinskia has quit [Ping timeout: 260 seconds]
Rndy has joined #wayback
norwoodites has quit [Read error: Connection reset by peer]
pinskia has joined #wayback
<f_> oh I'm not too worried about that bigmac
<f_> The log verbosity might be configurable later on
<f_> it's not a hard patch to write
<axtlos> where is the log verbosity hardcoded?
<f_> the wayback_log_init lines
<axtlos> ah right
<axtlos> yeah would be easiest to just have it an envvar
<axtlos> WAYBACK_LOG_LEVEL, if thats null set to LOG_INFO, otherwise whatever it has
<f_> oh I think it's probably better to have a -verbose flag
<axtlos> that would work too i suppose
<f_> it's what Xorg does
<axtlos> true
<axtlos> i wrote the log functions with heavy inspiration from wlroots, which uses envvars
<Wayback> @ulrich.sibiller opened issue: #57 document architecture graphically (https://gitlab.freedesktop.org/wayback/wayback/-/issues/57)
joast has quit [Quit: Leaving.]
<bigmac> axtlos: if we had both a flag and env var for it, which would take priority
<axtlos> we shouldnt have both
<bigmac> By the way, does the suppression of wayland / wlroots logs work for you. To make it so after launching wayback-session only our logs get printed and the xwm's. If so, which env vars are you setting. I just spent around ten minutes searching for the verbosity setting env vars without success.
<bigmac> (and perhaps only wayback's?)
<dramforever[m]1> no i don't think you can set the loglevel yet
<bigmac> That should be independent of wayback
<bigmac> I tried returning immediately in default_log_func and the log still gets printed, that's what leads me to that conclusion
<dramforever[m]1> so the compositor logs through wlr_log and there's wlr_log_init(WLR_DEBUG, NULL); on the start of main in wayback-compositor
<bigmac> Oh
<bigmac> Do you know whether or not one can overwrite it with an env var?
<axtlos> wlroots doesn't have an envvar to change the verbosity it seems
<axtlos> i misremembered
<dramforever[m]1> wlroots doesn't env var handling, we'd have to do it ourselves
<dramforever[m]1> handling for verbosity i mean
<axtlos> considering that wlroots doesn't do envvars we should just use commandline options
<dramforever[m]1> is it just me being too deep in this rabbit hole or does x11/wayland "server" and "client" perfectly make sense to anyone else
<bigmac> I think that what axtlos proposed is more understandable. It is saying that the flow is the same as with xorg, but there's a few layers on top. But yeah. I suppose it's hard to be on point and also easily understandable in four rectangles and two arrows. I think that it would also be worth it, if we're going to put it on the website or into the readme, to include something about the wayland being
<bigmac> the one communicating with hw after translating x11 calls (show it side by side with xorg). It could both showcase the architecture and explain the point in one image. Neither of the diagrams do it currently imo
<bigmac> just my opinion, probably not too deep in the rabbit hole as you are dramforever[m]1 *(yet)* haha
<dramforever[m]1> if you put "wayland" and "x.org server" at the same level i'm going to keep complaining
<mccd> Another question: does wayback improve the security of xorg? For example it's very easy to install a keylogger in xorg
<dramforever[m]1> no, and it is intentional that we don't
<dramforever[m]1> this is there to support legacy applications and "improve security" is "breaking old workflows"
<mccd> makes sense
<dramforever[m]1> if we do get protocols for controlling these in the future xwayland can implement them
<dramforever[m]1> and we'd get that for free because we just use xwayland
<mccd> Yeah that also makes sense
thollief has joined #wayback
mojo_ has quit [Ping timeout: 260 seconds]
pinskia has quit [Read error: Connection reset by peer]
pinskia has joined #wayback
<Wayback> @dramforever opened merge request: !79 Draft: Handle child processes without SIGTERM (https://gitlab.freedesktop.org/wayback/wayback/-/merge_requests/79)
<axtlos> dramforever[m]1: just to be sure, this essentially 'converts' wayback-compositor into the signal handler, instead of using a custom one?
<dramforever[m]1> in the sense that it handles exits, yes
<dramforever[m]1> but it's based on fd close, not actual SIGCHLD/SIGTERM
<axtlos> right yeah, but the effect is the same
<dramforever[m]1> I had a blurb earlier explaining what happens if each of the three exits but I don't think it helps all that much to convince you it works
<axtlos> oh no i can already tell what happens
<axtlos> im honestly happy to move away from the custom signal handler
<axtlos> not particularly proud of that code, but i wasnt aware of any better way
<dramforever[m]1> a cleaner way would be to use sigwaitinfo to grab the ... signal
<dramforever[m]1> which avoids having to run signal handlers altogether
<axtlos> oh interesting
<axtlos> though your solution is even better
<dramforever[m]1> i tried converting wayback-session to that but it wasn't better
<axtlos> i dont think wayback-session can be improved much
<axtlos> actually
<axtlos> hmm
<axtlos> let me try something
<dramforever[m]1> it should be a shell script
<dramforever[m]1> or some non-shell script
<dramforever[m]1> but the idea was we're going to get rid of it anyway so meh
<axtlos> yeah tbh its best to just leave it rn
<dramforever[m]1> i'll test this thing more tomorrow
<navi> would be neat if Xwayback could just exec directly into Xwayland
<navi> but that will depend on how xinerama will work
<axtlos> yeah
<axtlos> right now it would be possible
<axtlos> im trying to make wayback-session exec directly into the session cmd, but that seems to not work properly
<axtlos> the -terminate flag seems to only terminate xwayland when every client has exited, so any apps running in the session will keep it alive, even if the wm/de is exited
<navi> you can look at xinit
<navi> it does manage to do that, but i'm unsure how
<axtlos> oh true
<dramforever[m]1> i think xinit just does not directly exec
<navi> (though the better thing is just to make xinit and startx handle Xwayback as another X server binary name)
<dramforever[m]1> it waits for the session to exit and then kills the x server
<axtlos> navi: yes that's what we're working on in the long term
<axtlos> startx does already work somewhat
<axtlos> nevermind, seems to be broken again
<navi> xinit has a hardcoded list of X servers
<navi> we'd need to add ours there
<axtlos> ah right, startx doesn't work because it adds the vt arg which xwayland doesn't accept
<axtlos> navi: i just have a symlink from /usr/bin/X to Xwayback and xinit works
<navi> oh
<navi> hmyeah that works
<navi> the vt arg should be doable by passing it to wayback-compositor, and then there's a wlroots api to change vt i think
<axtlos> thre is, we use it to allow for vt switching
<axtlos> wlr_session_change_vt
<axtlos> let me implement that rq actually
norwoodites has joined #wayback
pinskia has quit [Ping timeout: 248 seconds]
<axtlos> ah nevermind, seems like wlroots doesn't implement that
<axtlos> wlr_session_change_vt doesn't actually change where the compositor is launched
<axtlos> i guess i could do it manually via an ioctl before any wlroots stuff is done
<axtlos> though idk if thats a good solution
<axtlos> navi: what do you think?
thollief has quit [Quit: Leaving]
<navi> seems simple enough to do
<navi> in Xwayback itself, before we start the compositor
<axtlos> yeah thats what i wanted to do
<axtlos> though i didnt think of doing it in xwayback directly, i was planning on doing it in the compositor
<navi> that probably works too, though need to do before any wlroots init code
<navi> bc something something dri permissions something elogind
tsundoku- is now known as tsundoku
<axtlos> navi: i forgot, ioctl tty switching requires root or some way to access the tty, usually over the tty group
<navi> and the same applies to Xorg
<navi> which is what i used to do back in the day before wayland, but without elogind
<navi> give the current vt i logged into to Xorg, and it'd work
<axtlos> ah right Xorg runs as root
<navi> e.g. `startx -- vt$(tty)`
<navi> not anymore, no distro ships xorg setuid anymore
<axtlos> wait so how do they solve that then
<navi> two ways, direct logind integration, and what i used to do, which is doing a tty login
<navi> tty login gives your user perms over that tty
<navi> by (idk what in the stack does that tbh)
<axtlos> id assume agetty
<navi> probs yeah
<axtlos> but either way, so should i just make xwayback read the tty its currently on?
<axtlos> ah wait
<axtlos> let me try something
<navi> if the user gives vtX as an arg
<navi> you should try to switch to it
<navi> if fails, exit with error i think
<navi> check what Xorg does
<navi> if you ran it with `vt6` or smth
<axtlos> yeah i was just opening /dev/tty0 to keep it simple
<f_> FWIW Xorg has some systemd-logind integration
<axtlos> ugh this is annoying, even the ioctl vt switch doesn't make the compositor launch on the new vt
<f_> Who still runs Xorg as root, that being said?
<axtlos> i hope no one
<f_> Maybe we could de-escalate from root on startup or something
<f_> personally never did, at least not in production :>
<axtlos> i mean root or not root, doesn't really matter because that doesn't work either
<f_> in non-production, mmmmmmmmmaybe
norwoodites is now known as pinskia
<dramforever[m]1> maybe call libseat?
<dramforever[m]1> i don't know how we currently manage to switch vt as non-root
<axtlos> using wlroots
<axtlos> but the wlroots vt switch doesn't actually change the vt the compositor renders on
norwoodites has joined #wayback
<dramforever[m]1> we do the same before starting wlroots....?
<axtlos> what?
pinskia has quit [Ping timeout: 240 seconds]
<dramforever[m]1> okay go back go back
<f_|cat> we don't switch tty's before running the compositor no
<dramforever[m]1> why were we talking about running it as root again
<f_|cat> to switch vt on which the compositor is ran
<dramforever[m]1> ah i see i meant we can do that
<axtlos> huh im confused
<dramforever[m]1> no no just go back
<axtlos> switching the tty via wlroots before starting wlroots isnt possible because well, no wlroots
<dramforever[m]1> what's the deal with running Xwayback as root again?
<axtlos> we are trying to implement xorgs vt argument
<f_> it's bad™
<axtlos> which launches the server on a specified vt
<axtlos> the root part was only hypothetical because of a mistake i made
<axtlos> we dont need to run it as root
<dramforever[m]1> yeah right i just thought needing root to switch vt was weird
<axtlos> well you do, when switching to a vt the user doesn't own
<anabelae[m]> And I thought chvt requires root access,..
<dramforever[m]1> we can call libseat or something... right?
<dramforever[m]1> like if we can't switch to arbitrary vt as non-root then how is wayback-compositor doing it now?
<axtlos> it works once a proper seat and all that is established
<dramforever[m]1> so it's only if you register yourself as a seat
<axtlos> yes the seat stuff allows switching to an arbitrary vt
<Consolatis[m]1> <libera_navi:catircservices.org> bc something something dri permissions something elogind
<Consolatis[m]1> that is a very apt description and I completely agree
<Consolatis[m]1> for reference how wlroots instructs libseat to switch the session: https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/backend/session/session.c?ref_type=heads#L377
<Consolatis[m]1> might be the best option to keep being libseat backend agnostic
<Consolatis[m]1> switch the vt*
<ConanKudo[m]1> note that libseat cannot switch VTs anymore
<ConanKudo[m]1> the functionality was ripped out some time ago
<axtlos> I mean either way I don't think it'd help us
<axtlos> if the ioctl VT switch doesn't change the VT it renders on I don't think any other method of switching vts will
<axtlos> my guess is that we'd have to relaunch wayback on the new vt for it to work
pinskia has joined #wayback
norwoodites has quit [Ping timeout: 272 seconds]
<Consolatis[m]1> conan_kudo:matrix.org: I am confused. If libeat can't switch the VTs anymore how does wayback (and other wlroots based compositors) then switch the VT by calling into libseat?
<Consolatis[m]1> libseat*
<ConanKudo[m]1> they don't
<ConanKudo[m]1> VT switching is done elsewhere
<Consolatis[m]1> yes, assumingly via the libseat backend
<ConanKudo[m]1> nope
<ConanKudo[m]1> well previously yes
<ConanKudo[m]1> if libseat doesn't call to logind, no VT switching happens
<ConanKudo[m]1> seatd itself can't do it
<ConanKudo[m]1> the removal of that functionality caused this bug in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=2358688
<ConanKudo[m]1> libseat 0.9.0 and newer doesn't do VT switching
<Consolatis[m]1> yeah, I see. just checked the sources. the logind backend uses https://git.sr.ht/~kennylevinsen/seatd/tree/master/item/libseat/backend/logind.c#L185
<ConanKudo[m]1> this is one of the reasons KWin is never going to use libseat
<ConanKudo[m]1> it's really not equivalent for us
<ConanKudo[m]1> now as a wlroots based thing, I think we are more or less stuck with libseat? so we will need our own code to perform what libseat used to do
<ConanKudo[m]1> in addition to libseat doing the seat thing
<ConanKudo[m]1> admittedly it's not like libseat doesn't have a good reason to not do it: it wants to work on Linux environments that lack VTs
<Consolatis[m]1> couldn't libseat be extended for further backends / re-establishing support for VT switch in the seatd backend?
<ConanKudo[m]1> in theory, yes?
<ConanKudo[m]1> in practice, I don't think Kenny will allow it
<ConanKudo[m]1> he seemed pretty adamant when I asked him about it months ago that he didn't want that functionality
<ConanKudo[m]1> I don't expect a ConsoleKit2 backend to show up in libseat either for similar reasons
<Consolatis[m]1> hm. so basically it requires logind
<ConanKudo[m]1> to do the right thing? yeah
<Consolatis[m]1> ^ for wayback to change the VT before starting up the compositor that is
vyivel has left #wayback [#wayback]
<dramforever[m]1> mccd: no hurry but did you try xwayland-satellite? i'm curious to see if it works for you. it should be non-blurry... i think
<navi> i'm not finding in seatd the change that removed vt switching from the seatd backend, the ioctl call to VT_ACTIVATE is still there
<navi> huh