WIP: vibe-coded pos/poc to allow remote keyboard/mouse control through SSH for a remote machine running using x display server. (like a worse version of vnc) it uses ncurses to get the mouse position so only will get input when your cursor is in the terminal window.
unlike vnc there is no display output back to you. if you need that i've used https://github.com/1fpsvideo/1fps and it worked well enough.
- libncurses
- libx11
- libxtst
# while ssh'd into the remote machine:
$ make
$ ./rcxkbm-
"Absolute" (default) Your mouse position in the terminal maps directly to screen position (i.e. Bottom-right of terminal maps to bottom-right of screen, etc.)
-
"Relative" The intent is that mouse movement speed should control how far the cursor moves (like on a trackpad). Doesn't work great imo.
- allows access to common key combinations that sometimes are intercepted by the local terminal. idk how well it works in practice.
the program defaults to display :0. If your X server uses a different display you'll need to specify it:
DISPLAY=:1 ./rcxkbm # or whatever your display isall modern terminals support mouse by default. if yours doesn't, that's a you problem.
specific to tmux: Add to ~/.tmux.conf:
set -g mouse on
If you're not the user running the X session, you may need to grant access:
xhost +local: