Spice viewer for macOS

It’s very cool that my M3 laptop (macOS 14.4) can do “brew install incus” and then add Linux backends as remotes.

However, does anyone know of a spice client for macOS that works? Otherwise all I get is:

% incus console nuc1:jool --type vga
The client automatically uses either spicy or remote-viewer when present.
As neither could be found, the raw SPICE socket can be found at:
  spice+unix:///Users/brian/.config/incus/sockets/3153141961.spice

I tried brew install remoteviewer but it fails to connect to that spice+unix:///... URL.

I tried brew install virt-manager, but it’s missing remote-viewer (and still installs over 150 packages as dependencies - thank goodness for brew autoremove). I gather there are various third-party taps of virt-manager (UPC, jeffreywildman) but I’m a bit dubious about those.

EDIT: Checking on Linux, I found that spicy is in the spice-gtk package. So I tried brew install spice-gtk: again hundreds of dependencies. The first run took about a minute (maybe it was doing Rosetta conversion?). I did get a console in the end, but made the mistake of putting it into full-screen mode, which I was unable to undo. Alt-tab to activity manager, even a regular quit wouldn’t kill it; I had to force-quit. So not a great option.

Any other suggestions?

Thanks,

Brian.

Hmm, in the past brew install remote-viewer did the trick, basically installing it and then running the incus console nuc1:jool --type vga command again so it’d get detected.

Does that fail with an error?

% brew install remote-viewer
...
Warning: No available formula with the name "remote-viewer".
==> Searching for similarly named formulae and casks...
==> Casks
remoteviewer ✔

I installed “remoteviewer” instead (which installs itself under /Applications/RemoteViewer.app/). But it’s not picked up by incus:

% incus console nuc1:jool --type vga
The client automatically uses either spicy or remote-viewer when present.
As neither could be found, the raw SPICE socket can be found at:
  spice+unix:///Users/brian/.config/incus/sockets/2766333711.spice

If I start RemoteViewer by hand, and then paste in that URL while incus console is sitting there waiting, then it fails:

image

EDIT: it’s not impossible macOS 14.4 broke something.

Okay, that’s pretty odd. From a shell, can you confirm that the path does exist?
And if it does, maybe try connecting to it with nc -U /Users/brian/...

It could be some kind of MacOS security feature preventing the connection or some issue with Incus creating that listener.

% ls -l /Users/brian/.config/incus/sockets/2766333711.spice
srwxr-xr-x  1 brian  staff  0 22 Mar 16:07 /Users/brian/.config/incus/sockets/2766333711.spice

% nc -U /Users/brian/.config/incus/sockets/2766333711.spice

It hangs at this point so I think it’s connected. And if I type some garbage, I get a response and disconnection:

asdfasdfasdfasdf    << I typed this
REDQ�%              << response

Yep, that suggests that the Incus side of this is working properly then, listening on the unix socket and forwarding the traffic to the Incus server.

What happens when you start remote-viewer unix://... from the command line?
Does it give a more useful error than it does in the GUI?

I have a solution for this.

brew tap jeffreywildman/homebrew-virt-manager
brew install virt-viewer

This works on latest macOS on apple silicon.

Thanks. That does work, although it’s still very slow to start, and it has far too many dependencies (gcc?? numpy??)

I don’t disagree with you… but it’s what we have that works at the moment.
Of course, the other option is to use the web UI.

% ls -l /Applications/RemoteViewer.app/Contents/MacOS
total 608
-rwxr-xr-x@ 1 brian  staff    5697 22 Apr  2013 RemoteViewer
-rwxr-xr-x@ 1 brian  staff  301132 12 Aug  2013 RemoteViewer-bin

% /Applications/RemoteViewer.app/Contents/MacOS/RemoteViewer spice+unix:///Users/brian/.config/incus/sockets/172805119.spice
2024-03-23 10:26:07.234 RemoteViewer-bin[80412:4873929] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.

(RemoteViewer-bin:80412): GSpice-WARNING **: Expected a URI scheme of 'spice://' in URI 'spice+unix:///Users/brian/.config/incus/sockets/172805119.spice'

Oh OK, it doesn’t support spice+unix :frowning:

I also notice that all the files under /Applications/RemoteViewer.app are timestamped 12 Aug 2013. This is what’s linked from Homebrew, and there’s nothing newer in the dmg directory.

If I use unix instead of spice+unix then it’s different. I don’t get the URL error; what I get instead is “unknown graphic type” in the dialog box:

% /Applications/RemoteViewer.app/Contents/MacOS/RemoteViewer unix:///Users/brian/.config/incus/sockets/919734674.spice
2024-03-23 10:44:35.014 RemoteViewer-bin[80487:4881662] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.

image

Then when I click OK:
image

I installed it and then uninstalled it - the dependencies rang too many alarms, I mean really? libscsi??

Smells of a trojan or some other malware. Suggest caution.

1 Like

I don’t think it’s likely to be malware, and it can be seen on github here:

but I do think that it would be great if someone would package something on homebrew that works with incus and has fewer dependencies.