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

Stops sending clipboard to remote if xkb configuration on remote is modified #1875

Open
philippefutureboy opened this issue Nov 20, 2024 · 1 comment

Comments

@philippefutureboy
Copy link

philippefutureboy commented Nov 20, 2024

Describe the bug
Modifying the keycodes associated to control keys on the remote host (Ubuntu + Xfce4) makes clipboard sync from local (MacOS) to remote (Linux) stop working; remote to local clipboard sync keeps working.

I decided to change the keycodes so that I can keep my mac shortcuts when on the remote (Cmd_L can still be used to do Cmd+C, Cmd+V, etc.; Option_L can be used as Alt_L on Linux). The change allows me to keep my workflow without switching shortcuts from one machine to another.

To Reproduce
Steps to reproduce the behavior:

Given an X11 session on remote:

/usr/bin/x11vnc \
    -forever \
    -display :0 \
    -auth guess \
    -rfbport 5900 \
    -noxdamage \
    -pipeinput UINPUT:direct_key=/dev/input/event2,direct_abs=/dev/input/event3 \
    -overlay \
    -repeat \
    -cursor_drag \
    -nocursorshape \
    -usepw \
    -ncache 10 \
    -ncache_cr \
    -clip 1920x1080

with dbus-x11 installed and lightdm as session manager,

  1. Edit /usr/share/X11/xkb/keycodes/evdev; Replace the keycodes for and for another keycode of your choice (for me it was 105 and 64 respectively, using a Logi MX Mini keyboard).
  2. Save the file, run setxkbmap to update the keymap
  3. Logout
  4. Reconnect to the remote
  5. Attempt to copy from local (MacOS) to remote - Notice that the clipboard is not sent over
  6. Attempt on the remote to copy some content (e.g. from a notepad like app like Mousepad or Gedit) and paste (copy and paste on the remote) - see that the new keyboard mapping works as intended
  7. Attempt on the local to paste - see that the clipboard content of the remote has been copied back to the local clipboard.

(I confirm the clipboard works locally from local to local)

Expected behavior

Clipboard should work both ways if Options > Input > Accept clipboard from server and Options > Input > Send clipboard to server are checked.
Especially since the change in keymapping is done on the remote, not the local??

Two ways to go about it:

  1. Determine and fix the source of current bug
  2. (Or to achieve my desired result of having the same keyboard shortcuts as on my Mac): Support ability to remap key strokes sent to the remote (maybe directly use an .Xmodmap?)

Screenshots
N/A

Client (please complete the following information):

Server (please complete the following information):

  • OS: Ubuntu 24.04 lts stable
  • VNC server: x11vnc
  • VNC server version: 0.9.16 lastmod: 2019-01-05
  • Server downloaded from: apt index (sudo apt install x11vnc)
  • Server was started using: {above command}, as a service via systemctl
  • X11 session manager: lightdm
  • X11 session manager version: 1.30.0
  • X11 session manager was started using: /bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] as a service via systemctl

Additional context
Add any other context about the problem here.

@CendioOssman
Copy link
Member

Thank you for your report.

If the issue happens when you modify things on the server, then this sounds like a server issue. What leads you do suspect an issue with TigerVNC?

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

No branches or pull requests

2 participants