rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.24k stars 212 forks source link

Kinto not working using RDP from Mac (Jump Desktop) to Ubuntu (xrdp) #844

Open lrmunoz opened 5 months ago

lrmunoz commented 5 months ago

The project's readme states that:

RDP fully works as long as the entire keyboard input is being captured. RDP had been working for awhile with Windows but as of 2/14/2021 Linux & macOS is now supported.

However, I haven't been able to make it work with the following setup:

When starting a RDP session with Jump Desktop, I see two problems:

First, it seems that the xkeysnail.service is not able to start:

ene 12 07:53:42 lrmunoz-HP-Slim-Desktop-S01-pF3xxx systemd[1]: Started xkeysnail.
ene 12 07:53:42 lrmunoz-HP-Slim-Desktop-S01-pF3xxx sudo[77731]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/bash -c /usr/bin/xhost +SI:localuser:root && /home/lrmunoz/.config/kinto/killdups.sh && /usr/local/bin/xkeysnail --quiet --watch /home/lrmunoz/.config/kinto/kinto.py
ene 12 07:53:42 lrmunoz-HP-Slim-Desktop-S01-pF3xxx sudo[77731]: pam_unix(sudo:session): session opened for user root by (uid=0)
ene 12 07:53:42 lrmunoz-HP-Slim-Desktop-S01-pF3xxx sudo[77736]: /usr/bin/xhost:  unable to open display ":0"
ene 12 07:53:42 lrmunoz-HP-Slim-Desktop-S01-pF3xxx sudo[77731]: pam_unix(sudo:session): session closed for user root
ene 12 07:53:42 lrmunoz-HP-Slim-Desktop-S01-pF3xxx systemd[1]: xkeysnail.service: Main process exited, code=exited, status=1/FAILURE
ene 12 07:53:42 lrmunoz-HP-Slim-Desktop-S01-pF3xxx systemd[1]: xkeysnail.service: Failed with result 'exit-code'.
ene 12 07:53:45 lrmunoz-HP-Slim-Desktop-S01-pF3xxx systemd[1]: xkeysnail.service: Scheduled restart job, restart counter is at 1.
ene 12 07:53:45 lrmunoz-HP-Slim-Desktop-S01-pF3xxx systemd[1]: Stopped xkeysnail.

But most importantly, if I launch Kinto / xkeysnail manually with:

sudo /usr/local/bin/xkeysnail ~/.config/kinto/kinto.py

Then it fails to launch with:

██╗  ██╗██╗  ██╗███████╗██╗   ██╗
╚██╗██╔╝██║ ██╔╝██╔════╝╚██╗ ██╔╝
 ╚███╔╝ █████╔╝ █████╗   ╚████╔╝
 ██╔██╗ ██╔═██╗ ██╔══╝    ╚██╔╝
██╔╝ ██╗██║  ██╗███████╗   ██║
╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝   ╚═╝
  ███████╗███╗   ██╗ █████╗ ██╗██╗
  ██╔════╝████╗  ██║██╔══██╗██║██║
  ███████╗██╔██╗ ██║███████║██║██║
  ╚════██║██║╚██╗██║██╔══██║██║██║
  ███████║██║ ╚████║██║  ██║██║███████╗
  ╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝╚═╝╚══════╝
                             v0.3.0

No keyboard devices specified via (--devices) option.
xkeysnail picks up keyboard-ish devices from the list below:

-------------------------------------------------------------------------------
Device               Name                                Phys
-------------------------------------------------------------------------------
/dev/input/event0    Sleep Button                        PNP0C0E/button/input0
/dev/input/event1    Power Button                        PNP0C0C/button/input0
/dev/input/event2    Power Button                        LNXPWRBN/button/input0
/dev/input/event3    HP WMI hotkeys                      wmi/input0
/dev/input/event4    Video Bus                           LNXVIDEO/video/input0
/dev/input/event5    HDA Intel PCH Mic                   ALSA
/dev/input/event6    HDA Intel PCH Line                  ALSA
/dev/input/event7    HDA Intel PCH Line Out              ALSA
/dev/input/event8    HDA Intel PCH Front Headphone       ALSA
/dev/input/event9    HDA Intel PCH HDMI/DP,pcm=3         ALSA
/dev/input/event10   HDA Intel PCH HDMI/DP,pcm=7         ALSA
/dev/input/event11   HDA Intel PCH HDMI/DP,pcm=8         ALSA
/dev/input/event12   HDA Intel PCH HDMI/DP,pcm=9         ALSA
/dev/input/event13   HDA Intel PCH HDMI/DP,pcm=10        ALSA
/dev/input/event14   HDA Intel PCH HDMI/DP,pcm=11        ALSA
/dev/input/event15   HDA Intel PCH HDMI/DP,pcm=12        ALSA
/dev/input/event16   HDA Intel PCH HDMI/DP,pcm=13        ALSA
/dev/input/event17   HDA Intel PCH HDMI/DP,pcm=14        ALSA
/dev/input/event18   HDA Intel PCH HDMI/DP,pcm=15        ALSA
/dev/input/event19   HDA Intel PCH HDMI/DP,pcm=16        ALSA
/dev/input/event20   HDA Intel PCH HDMI/DP,pcm=17        ALSA
/dev/input/event21   py-evdev-uinput                     py-evdev-uinput

