Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env: Pass through locale & IM stuff #105

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

asahilina
Copy link
Member

Leaving the default C locale can break stuff that expect UTF-8, so pass through all the locale env vars and set a default C.UTF-8 locale if nothing is set.

For input methods, it turns out that the old legacy XIM does work with our X11 passthrough solution (direct GTK/QT plugin methods will not, since they use side-channels to communicate with the IM server). So, force xim usage for GTK2/3 and QT4/5, which actually works with Steam (!) for CJK input if the system is configured properly.

The future is Wayland protocols, which will work with GTK4 and QT6 once we have Wayland passthrough. Hopefully that means we never have to support input methods with the shared library mechanisms, which means our rootfs will never have to include IM-specific libraries and the input method user choice will happen entirely outside of muvm.

@slp
Copy link
Collaborator

slp commented Nov 15, 2024

LGTM, but please address @teohhanhui suggestion.

Leaving the default C locale can break stuff that expect UTF-8, so pass
through all the locale env vars and set a default C.UTF-8 locale if
nothing is set.

For input methods, it turns out that the old legacy XIM does work with
our X11 passthrough solution (direct GTK/QT plugin methods will not,
since they use side-channels to communicate with the IM server). So,
force xim usage for GTK2/3 and QT4/5, which actually works with Steam
(!) for CJK input if the system is configured properly.

The future is Wayland protocols, which will work with GTK4 and QT6 once
we have Wayland passthrough. Hopefully that means we never have to
support input methods with the shared library mechanisms, which means
our rootfs will never have to include IM-specific libraries and the
input method user choice will happen entirely outside of muvm.

Signed-off-by: Asahi Lina <[email protected]>
@asahilina
Copy link
Member Author

Sorted.

@alyssarosenzweig
Copy link
Member

@WhatAmISupposedToPutHere had a commit in #54 to just pass almost everything through, required for binfmt to work seamlessly. Should we merge that one instead?

@asahilina
Copy link
Member Author

Sure, maybe we should merge just that commit for now? @WhatAmISupposedToPutHere what do you think? I can rebase this PR on just that one commit and then add the xim / extra locale handling on top.

@WhatAmISupposedToPutHere
Copy link
Collaborator

Feel free to use that one. Sorry for getting distracted with shinier stuff and leaving that branch as is, it is somewhere on the yak stack and i will get back to it one day.

@teohhanhui
Copy link
Collaborator

just pass almost everything through

That kinda makes me nervous. Haha... The chances of some software misbehaving and messing up something in the user's home directory seems non-negligible?

@WhatAmISupposedToPutHere
Copy link
Collaborator

I do not think it is that likely, most /home contents are arch-independent, and we already allow writing there.

@alyssarosenzweig
Copy link
Member

just pass almost everything through

That kinda makes me nervous. Haha... The chances of some software misbehaving and messing up something in the user's home directory seems non-negligible?

TBH I don't see how the situation is different from today. Env vars aren't particularly special..?

@asahilina
Copy link
Member Author

Turns out I can't cherry-pick that commit cleanly since it's passing through all env vars to the process handler, it doesn't do it to the VM itself... and that whole idea depends on earlier commits.

Maybe we can just merge this one for now?

@slp
Copy link
Collaborator

slp commented Nov 19, 2024

Turns out I can't cherry-pick that commit cleanly since it's passing through all env vars to the process handler, it doesn't do it to the VM itself... and that whole idea depends on earlier commits.

Maybe we can just merge this one for now?

Ack, let's merge this one and work later on #54

@slp slp merged commit 8b49072 into AsahiLinux:main Nov 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants