Skip to content

mitchharvey/rcxkbm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

remote control x kbm

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.

requirements

  • libncurses
  • libx11
  • libxtst

how to build and run

# while ssh'd into the remote machine:
$ make
$ ./rcxkbm

additional details

mouse modes (F4 to switch):

  • "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.

menu (F3):

  • allows access to common key combinations that sometimes are intercepted by the local terminal. idk how well it works in practice.

common issues

"Cannot open display :0"

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 is

mouse tracking not working

all 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

permission denied for X display

If you're not the user running the X session, you may need to grant access:

xhost +local:

About

remote kbm control over ssh session for x server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors