For some time I’ve been wanting to run ubuntu-desktop and others, remotely, in containers, using spice. Historically vnc has been the best way to do remote desktops, but spice should provide a far better experience. Unfortunately, Xspice has always failed for me, most recently segfaulting on startup. But fortunately, this is fixed in git, and I’m told a new release may be coming soon. While waiting for the new release (0.12.7?), I pushed a package based on git HEAD to ppa:serge-hallyn/virt.
You can create a container to test this with as follows:
lxc-create -t download -n desk1 -- -d ubuntu -r trusty -a amd64 lxc-start -n desk1 -d lxc-attach -n desk1
Then inside that container shell,
add-apt-repository ppa:serge-hallyn/virt apt-get update apt-get install xserver-xspice ubuntu-desktop
ubuntu-desktop can take awhile to install. You can simply install fvwm and xterm if you want a quicker test. Once that’s all one, copy the xspice configuration file into your home directory, uncompress it, set the SpiceDisableTicketing option (or configure a password), and use the config file to configure an Xorg session:
cp /usr/share/doc/xserver-xspice/spiceqxl.xorg.conf.example.gz /root cd /root gunzip spiceqxl.xorg.conf.example.gz cat >> spiceqxl.xorg.conf.example.gz << EOF Option "SpiceDisableTicketing" "1" EOF /usr/bin/Xorg -config /root/spiceqxl.xorg.conf.example :2 &
Now fire up unity, xterm, or fvwm:
DISPLAY=:2 unity
Now connect using either spicy or spicec,
spicec -h -p 5900
Of course if the container is on a remote host, you’ll want to set up some ssh port forwards to enable that, but if needed then that’s a subject for another post.
Thanks, that was really useful. A follow-up post talking about doing this with a remote container would be great.
Serge… I followed the above and it popped up the unity interface. no sound channel etc and I could still see some error messages on the server related to out of memory for video but … it did work. Its 2am but now I am anxious now to try the spice-html5 connection tomorrow.
Would it be possible to set up something that would allow multiple users to connect to their own spice display?
In fact, each user can create their own unprivileged container and run spice in it. Of course they’ll want to use a password rather than disabling ticketing.