[Spice-devel] Setting the default size of a spice-gtk window
Dominique Rodrigues
dominique.rodrigues at nanocloud.com
Wed Feb 1 07:03:12 PST 2012
Le 01/02/2012 15:28, Dominique Rodrigues a écrit :
> Le 01/02/2012 15:42, Daniel P. Berrange a écrit :
>> On Wed, Feb 01, 2012 at 03:22:35PM +0100, Dominique Rodrigues wrote:
>>> Le 01/02/2012 11:01, Daniel P. Berrange a écrit :
>>>> On Wed, Feb 01, 2012 at 02:39:13AM +0100, Dominique Rodrigues wrote:
>>>>> Le 01/02/2012 00:52, Marc-André Lureau a écrit :
>>>>>> Hi
>>>>>>
>>>>>> ----- Mensaje original -----
>>>>>>> I am using spice-gtk for a while now and I did not find yet an
>>>>>>> option
>>>>>>> to launch it with a predefined size (height and width).
>>>>>>>
>>>>>>> Only fullscreen can be activated. Otherwise, spice-gtk seems to
>>>>>>> start
>>>>>>> at something like 600x400.
>>>>>>>
>>>>>>> Is there any (hidden) option for that or could it be possible to
>>>>>>> add
>>>>>>> it ?
>>>>>> I don't think there is a way you could do that today with any of
>>>>>> the spice-gtk clients.
>>>>>>
>>>>>> This is not as easy as it seems at first, so please file a bug to
>>>>>> add a --geometry=GEOMETRY to command line options.
>>>>>>
>>>>>> (https://bugs.freedesktop.org/enter_bug.cgi?product=Spice
>>>>>> gtk-client)
>>>>>>
>>>>>> Btw, which spice-gtk client are you using? spicy is meant for
>>>>>> testing, and we are currently focusing on virt-viewer
>>>>>> http://git.fedorahosted.org/git/?p=virt-viewer.git
>>>>> I don't use libvirt and up to now, I have no plan to use it.
>>>> NB, as of yesterday, virt-viewer is no longer tied to libvirt. We have
>>>> refactored the code, so that there is a simple 'remote-viewer' binary
>>>> available for using SPICE/VNC which is completely independent of
>>>> libvirt.
>>>> You just give it a SPICE/VNC URI to connect to. This is why we're now
>>>> focusing on virt-viewer/remote-viewer as the primary user tools.
>>>>
>>>> Daniel
>>> Ok, interesting.
>>>
>>> Btw, I have then downloaded remote-viewer from the git depo and I
>>> have recompiled it with spice-gtk support.
>>>
>>> However, how do you connect afterwhile to a VM using spice ?
>>>
>>> For instance, if my VM is on localhost using spice port 7777, doing
>>> the following does not work :
>>>
>>> ./remove-viewer localhost:7777
>> Try using spice://localhost:7777
>>
>
> Thanks ! It works fine.
>
> Regards
>
> Dominique
After some quick tests, this tool appears to be interesting. For other
people discovering it like me, this is how I have done to use it on my
linux distribution (Mageia 1 64 bits) :
Prerequisites : qemu-kvm 1.0, spice-protocol 0.10.1, spice 0.10.1 and
spice-gtk 0.9 are already compiled and installed on my machine
To have spice available in remote-viewer :
# export PKG_CONFIG_PATH=/usr/local/share/pkgconfig:/usr/local/lib/pkgconfig
# cd /somepath
DL from git repo :
# git clone http://git.fedorahosted.org/git/?p=virt-viewer.git
# cd virt-viewer
Prepare :
# ./configure --without-libvirt --with-gtk=2.0
......
configure:
configure: Configuration summary
configure: =====================
configure:
configure: Features:
configure:
configure: Plugin: no
configure: Gtk: 2.0
configure:
configure: Libraries:
configure:
configure: GMODULE2: -pthread -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -Wl,--export-dynamic -pthread
-lgmodule-2.0 -lrt -lglib-2.0
configure:
configure: GTK: -pthread -I/usr/local/include/pixman-1
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12 -pthread
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0
-lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpng12 -lpango-1.0
-lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt
-lglib-2.0
configure:
configure: GTK_VNC:
configure:
configure: SPICE_GTK: -pthread -I/usr/local/include/spice-1
-I/usr/local/include/spice-client-gtk-2.0
-I/usr/local/include/spice-client-glib-2.0 -I/usr/local/include/pixman-1
-I/usr/local/include -I/usr/local/include/spice-controller
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12 -pthread
-L/usr/local/lib -L/usr/lib64/ -lspice-client-gtk-2.0 -lgtk-x11-2.0
-lspice-client-glib-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0
-lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpng12 -lpango-1.0 -lfreetype
-lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lpixman-1
-lcelt051 -lm -lssl -lcrypto -ldl -lpthread -lspice-controller -lglib-2.0
configure:
configure: LIBXML2: -I/usr/include/libxml2 -lxml2
configure:
configure: LIBVIRT:
configure:
# make
You can then already test it on a local VM using spice on port 7777 :
# ./src/remote-viewer spice://localhost:7777
This tool solves the default size problem of spice-gtk and has a lot of
nice features from spice-gtk (copy/paste of characters between host and
guest) and VNC (sending keys like ctrl-alt-F1 or ctrl-alt-del).
Nice
Dominique
>>> I am missing the syntax and doc is far from being explicit
>>> (remote-viewer (option) URI ...).
>> Yes, a man page is to be written
>>
>> Daniel
>
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120201/b801ceda/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dominique_rodrigues.vcf
Type: text/x-vcard
Size: 308 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120201/b801ceda/attachment-0001.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3710 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120201/b801ceda/attachment-0001.bin>
More information about the Spice-devel
mailing list