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

Use version 0.31 of python-xlib to fix regression #113

Closed
wants to merge 1 commit into from
Closed

Use version 0.31 of python-xlib to fix regression #113

wants to merge 1 commit into from

Conversation

cruizba
Copy link
Contributor

@cruizba cruizba commented Nov 23, 2023

Hello, congrats on the project! I've been testing Selkies and I'm impressed how well it works. VNC is slow for remote desktops, and this actually demonstrates that it's possible to have a low-latency remote desktop experience using WebRTC :)

As a Spanish user, I've been troubled with some keyboard layout errors, which significantly impacts my experience. Basically, if you press a non english character, the selkies-gstreamer server crash with an exception. This issue appearead multiple times as I can see:

Initially, I suspected that the problem might be due to guacamole keyboard library being outdated, as discussed in these threads:

However, even after updating the guacamole keyboard library, the issue persisted. Further research led me to discover a regression in the xlib python library, specifically since version 0.32:

If you execute a pip list command, the installed python-xlib version is 0.33. Fortunately, reverting the xlib version to 0.31 resolves the issue, and the server does not crash when a non english character is sent. What I did is basically pin the version 0.31 in the setup.cfg config, which could temporarily solve the issue until a new version of python-xlib is released.

There is a pending pull request (PR 242) that aims to address this problem in the xlib library, but it looks like the development is paused.

Selkies-gstreamer process abruptly exits when using python-xlib >= 0.32
when non english characters are typed. This is a regression in python-xlib,
so fixing the version to 0.31 solves temporalily the issue.

There is a pending PR to python-xlib to fix the issue:
python-xlib/python-xlib#242
@ehfd
Copy link
Member

ehfd commented Nov 24, 2023

Hi!

I was pretty sure I knew your handle, and you're the one who made ubuntu-dind that I used with nvidia-dind!

This is indeed a tricky problem to deal with. I'll think of the implications of pegging this version before merging or adding to this.

@cruizba
Copy link
Contributor Author

cruizba commented Nov 24, 2023

Hahaha, it's such a small world! You created a project inspired by mine, and now I'm doing research inspired by your project 😂.

Dealing with this is indeed a tricky problem. I'll consider the implications of pegging this version before merging or adding to it.

Yes, at first I thought it would be more difficult to do.

@ehfd
Copy link
Member

ehfd commented Nov 25, 2023

I remember that something would break if I downgraded to 0.31.
Could you confirm whether Selkies starts without major repercussions? @cruizba

@cruizba
Copy link
Contributor Author

cruizba commented Dec 2, 2023

I will close this PR. I think I was too optimistic with the downgrade...

It is a much more complex problem.

Could you confirm whether Selkies starts without major repercussions? @cruizba
It starts correctly. The only difference I've noticed is that, by entering non english characters, the server does not crash using version 0.31

It starts correctly, but the keyboard still have issues:


Case 1

  • python-xlib=0.33
  • Host with keyboard layout es (Spanish).
  • Container with keyboard layout en-us (Default)

In this particular case, the server crashes when I press "ñ" or other spanish characters.


Case 2

  • python-xlib=0.33
  • Host with keyboard layout en-us (US English).
  • Container with keyboard layout en-us (Default)

No crashes


Case 3:

  • python-xlib=0.31
  • Host with keyboard layout es (Spanish).
  • Container with keyboard layout en-us (Default)

No crashes. But the keyboard layout does not work properly. Some keys are translated, some not.


Case 4:

  • python-xlib=0.31
  • Host with keyboard layout es (Spanish).
  • Container with keyboard layout es (Default)

Works fine, but also some characters are not translated correctly. For example, in Spanish layout, Ctrl + Shift + 0 resolves to the character "=", but instead, a ")" character appears.


Some side notes

This looks complex, and maybe other approach is needed, I am not sure.

I've observed that other projects like Kasm NoVNC translates the host keyboard layout, so if I have my host keyboard layout as es (Spanish), the keys are translated to the remote desktop, even if the remote keyboard is configured as en-us. Is there some kind of translation I am missing?

Would be good to research how other projects works (like neko, noVNC and Kasm noVNC), and somehow translate that to selkies :)

@cruizba cruizba closed this Dec 2, 2023
@ehfd
Copy link
Member

ehfd commented Dec 2, 2023

Yes, a comparison between other interfaces are needed. We currently use an old version of the Guacamole keyboard.

@ehfd
Copy link
Member

ehfd commented Dec 2, 2023

The last time there was some keyboard issue, it was related to pynput. Worth checking into the backend aspects if the Guacamole Keyboard behavior is inconsistent with guacd.

@maxpain
Copy link

maxpain commented Dec 13, 2023

Any updates?

@ehfd
Copy link
Member

ehfd commented Dec 15, 2023

Currently discussed in #85

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.

None yet

3 participants