I did my testing on a Virtualbox guest running a Minimal Ubuntu Linux 18.04 server and Raspbian Stretch 2018-06-27. Follow that link to see how I did that. The IR sensor is USB so that goes into the host and then when the virtual machine is running use the menu option Devices -> USB -> TopSeed Technology Corp. eHome Infrared Transceiver.
This post will, quickly, run through how to create an Ubuntu 18.04 Minimal Server Install. It also only takes a short time, taking between 5 to 15 minutes to install depending on your hardware and the number of times you have run through it. I find it an ideal way to try out and learn how to install Ubuntu in various configurations. I build these test machines as virtual machines running on Virtualbox as this allows me to throw it away without messing about with real hardware.