Spice

Friday, May 12, 2017

Spice for macOS

Some testing of this setup.

I figured out what the problem had been all along. While preparing the macOS patches for submission to the spice-devel mailing list, I naturally tested them on Linux. And at some point, I noticed that I had introduced a bug in the patch dealing with cast warnings. I did not immediately realize because I was not testing the same way, but this was the same bug that had blocked me all along on the Mac side. And even if the symptoms were practically similar on Linux, for some reason I did not immediately realize that.

This vastly simplifies my test setup, because now I can have the Spice server and client in the same room, connected to nearby screens. The server is also physically connected to the same screen I typically use for client testing, which will allow me to check things like color fidelity. Not an immediate concern, but useful until I devise a setup with two identical screens.

There is a small issue that I can't get sound in the Mac version.

So I thought I'd immediately replace VNC with Spice to connect to my remote desktop. And I hit a a small snag.

x11spice: can't connect anymore

For some reason, I can no longer connect to the Spice server opened by x11spice. I can connect locally, i.e. running Spice over X11 locally works. But I can't connect remotely anymore. If it's a firewall issue, it is not an entirely simple one because:

  • I can connect to a VM with spice on the Mac (i.e. port 5902 works, but the ports 5909 or 5944 I used for my x11spice server don't)
  • It worked yesterday.

This is not the first time I notice something like this happening. It's like the firewall / iptable rules were somehow messed up over time.

After investigating with lsof -i -P | grep -i listen, I noticed something odd:

x11spice  24332  ddd   13u  IPv6 351003      0t0  TCP localhost:5944 (LISTEN)
vino-serv 25073  ddd   12u  IPv6 357961      0t0  TCP *:5900 (LISTEN)
vino-serv 25073  ddd   13u  IPv4 357962      0t0  TCP *:5900 (LISTEN)

So the problem is on the server side. I had launched x11spice with the following command yesterday too:

x11spice --password-file=- localhost:5944

Why it worked yesterday and no longer today is a bit of a mystery to me. But if I launche x11spice with the following command, it works:

x11spice --password-file=- '*:5944' --allow-control

It's a good thing. Now I can test Spice for real. On a YouTube video, I have some serious glitches with an x11spice server which I don't see when connecting to a guest. I also see them (although way more slowly) if I connect with the Linux version of Spice over X11.

Turbo setup: sound

Got sound working on Turbo, mostly a matter of drawing the right cables from my amplifier to the PC. Which involved a little bit of furniture shuffling, as the cable is just long enough. So now I can switch sound input between the Mac and the PC, which will allow me to compare sound if I get the mac Spice client to do sound.