error: no input devices found (do you have rw permission on /dev/input/*?)

I suppose that is because I don't have a keyboard attached to the Ubuntu box. If I connect a USB keyboard to the Ubuntu box then xkeysnail does start:

██╗  ██╗██╗  ██╗███████╗██╗   ██╗
╚██╗██╔╝██║ ██╔╝██╔════╝╚██╗ ██╔╝
 ╚███╔╝ █████╔╝ █████╗   ╚████╔╝
 ██╔██╗ ██╔═██╗ ██╔══╝    ╚██╔╝
██╔╝ ██╗██║  ██╗███████╗   ██║
╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝   ╚═╝
  ███████╗███╗   ██╗ █████╗ ██╗██╗
  ██╔════╝████╗  ██║██╔══██╗██║██║
  ███████╗██╔██╗ ██║███████║██║██║
  ╚════██║██║╚██╗██║██╔══██║██║██║
  ███████║██║ ╚████║██║  ██║██║███████╗
  ╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝╚═╝╚══════╝
                             v0.3.0

No keyboard devices specified via (--devices) option.
xkeysnail picks up keyboard-ish devices from the list below:

--------------------------------------------------------------------------------------
Device               Name                                Phys
--------------------------------------------------------------------------------------
/dev/input/event0    Sleep Button                        PNP0C0E/button/input0
/dev/input/event1    Power Button                        PNP0C0C/button/input0
/dev/input/event2    Power Button                        LNXPWRBN/button/input0
/dev/input/event3    HP WMI hotkeys                      wmi/input0
/dev/input/event4    Video Bus                           LNXVIDEO/video/input0
/dev/input/event5    HDA Intel PCH Mic                   ALSA
/dev/input/event6    HDA Intel PCH Line                  ALSA
/dev/input/event7    HDA Intel PCH Line Out              ALSA
/dev/input/event8    HDA Intel PCH Front Headphone       ALSA
/dev/input/event9    HDA Intel PCH HDMI/DP,pcm=3         ALSA
/dev/input/event10   HDA Intel PCH HDMI/DP,pcm=7         ALSA
/dev/input/event11   HDA Intel PCH HDMI/DP,pcm=8         ALSA
/dev/input/event12   HDA Intel PCH HDMI/DP,pcm=9         ALSA
/dev/input/event13   HDA Intel PCH HDMI/DP,pcm=10        ALSA
/dev/input/event14   HDA Intel PCH HDMI/DP,pcm=11        ALSA
/dev/input/event15   HDA Intel PCH HDMI/DP,pcm=12        ALSA
/dev/input/event16   HDA Intel PCH HDMI/DP,pcm=13        ALSA
/dev/input/event17   HDA Intel PCH HDMI/DP,pcm=14        ALSA
/dev/input/event18   HDA Intel PCH HDMI/DP,pcm=15        ALSA
/dev/input/event19   HDA Intel PCH HDMI/DP,pcm=16        ALSA
/dev/input/event20   HDA Intel PCH HDMI/DP,pcm=17        ALSA
/dev/input/event21   DELL DELL USB Keyboard              usb-0000:00:14.0-3/input0
/dev/input/event22   DELL DELL USB Keyboard System Control usb-0000:00:14.0-3/input1
/dev/input/event23   DELL DELL USB Keyboard Consumer Control usb-0000:00:14.0-3/input1
/dev/input/event24   py-evdev-uinput                     py-evdev-uinput

Okay, now enable remapping on the following device(s):

----------------------------------------------------------------------------------
Device               Name                                Phys
----------------------------------------------------------------------------------
/dev/input/event21   DELL DELL USB Keyboard              usb-0000:00:14.0-3/input0

But mapping still does not work from the Jump Desktop session on my Mac, I suppose because xkeysnail is capturing events coming from the plugged USB keyboard, and not the RDP protocol.

So my question is, how to make xkeysnail remap keyboard events from the RDP session? Or am I doing something wrong?