4

Is it possible to transport whole device as in /dev entry over TCP? I'm talking about transporting eg. joystick over TCP or mouse/rs232 port/framebuffer dev, soundcard dev, disks etc.

I'm mostly interested in input devices keybords, joysticks, tablets, mice etc. In more generic fashion than specialized software for remote mice/keyboard.

Lapsio
  • 1,283
  • 2
  • 18
  • 27

2 Answers2

3

As long as those are USB devices, what you're looking for has been possible for several years with USB/IP. It has since been introduced in Linux 3.17. See the usbip package on Debian-like systems. You may even have Windows clients (i.e. accessing USB devices plugged on a Linux server).

As for the block devices, Linux has been offering Network Block Device support for even much longer.

xhienne
  • 17,075
  • 2
  • 52
  • 68
1

Yes, this can be done at least for simple devices like a mouse, but you will have to write some code. Basically, you would have a process on the machine with the physical device that communicates with the device. This process then transports the protocol over TCP to the other host. The receiving process will have to emulate whatever interface the end process (an X11 server or Wayland compositor) expects to see. In the simplest case the receiver can set up a named pipe to which the data is written, and which replaces the device file normally used.

Johan Myréen
  • 12,862
  • 1
  • 32
  • 33