I decided to check the keyboard events through the xinput program. Checked on three computers. The first two xinput works fine. Like that:

Device List:

$ xinput ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ HID 1241:1177 id=8 [slave pointer (2)] ⎜ ↳ SIGMACH1P USB Keykoard id=10 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Power Button id=7 [slave keyboard (3)] ↳ SIGMACH1P USB Keykoard id=9 [slave keyboard (3)] 

Device events:

 $ xinput test 9 key release 36 key press 48 key press 47 key release 48 key press 46 lkey release 47 key release 46 key press 41 key press 36 key release 41 key release 36 key press 62 key release 62 key press 37 

And I have access to the third computer through the X-terminal. And on it, xinput does not fulfill its function - it does not see its devices and it is segoltitsya:

 $ xinput "pointer" id=0 [XPointer] "keyboard" id=1 [XKeyboard] $ xinput test 1 unable to find device '1' $ xinput test-xi2 1 "keyboard" id=1 [XKeyboard] Num_keys is 248 Min_keycode is 8 Max_keycode is 255 Ошибка сегментирования 

Question Does XInput fundamentally not work through an X terminal? (In my case, this is x2go). Or is it just that I was so lucky to catch a glitch when the standard program from the x11 kit is not working?

Environment:
Where do I connect: Windows 7 Pro, X2GO client from the official site.
Where to connect: Debian 7.8, LXDE, X2GO terminal server from the official site.

  • Comments are not intended for extended discussion; conversation moved to chat . - Nicolas Chabanovsky
  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

I connect on x2go from Windows to a remote Linux. xinput run on remote Linux. And he does not work there, as written in the question. And I wanted to work.

You run an x-session on a remote machine and using x2go-server, input devices are connected to this session: interfaces transmitted by the x2go-client to the keyboard and mouse serviced by ms / windows .

chain is obtained:

  • keyboard / mouse
  • interface to them from the side of ms / windows
  • relaying this interface x2go client x2go server
  • retransmission of this interface by x2go-server to x-server
  • providing information from the x-server to the xinput program

somewhere in this chain of relays, the interface significantly loses its functionality, is simplified and unified.

where exactly the error you described appears in the described chain, you can probably determine it only by debugging tools (of the corresponding component).


What is your original task?
This is a very long story: http://webhamster.ru/site/page/index/main/news/368
You can only access the Internet through a terminal server.

if you have the ability to run sshd on a machine with Internet access, and “reach out” to this sshd from your local computer, then it seems to me that it is easier to take advantage of the browser (popular browsers can work through socks-proxy ) and ssh client (which is able to provide socks-proxy interface). if you need more details on this, see the answer to this question: how to proxy http [s] through an ssh tunnel?

  • > somewhere in this chain of relays, the interface significantly loses its functionality, is simplified and unified. - This is all lengthy reasoning. If the keyboard is forwarded to the X-server and is working normally, then it must normally generate events, otherwise nothing would have worked. - Xintrea 7:42 pm
  • > run sshd on a machine with Internet access, and “reach out” to this sshd from your local computer, it seems to me that it’s easier to use the browser’s capabilities (popular browsers can work through socks-proxy) and the ssh client (which can provide interface socks-proxy) - the Internet is blocked locally on the user's machine via Kaspersky. It even intercepts DNS traffic, and blocks non-local domains. Proxy won't help here. Yes, it is not necessary. There are information security requirements, they must be observed. X-terminal do not only for myself. - Xintrea
  • @Xintrea, the xinput program only refers to the x-server extension of the same name . the full functionality of this program (and even extensions), as far as I know, is in no way due to the capabilities of the x server in general to work with input devices. - aleksandr barakin
  • @Xintrea, in the case of ssh for socks-proxying, all traffic (including dns-requests, if necessary) passes inside the ssh-tunnel, and, of course, is encrypted. I am by the way, now I am writing a question (and answer) about using ssh as socks-proxy. I will inform you immediately. - aleksandr barakin
  • @Xintrea, added: ru.stackoverflow.com/q/533542/178576 - aleksandr barakin