ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
JakeSays1 has joined #wayland
JakeSays has quit [Ping timeout: 480 seconds]
co1umbarius has joined #wayland
columbarius has quit [Ping timeout: 480 seconds]
fmuellner has quit [Ping timeout: 480 seconds]
<orowith2os[m]> Hm, is there some special thing we need to do to get keybinds working with MangoHud on Wayland?
<orowith2os[m]> mangohud currently hooks into libx11 and the windows api to get the currently pressed keys
<orowith2os[m]> this probably can't be done as cleanly in Wayland, right?
Brainium has quit [Quit: Konversation terminated!]
nerdopolis has joined #wayland
nerdopolis has quit [Remote host closed the connection]
nerdopolis has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
rv1sr has joined #wayland
ybogdano has quit [Ping timeout: 480 seconds]
sevz has joined #wayland
ybogdano has joined #wayland
neobrain has quit [Remote host closed the connection]
ciara has quit [Read error: Connection reset by peer]
sima has joined #wayland
ciara has joined #wayland
ciara has quit [Remote host closed the connection]
ciara has joined #wayland
junaid has joined #wayland
sevz has quit [Quit: WeeChat 4.0.2]
Company has quit [Remote host closed the connection]
junaid has quit [Ping timeout: 480 seconds]
sevz has joined #wayland
junaid has joined #wayland
tent405 has quit [Quit: tent405]
mblenc1 has quit [Ping timeout: 480 seconds]
sevz has quit [Quit: WeeChat 4.0.2]
<MrCooper> orowith2os[m]: offhand seems like it should be possible, I have to defer to others for how exactly though
junaid has quit [Ping timeout: 480 seconds]
junaid has joined #wayland
rasterman has joined #wayland
<jadahl> MrCooper: sounds non-trivial. it looks like it opens its own X11 connection, and queries a set of key state, a.k.a. backdoor keylogging. in Wayland it'd need to get access to the clients wl_pointer some how
<MrCooper> can't create its own wl_pointer?
<jadahl> maybe if it wrapped some libwayland API it could do it
<jadahl> still need the wl_display
<MrCooper> how does it get the Display with X?
<MrCooper> hmm, or maybe it can use its own
<YaLTeR[m]> MrCooper: wouldn't that mess with the client's Wayland state
<MrCooper> AFAIK that can be avoided with Wayland, in contrast to X
<jadahl> YaLTeR[m]: it'd just eaves drop, not alter
leon-anavi has joined #wayland
fmuellner has joined #wayland
mblenc has joined #wayland
rasterman has quit [Ping timeout: 480 seconds]
rasterman has joined #wayland
kts has joined #wayland
rbmarliere has quit [Ping timeout: 480 seconds]
kts has quit [Ping timeout: 480 seconds]
junaid has quit [Ping timeout: 480 seconds]
junaid has joined #wayland
nerdopolis has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
nerdopolis has joined #wayland
jmdaemon has quit [Ping timeout: 480 seconds]
jmdaemon has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
jmdaemon has quit [Ping timeout: 480 seconds]
mblenc has quit [Ping timeout: 480 seconds]
neobrain has joined #wayland
Moprius has joined #wayland
Moprius has quit [Quit: bye]
Moprius has joined #wayland
kts has joined #wayland
rasterman has quit [Ping timeout: 480 seconds]
rasterman has joined #wayland
junaid has quit [Remote host closed the connection]
junaid has joined #wayland
Moprius has quit [Quit: bye]
mblenc has joined #wayland
Company has joined #wayland
cvmn has joined #wayland
iomari891 has joined #wayland
caveman has quit [Ping timeout: 480 seconds]
mblenc1 has joined #wayland
mblenc has quit [Ping timeout: 480 seconds]
rasterman has quit [Quit: Gettin' stinky!]
mblenc1 has quit [Ping timeout: 480 seconds]
floof58 has quit [Ping timeout: 480 seconds]
mblenc has joined #wayland
rbmarliere has joined #wayland
floof58 has joined #wayland
lsd|2 has joined #wayland
leon-anavi has quit [Quit: Leaving]
fmuellner_ has joined #wayland
fmuellner has quit [Ping timeout: 480 seconds]
fmuellner has joined #wayland
fmuellner_ has quit [Ping timeout: 480 seconds]
sevz has joined #wayland
sevz has quit [Quit: WeeChat 4.0.2]
sevz has joined #wayland
iomari891 has quit [Ping timeout: 480 seconds]
junaid has quit [Remote host closed the connection]
<orowith2os[m]> MrCooper jadahl fwiw someone brought up the Wayland keylogger project, so definitely seems possible. I'll bug y'all more if there are any questions :)
<emersion> the wayland keylogger project is a bit of a joke
<emersion> it's just a suid executable which reads uinput
<emersion> and then the peanut gallery shouts "wayland insecure"
<psykose> did you know as root on linux you can do anything?
<psykose> unheard of
<emersion> "but wayland is supposed to prevent that"
ciara has quit [Read error: Connection reset by peer]
<kennylevinsen> orowith2os: a keylogger approach would be adversarial in nature, so don't do that :)
<kennylevinsen> The hotkey protocol/portal might be relevant, and a Wayland proxy could monitor a specific application (wlhax-style) if that is the goal... But what are the key bindings for in the first place?
ciara has joined #wayland
<orowith2os[m]> emersion: oh, I thought it used LD_PRELOAD to grab inputs from a client?
<emersion> oh, i might mix it up with another attempt
<orowith2os[m]> kennylevinsen: this is for Mangohud, so anything involving user interaction is a no-no. If either that protocol or portal can get by that, it'll be fine
<orowith2os[m]> emersion: here's the one I might be thinking of: https://github.com/Aishou/wayland-keylogger
rasterman has joined #wayland
<kennylevinsen> Protocol/portal would allow you to register keybindings, no sniffing - as is the Wayland way
<kennylevinsen> I have no idea what mangohud is or why that would rule out user interaction
<kennylevinsen> Such things tend to just boil down to "it differs from what we did before"...
<emersion> i wouldn't be concerned about magohud doing hacks, it's already doing some to insert its own rendering so shrug
<orowith2os[m]> mangohud is loaded into an application and gives you an overlay containing the performance metrics and stuff
<orowith2os[m]> a quick google search will get you tons of hits; you've probably already seen it
<orowith2os[m]> it's expected that when you load mangohud into an application, that's it - everything will read your mangohud config file and Just Work™
<orowith2os[m]> a portal or protocol that requires explicit user permission would make that instead two or three steps, and that's not ideal
<kennylevinsen> Yeah that's what I mean, no real reason there couldn't be interaction (e.g. ports prompt) other than "there isn't any right now"
<kennylevinsen> But if it's already an injection hack, and only wraps 1 application, a Wayland proxy or LD_PRELOAD could work
<kennylevinsen> s/ports/portal/
junaid has joined #wayland
mblenc has quit [Ping timeout: 480 seconds]
<orowith2os[m]> kennylevinsen: also, we don't need the shortcuts to be global :P
<orowith2os[m]> anyways someone's looking at it more now
<Arnavion> If you only need the keybinds to work when the window is focused, then you could "just" intercept the wayland client connection so that you see the incoming keyboard messages first
<orowith2os[m]> is there a PoC for that?
<jadahl> orowith2os[m]: you can make one. create a .so file that has wl_display_connect() exported. in there, dlopen libwayland-client.so and find the correct wl_display_connect address. when you get called, call the "real" function, but store away a proxy wrapper of the return value. get your own registry, find the seat, get a wl_keyboard and start listening to events.
<ids1024> `wayland-keylogger` is a good demonstration that Wayland in itself doesn't provide security against malicious apps without additional sandboxing. It has nothing specifically to do with Wayland though, other than the particular symbols it overrides with LD_PRELOAD.
<Arnavion> A less hacky way is to run as a separate process that execs the target application with a $WAYLAND_DISPLAY pointing to a socket managed by your mangohud process
<orowith2os[m]> ids1024: wayland-keylogger is a good demonstration that we need to push for Flatpak and MACs more :P
<orowith2os[m]> jadahl: thanks, will look into it - and it fits in with the mangohud architecture to have it be an LD_PRELOAD bit
<Arnavion> Note that the LD_PRELOAD'ing to hook libwayland-client functions only works for processes that use libwayland-client
<Arnavion> Worst case you'll have to hook connect()
mblenc has joined #wayland
<jadahl> Arnavion: it'll likely be a libwayland-client client since it's meant for vulkan/gl overlays
<orowith2os[m]> it's also possible that some other, non-libwayland-client client, exists that could use this, but it's complicated and unlikely to happen
<orowith2os[m]> (and I'm not even sure if it would work for those cases)
rv1sr has quit []
mblenc1 has joined #wayland
mblenc has quit [Ping timeout: 480 seconds]
lsd|2 has quit [Quit: KVIrc 5.0.1 Aria http://www.kvirc.net/]
sevz has quit [Quit: WeeChat 4.0.2]
junaid has quit [Remote host closed the connection]
Moprius has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
sevz has joined #wayland
Moprius has quit [Quit: bye]
mblenc1 has quit [Ping timeout: 480 seconds]
<orowith2os[m]> looks like it was already attempted, and if I'm understanding it correctly it does.... something.... with WSI: https://github.com/flightlessmango/MangoHud/commit/26c8d1dbdda16ae3af53c3aa7a71eaeb3ffd4acd
mblenc has joined #wayland
orowith2os has left #wayland [#wayland]
jmdaemon has joined #wayland
Leopold__ has joined #wayland
Leopold_ has quit [Ping timeout: 480 seconds]
nerdopolis has joined #wayland
sima has quit [Ping timeout: 480 seconds]
mblenc has quit [Ping timeout: 480 seconds]
kts has quit [Quit: Konversation terminated!]
nerdopolis has quit [Ping timeout: 480 seconds]
Guest8830 has quit [Ping timeout: 480 seconds]
cool110 has joined #wayland
cool110 is now known as Guest9103