Re: [Spice-devel] [PATCH spice-gtk 1/4] tests: add spice+unix:// URI checks

2018-02-15 Thread i iordanov
If one can infer the usage of unix sockets from other parameters passed
anyway, then there may be no point having it in the first place. For the
VNC URI, we could have gone with vnc+ssh://, or vnc+ssl:// (for stunnel),
but there were ssh-related and stunnel parameters we could infer from so it
became unnecessary.

I already use the VNC RFC spec to provide Red Hat's own movirt a means to
start bVNC via a vnc:// URI intent and aSPICE via an implementation of a
spice:// URI based on the VNC one. I added several parameters like TlsPort,
and renamed the username and password from VncUsername and VncPassword to
SpiceUsername and SpicePassword.

So if you guys want to start from something already in use and seeing
whether extending it works for you, please take a look at parseFomUri()
here:

https://github.com/iiordanov/remote-desktop-clients/blob/master/bVNC/src2/main/java/com/iiordanov/bVNC/ConnectionBean.java

And at the way movirt constructs the URI to start aSPICE and bVNC.

Thanks!
Iordan

On Feb 14, 2018 5:09 AM, "Christophe de Dinechin" <
christophe.de.dinec...@gmail.com> wrote:



> On 13 Feb 2018, at 17:36, Marc-Andre Lureau  wrote:
>
> I was not really fond of passing options via URI, but apparently this
> is a standard practice.

So is passing port number after a colon.

Christophe
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] aSPICE keyboard layout problems

2018-02-21 Thread i iordanov
Hey,

I am cc-ing the SPICE developers mailing list in order to raise awareness
of this user issue (apologies for cross-posting).

Unfortunately, due to limitations of the SPICE protocol, input is sent as
keyboard scan codes to the remote machine rather than Unicode characters.
This is the reason you are seeing the issues you describe. There may have
been improvements since I last looked at this issue.

To/Dr, the answer is no. For details, or if you feel like playing around,
read on.

At one point, I wrote the capability to select a "physical" keyboard layout
prior to connecting (I believe Russian is one of the layouts), which allows
me to convert Android keycodes to scan codes assuming that "physical"
layout. However this would then require you to go the other way - having a
Russian keyboard up on your mobile device at all times and switch to
English remotely in order to type English. :)

Thanks!
Iordan

On Feb 21, 2018 7:52 AM,  wrote:

Hi,

I am trying to use aSPICE with two keyboard layouts with a Windows 10 VM.
The VM doesn't accept input in a secondary layout (Russian in this case)
unless I switch my android keyboard to English and select Russian layout in
the system tray selector. I've tried using both Gboard and Hacker's
Keyboard.

Any idea how to resolve this? This makes it almost impossible to use with
alternate languages.

-- 
You received this message because you are subscribed to the Google Groups
"bVNC, aRDP, aSPICE, Opaque Android and BB10 Remote Desktop Clients" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to bvnc-ardp-aspice-opaque-android-bb10-clients+
unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/bvnc-ardp-aspice-opaque-android-bb10-clients/f8df3e07-
d0c6-44db-8770-03378737f8c7%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] issues linking with openssl 1.1.0

2019-01-16 Thread i iordanov
Hello,

Happy new year!

I tried to build spice-gtk 0.34 and 0.35 with OpenSSL 1.1.0, and I got some
linking errors:

jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
spice_channel_class_intern_init: error: undefined reference to
'SSL_library_init'
jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
spice_channel_class_intern_init: error: undefined reference to
'SSL_load_error_strings'
jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
spice_channel_coroutine: error: undefined reference to 'SSLv23_method'
jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
spice_channel_coroutine: error: undefined reference to 'sk_value'
jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
spice_channel_coroutine: error: undefined reference to 'sk_num'
jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
spice_channel_coroutine: error: undefined reference to 'sk_pop_free'
jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(ssl_verify.o):ssl_verify.c:function
openssl_verify: error: undefined reference to 'sk_num'
jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(ssl_verify.o):ssl_verify.c:function
openssl_verify: error: undefined reference to 'sk_value'
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [obj/local/x86/libspice.so] Error 1

I had to revert to 1.0.2, but wanted to ask - is there a plan to support
1.1.0/1.1.1?

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] issues linking with openssl 1.1.0

2019-01-18 Thread i iordanov
Hi Marc-André,

Thanks for your reply. I think something was not quite right with my build
environment. I am unable to reproduce this anymore!

Apologies for the false alarm, and thanks for confirming compatibility with
future openssl versions.

Sincerely,
iordan

On Thu, Jan 17, 2019 at 12:46 AM Marc-André Lureau <
marcandre.lur...@gmail.com> wrote:

> Hey Iordan
>
> On Thu, Jan 17, 2019 at 3:45 AM i iordanov  wrote:
> >
> > Hello,
> >
> > Happy new year!
> >
> > I tried to build spice-gtk 0.34 and 0.35 with OpenSSL 1.1.0, and I got
> some linking errors:
> >
> >
> jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
> spice_channel_class_intern_init: error: undefined reference to
> 'SSL_library_init'
> >
> jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
> spice_channel_class_intern_init: error: undefined reference to
> 'SSL_load_error_strings'
> >
> jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
> spice_channel_coroutine: error: undefined reference to 'SSLv23_method'
> >
> jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
> spice_channel_coroutine: error: undefined reference to 'sk_value'
> >
> jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
> spice_channel_coroutine: error: undefined reference to 'sk_num'
> >
> jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(spice-channel.o):spice-channel.c:function
> spice_channel_coroutine: error: undefined reference to 'sk_pop_free'
> >
> jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(ssl_verify.o):ssl_verify.c:function
> openssl_verify: error: undefined reference to 'sk_num'
> >
> jni/src/../libs/deps/x86/root/lib/libspice-client-glib-2.0.a(ssl_verify.o):ssl_verify.c:function
> openssl_verify: error: undefined reference to 'sk_value'
> > clang++: error: linker command failed with exit code 1 (use -v to see
> invocation)
> > make: *** [obj/local/x86/libspice.so] Error 1
> >
> > I had to revert to 1.0.2, but wanted to ask - is there a plan to support
> 1.1.0/1.1.1?
> >
>
> Happy new year! :)
>
> It compiles fine against openssl-libs-1.1.1-3.fc29.x86_64
>
> I checked 'SSL_library_init', it is is not exported by the library,
> but the header redefines it:
>
> openssl/ssl.h
> 1098:#  define OpenSSL_add_ssl_algorithms()   SSL_library_init()
> 1099:#  define SSLeay_add_ssl_algorithms()SSL_library_init()
> 1938:#  define SSL_library_init() OPENSSL_init_ssl(0, NULL)
>
> Is this under your own build environment or it can be reproduced on a
> known distro?
>
> thanks
>
>
>
> --
> Marc-André Lureau
>


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] Windows 10 and current latest spice guest additions causes blank/black screen issue

2017-09-19 Thread i iordanov
Hi guys!

Installing current latest spice guest additions from here on Windows 10:

https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe

(I guess v0.132) causes a fresh Windows 10 installation in oVirt to
die with a blank, black screen the moment the client requests a new
resolution immediately after the spice guest tools finish installing.
I was able to reproduce the issue with my Pixel XL and my Nexus 7
devices running my Android clients.

Here is the resolution the Nexus 7 requested, causing the Windows 10
blank screen issue:

09-15 23:01:18.324 10075 10075 E RemoteCanvas: Width requested: 1920
09-15 23:01:18.324 10075 10075 E RemoteCanvas: Height requested: 1200

As you can see, the resolution is greater than 1080p because immersive
mode is enabled in the application. The Pixel XL screen is even higher
resolution, but I don't have the logs captured.

As far as I recall, the previous version of guest tools I had
installed (not sure exactly which) was not responding to resolution
change requests, and my previous Windows 10 installation was happily
chugging along. I've killed the old Windows 10 installation and the
fresh installation I made in order to ensure it wasn't something else
that was causing the issue.

Sincerely,
iordan


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] agent_sync_audio_playback call causes deadlock

2020-08-24 Thread i iordanov
Hello,

Opaque and aSPICE (source at
https://github.com/iiordanov/remote-desktop-clients) both use
spice-gtk-0.37 now, and I found that while I was installing a VM under
oVirt 4.4 using a Live CD (which amusingly was the LiveCD of Proxmox 6.2),
when the Proxmox installer launches and the vdagent which starts in the
installer starts, both Opaque and aSPICE would freeze with some
audio-related debug messages

2020-08-24 01:24:31.609 11571-11643/com.undatech.opaque D/GLib+GSpice:
spice-gstaudio.c:631 PlaybackChannel not created yet, force start
2020-08-24 01:24:31.609 11571-11643/com.undatech.opaque D/GLib+GSpice:
spice-gstaudio.c:299 audio pipeline: appsrc is-live=1 do-timestamp=0
format=time caps="audio/x-raw,format="S16LE",channels=2,rate=48000,lay$
2020-08-24 01:24:31.618 11571-11643/com.undatech.opaque W/libOpenSLES:
Leaving Object::GetInterface (SL_RESULT_FEATURE_UNSUPPORTED)
2020-08-24 01:24:31.621 11571-11643/com.undatech.opaque
W/GLib+GLib-GObject: cannot register existing type 'GstStreamVolume'
2020-08-24 01:24:31.621 11571-11643/com.undatech.opaque
E/GLib+GLib-GObject: g_type_interface_add_prerequisite: assertion
'G_TYPE_IS_INTERFACE (interface_type)' failed
2020-08-24 01:24:31.621 11571-11643/com.undatech.opaque E/GLib+GLib:
g_once_init_leave: assertion 'result != 0' failed
2020-08-24 01:24:31.626 11571-11645/com.undatech.opaque
W/GStreamer+audio-resampler: 0:00:01.582157603 0x74d0497630
../gst-libs/gst/audio/audio-resampler.c:274:convert_taps_gint16_c can't
find exact taps
2020-08-24 01:24:31.628 11571-11645/com.undatech.opaque I/libOpenSLES:
Emulating old channel mask behavior (ignoring positional mask 0x3, using
default mask 0x3 based on channel count of 2)
2020-08-24 01:24:31.635 11571-11645/com.undatech.opaque W/AudioTrack:
createTrack_l(134611203): AUDIO_OUTPUT_FLAG_FAST denied by server;
frameCount 0 -> 1764
2020-08-24 01:24:31.635 11571-11645/com.undatech.opaque I/AudioTrack: Need
throttle time for OpenSLES player

This was happening on an Android 10 arm64 device.

I tracked the issue to the agent_sync_audio_playback() call in
channel-main.c and introduced a patch in my project to disable both
agent_sync_audio_playback and agent_sync_audio_record for the time being.

Does anybody know what could be causing this issue? Please reply-all to
this thread. I'll try to provide whatever information you need to help.

Thank you very much!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] agent_sync_audio_playback call causes deadlock

2020-08-25 Thread i iordanov
Hi Frediano,

On Tue, Aug 25, 2020 at 4:31 AM Frediano Ziglio  wrote:

> Is it a deadlock, a crash or the program get stuck into some loop?
>

It is not a crash, there is no obvious loop that is being executed, and the
Android Profiler shows that CPU is idle. Therefore, I postulated it's a
deadlock.


> Maybe some missing base GStreamer plugins?
> Which plugins are installed on that system?
>

I use cerbero to build gstreamer, and the list of gstreamer packages
currently being built are:

gstreamer-1.0 gst-android-1.0 gst-plugins-bad-1.0 gst-plugins-good-1.0
gst-plugins-base-1.0 gst-plugins-ugly-1.0 gst-libav-1.0


> How did you manage to track these functions?
> As far as I see these functions just schedule other functions.
>

I worked the code path back from the debug message
2020-08-24 01:24:31.609 11571-11643/com.undatech.opaque D/GLib+GSpice:
spice-gstaudio.c:299 audio pipeline: appsrc is-live=1 do-timestamp=0
format=time caps="audio/x-raw,format="S16LE",channels=2,rate=48000,lay$

since it is the last message from spice-gtk that I could recognize. I may
also have looked at what signals are connected to call what callbacks
during my trace. Unfortunately, I cannot at present actually do a native
code debug session with aSPICE since the Android debugger actually crashes
when I try.

Iordan
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] attaching a USB device by libusb_device or libusb_device_handle on Android

2021-12-19 Thread i iordanov
Hi guys,

I saw that the developers at libusb have done a bunch of work to
support accessing USB devices on unrooted Android devices, and in
response to a user request, I decided to look into the current state
of the implementation.

I am able to obtain permissions and get both:

libusb_device *dev

and

libusb_device_handle *handle

for an attached USB stick, but now do not have a good idea how to
request libspice to attach the device to the remote.

Is there an API exposed that would permit me to attach devices by
either libusb_device or libusb_device_handle? In either case, any
pointers on how to accomplish this are welcome!

Sincerely,
iordan

-- 
The conscious mind has only one thread of execution.


Re: [Spice-devel] attaching a USB device by libusb_device or libusb_device_handle on Android

2021-12-20 Thread i iordanov
redir-9:0: spice_channel_recv_link_msg:
2 caps
2021-12-21 02:14:00.002 3011-3115/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1966 usbredir-9:0: got remote common caps:
2021-12-21 02:14:00.002 3011-3115/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1902 0:0xB
2021-12-21 02:14:00.002 3011-3115/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1973 usbredir-9:0: got remote channel caps:
2021-12-21 02:14:00.002 3011-3115/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1902 0:0x1
2021-12-21 02:14:00.002 3011-3115/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:2921 test cap 0 in 0xB: yes
2021-12-21 02:14:00.002 3011-3115/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:2921 test cap 1 in 0xB: yes
2021-12-21 02:14:00.003 3011-3115/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:2921 test cap 3 in 0xB: yes
2021-12-21 02:14:00.003 3011-3115/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:2005 usbredir-9:0: use mini header: 1
2021-12-21 02:14:00.003 3011-3060/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-session.c:2102 usbredir-9:1: connect ready
2021-12-21 02:14:00.003 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1372 usbredir-9:1: channel type 9 id 1 num
common caps 1 num caps 1
2021-12-21 02:14:00.005 3011-3115/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1303 usbredir-9:0: channel up, state 3
2021-12-21 02:14:00.013 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1396 usbredir-9:1: Peer version: 2:2
2021-12-21 02:14:00.014 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1952 usbredir-9:1: spice_channel_recv_link_msg:
2 caps
2021-12-21 02:14:00.014 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1966 usbredir-9:1: got remote common caps:
2021-12-21 02:14:00.014 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1902 0:0xB
2021-12-21 02:14:00.014 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1973 usbredir-9:1: got remote channel caps:
2021-12-21 02:14:00.014 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1902 0:0x1
2021-12-21 02:14:00.014 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:2921 test cap 0 in 0xB: yes
2021-12-21 02:14:00.014 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:2921 test cap 1 in 0xB: yes
2021-12-21 02:14:00.014 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:2921 test cap 3 in 0xB: yes
2021-12-21 02:14:00.014 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:2005 usbredir-9:1: use mini header: 1
2021-12-21 02:14:00.018 3011-3116/com.iiordanov.aSPICE D/GLib+GSpice:
../src/spice-channel.c:1303 usbredir-9:1: channel up, state 3
==

Your help and suggestions are highly appreciated!

Sincerely,
iordan

On Mon, Dec 20, 2021 at 5:57 AM Uri Lublin  wrote:
>
> Hi iordan,
>
> On Mon, Dec 20, 2021 at 9:46 AM i iordanov  wrote:
> >
> > Hi guys,
> >
> > I saw that the developers at libusb have done a bunch of work to
> > support accessing USB devices on unrooted Android devices, and in
> > response to a user request, I decided to look into the current state
> > of the implementation.
>
> Congrats to libusb developers.
>
> >
> > I am able to obtain permissions and get both:
> >
> > libusb_device *dev
> >
> > and
> >
> > libusb_device_handle *handle
> >
> > for an attached USB stick, but now do not have a good idea how to
> > request libspice to attach the device to the remote.
> >
> > Is there an API exposed that would permit me to attach devices by
> > either libusb_device or libusb_device_handle? In either case, any
> > pointers on how to accomplish this are welcome!
>
> On the client side, you need to build usbredir and rebuild spice-gtk
> with usbredir enabled.
>
> On the server side you need to build usbredir and rebuild Qemu with
> usbredir enabled.
> You also need to add to your VM configuration some USB devices and
> attach them to SPICE.
> See SPICE User Manual [1] "USB redirection" for details.
>
> [1] https://www.spice-space.org/spice-user-manual.html
>
> Regards,
> Uri.
>
> >
> > Sincerely,
> > iordan
> >
> > --
> > The conscious mind has only one thread of execution.
> >
>


-- 
The conscious mind has only one thread of execution.


Re: [Spice-devel] attaching a USB device by libusb_device or libusb_device_handle on Android

2021-12-22 Thread i iordanov
Hi Uri,

Thanks for your assistance. I got it working. I'm attaching a patch
that does the job, and would really like it if we can make it
acceptable for inclusion into spice-gtk.

In general, the changes accomplish the following:

- Add the ability to allocate a SpiceUsbDevice using a file descriptor
- Added a field that can keep a reference to the device handle that is
created by libusb from a file descriptor. This handle is used on
Android in place of a call to libusb_open() that would fail.
- On Android, set option LIBUSB_OPTION_NO_DEVICE_DISCOVERY prior to
libusb_init()
- Implement a method of retrieving the SpiceUsbBackend context from
the SpiceUsbDeviceManager (which holds the properly initialized libusb
context). This backend can be passed to the new
allocate_device_for_file_descriptor() method.

Please let me know what changes you think are needed.

Many thanks!
iordan

On Tue, Dec 21, 2021 at 8:05 AM Uri Lublin  wrote:
>
> Hi,
>
> On Tue, Dec 21, 2021 at 9:24 AM i iordanov  wrote:
> >
> > Hello,
> >
> > Thanks for responding! As mentioned, I am trying to find a working,
> > programmatic way to pass a USB devices by either libusb_device or
> > libusb_device_handle from aSPICE and Opaque.
> >
> > I've now compiled libusb, usbredir 0.12, and recompiled spice-gtk 0.39
> > with usbredir support.
> >
> > The code I came up with looks like the following. The integer
> > fileDescriptor holds a file descriptor for the USB device obtained in
> > java after requesting permissions from the user.
> >
> > The first bit is from
> > https://github.com/libusb/libusb/blob/master/android/README.
> >
> > NOTE: For the part after the call to allocate_backend_device(), I had
> > to include the entire usb-backend.c file as you do in your tests in
> > spice-gtk, since I couldn't find a public API that allows me to
> > construct a SpiceUsbDevice. This may be a feature request that I'd
> > need to open with your project provided we can get USB redirection to
> > work in the first place.
> >
> > ==
> > JNIEXPORT void JNICALL
> > Java_com_undatech_opaque_SpiceCommunicator_SpiceSetNativeFileDescriptor(JNIEnv
> > *env,
> >
> >  jobject obj,
> >
> >  jint fileDescriptor)
> > {
> > // START: https://github.com/libusb/libusb/blob/master/android/README
> >
> > libusb_context *ctx = NULL;
> > libusb_device_handle *devh = NULL;
> > int r = 0;
> > r = libusb_set_option(NULL, LIBUSB_OPTION_NO_DEVICE_DISCOVERY, NULL);
> > if (r != LIBUSB_SUCCESS) {
> > LOGE("%s: libusb_set_option failed", __FUNCTION__);
> > return;
> > }
> > r = libusb_init(&ctx);
> > if (r < 0) {
> > LOGE("%s: libusb_init failed", __FUNCTION__);
> > return;
> > }
> >
> > LOGD("%s: calling libusb_wrap_sys_device", __FUNCTION__);
> > r = libusb_wrap_sys_device(ctx, (intptr_t)fileDescriptor, &devh);
> > if (r < 0) {
> > LOGE("%s: libusb_wrap_sys_device failed", __FUNCTION__);
> > return;
> > } else if (devh == NULL) {
> > LOGE("%s: libusb_wrap_sys_device returned invalid handle",
> > __FUNCTION__);
> > return;
> > }
> >
> > // END: https://github.com/libusb/libusb/blob/master/android/README
>
>
> That means the code should not call libusb_init without setting
> NO_DEVICE_DISCOVERY.
> Likely it should not call libusb_open either.
> The current code does call those functions and also gets the list of
> USB devices.
>
> >
> > // Calling functionality from usb-backend.c
> > SpiceUsbDevice *device = 
> > allocate_backend_device(libusb_get_device(devh));
>
> I think you need to call libusb_set_option (as above) before any 
> libusb_init().
> Also, maybe you can pass here devh too (or only, and get the device
> inside the function)
> and skip calling libusb_open.
>
> >
> > SpiceUsbDeviceManager *manager =
> > spice_usb_device_manager_get(global_conn->session, NULL);
> > if (manager == NULL) {
> > LOGE("%s: spice_usb_device_manager_get returned null manager",
> > __FUNCTION__);
> > return;
> > }
> >
> > LOGD("%s: Attaching device via
> > spice_usb_device_manager_connect_device_async", __FUNCTION__);
> > spice_usb_device_manager_connect_device_async(manager, device,
> > NULL, NULL, NULL);
> > }
> > ===

Re: [Spice-devel] attaching a USB device by libusb_device or libusb_device_handle on Android

2021-12-23 Thread i iordanov
Hi Frediano,

Thanks for your feedback, that's exactly what I was looking for ahead
of opening a MR.

On Thu, Dec 23, 2021 at 4:21 AM Frediano Ziglio  wrote:
>   could you open a MR?

Is this the right copy of the repo to make an MR against?
https://gitlab.freedesktop.org/spice/spice-gtk

> I suppose you are speaking about allocate_device_for_file_descriptor. It's 
> not called anywhere in the code so I suppose it is a public API. In this case 
> it should start with something like spice_. Also it should have a bit more 
> documentation and be listed in src/spice-glib-sym-file. But src/usb-backend.h 
> is not a public header and we don't want it to be so it does not seem a good 
> idea to declare there.

That makes sense. However, if in a new implementation it would make
sense for UsbDeviceManager to use some functionality from UsbBackend,
I'd still need to declare it in usb-backend.h, right? Just as an
aside, is there a way to make a method available to UsbDeviceManager
but unavailable publicly?

> This seems like a bad idea. It exposes something internal. Why not having 
> just one additional function in device manager like
>
> gboolean
> spice_usb_device_manager_add_device_from_fd(SpiceUsbDeviceManager *manager, 
> GError **err);

This is a good suggestion. You're essentially proposing for
UsbDeviceManager (which is public) to be the one exposing the
functionality and for it to potentially use some functionality left in
UsbBackend (which is private) internally. I'll refactor.

> The device could be communicated using device_added signal (if results if not 
> FALSE), error can be returned, no additional interface to expose.
> Or returning directory a SpiceUsbDevice* instead of a gboolean (but in this 
> case interface will have to be blocking).

Any pros / cons with either one? Any preference? If I return
SpiceUsbDevice * directly, there is no need for the err, parameter and
I could just return NULL device if something went wrong. Is there any
preference or rule of thumb that the project generally follows?

Thanks!
iordan


[Spice-devel] error: No free USB channel

2021-12-23 Thread i iordanov
Hi guys,

During my testing I've been unable to connect more than 2 USB devices
at a time - could you please help me figure out why that's happening?

The backend starts returning error with message "No free USB channel",
but I can't see how to tune the number of USB channels available!

2021-12-23 15:27:52.608 29721-29760/com.iiordanov.aSPICE
D/android-service: connect_cb: start
2021-12-23 15:27:52.608 29721-29760/com.iiordanov.aSPICE
I/android-service: connect_cb: successfully redirected device
2021-12-23 15:28:00.499 29721-29760/com.iiordanov.aSPICE
D/android-service: connect_cb: start
2021-12-23 15:28:00.499 29721-29760/com.iiordanov.aSPICE
I/android-service: connect_cb: successfully redirected device
2021-12-23 15:28:03.582 29721-29760/com.iiordanov.aSPICE
D/android-service: connect_cb: start
2021-12-23 15:28:03.582 29721-29760/com.iiordanov.aSPICE
E/android-service: connect_cb: failed to redirect device, error: No
free USB channel
2021-12-23 15:28:06.385 29721-29760/com.iiordanov.aSPICE
D/android-service: connect_cb: start
2021-12-23 15:28:06.385 29721-29760/com.iiordanov.aSPICE
E/android-service: connect_cb: failed to redirect device, error: No
free USB channel
2021-12-23 15:28:08.634 29721-29760/com.iiordanov.aSPICE
D/android-service: connect_cb: start
2021-12-23 15:28:08.634 29721-29760/com.iiordanov.aSPICE
E/android-service: connect_cb: failed to redirect device, error: No
free USB channel

Your help is very appreciated.

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.


Re: [Spice-devel] error: No free USB channel

2021-12-25 Thread i iordanov
Hey Frediano,

Thanks for responding - so I take it this is a server-side setting
(how many channels are attached to the VM)?

Also, is there a spice-gtk API that may be used to obtain the number
of available USB channels at any given time? I.e. the UI of any client
application should have a way to inform the user how many "ports" are
still available at any point, right?

Thanks!
iordan

On Fri, Dec 24, 2021 at 4:05 AM Frediano Ziglio  wrote:
>
> Il giorno gio 23 dic 2021 alle ore 23:38 i iordanov  ha 
> scritto:
>>
>> Hi guys,
>>
>> During my testing I've been unable to connect more than 2 USB devices
>> at a time - could you please help me figure out why that's happening?
>>
>> The backend starts returning error with message "No free USB channel",
>> but I can't see how to tune the number of USB channels available!
>>
>> 2021-12-23 15:27:52.608 29721-29760/com.iiordanov.aSPICE
>> D/android-service: connect_cb: start
>> 2021-12-23 15:27:52.608 29721-29760/com.iiordanov.aSPICE
>> I/android-service: connect_cb: successfully redirected device
>> 2021-12-23 15:28:00.499 29721-29760/com.iiordanov.aSPICE
>> D/android-service: connect_cb: start
>> 2021-12-23 15:28:00.499 29721-29760/com.iiordanov.aSPICE
>> I/android-service: connect_cb: successfully redirected device
>> 2021-12-23 15:28:03.582 29721-29760/com.iiordanov.aSPICE
>> D/android-service: connect_cb: start
>> 2021-12-23 15:28:03.582 29721-29760/com.iiordanov.aSPICE
>> E/android-service: connect_cb: failed to redirect device, error: No
>> free USB channel
>> 2021-12-23 15:28:06.385 29721-29760/com.iiordanov.aSPICE
>> D/android-service: connect_cb: start
>> 2021-12-23 15:28:06.385 29721-29760/com.iiordanov.aSPICE
>> E/android-service: connect_cb: failed to redirect device, error: No
>> free USB channel
>> 2021-12-23 15:28:08.634 29721-29760/com.iiordanov.aSPICE
>> D/android-service: connect_cb: start
>> 2021-12-23 15:28:08.634 29721-29760/com.iiordanov.aSPICE
>> E/android-service: connect_cb: failed to redirect device, error: No
>> free USB channel
>>
>> Your help is very appreciated.
>>
>> Thanks!
>> iordan
>>
>
> Hi,
>   this is expected. Every USB channel allow to attach one USB device. Is like 
> having 2 physical USB ports on your computer. If you don't use an HUB you can 
> attach only 2 USB physical devices. Currently there's no software USB hub so 
> one USB device takes one USB channel and by default only 2 USB channels are 
> attached to the VM.
>
> Frediano



-- 
The conscious mind has only one thread of execution.


Re: [Spice-devel] error: No free USB channel

2022-01-09 Thread i iordanov
Hi Uri,

Thanks for the clarifications!

iordan

On Sun, Dec 26, 2021 at 6:20 AM Uri Lublin  wrote:
>
> Hi iordan,
>
> On Sat, Dec 25, 2021 at 11:49 PM i iordanov  wrote:
> >
> > Hey Frediano,
> >
> > Thanks for responding - so I take it this is a server-side setting
> > (how many channels are attached to the VM)?
>
> Yes, the USB (usbredir) devices are defined in the VM configuration
> (likely via a libvirt domxml file).
> If you need more than 2 USB devices connected to the guest at the same
> time, add more
> such devices to your VM.
>
> >
> > Also, is there a spice-gtk API that may be used to obtain the number
> > of available USB channels at any given time? I.e. the UI of any client
> > application should have a way to inform the user how many "ports" are
> > still available at any point, right?
>
> Both remote-viewer (virt-viewer) and the spicy test tool use
> spice-gtk's usb device widget
> which has this information.
>
> Alternatively, you can get "free-channels" from spice-gtk's usb device manager
>
> Uri.
>
> >
> > Thanks!
> > iordan
> >
> > On Fri, Dec 24, 2021 at 4:05 AM Frediano Ziglio  wrote:
> > >
> > > Il giorno gio 23 dic 2021 alle ore 23:38 i iordanov  
> > > ha scritto:
> > >>
> > >> Hi guys,
> > >>
> > >> During my testing I've been unable to connect more than 2 USB devices
> > >> at a time - could you please help me figure out why that's happening?
> > >>
> > >> The backend starts returning error with message "No free USB channel",
> > >> but I can't see how to tune the number of USB channels available!
> > >>
> > >> 2021-12-23 15:27:52.608 29721-29760/com.iiordanov.aSPICE
> > >> D/android-service: connect_cb: start
> > >> 2021-12-23 15:27:52.608 29721-29760/com.iiordanov.aSPICE
> > >> I/android-service: connect_cb: successfully redirected device
> > >> 2021-12-23 15:28:00.499 29721-29760/com.iiordanov.aSPICE
> > >> D/android-service: connect_cb: start
> > >> 2021-12-23 15:28:00.499 29721-29760/com.iiordanov.aSPICE
> > >> I/android-service: connect_cb: successfully redirected device
> > >> 2021-12-23 15:28:03.582 29721-29760/com.iiordanov.aSPICE
> > >> D/android-service: connect_cb: start
> > >> 2021-12-23 15:28:03.582 29721-29760/com.iiordanov.aSPICE
> > >> E/android-service: connect_cb: failed to redirect device, error: No
> > >> free USB channel
> > >> 2021-12-23 15:28:06.385 29721-29760/com.iiordanov.aSPICE
> > >> D/android-service: connect_cb: start
> > >> 2021-12-23 15:28:06.385 29721-29760/com.iiordanov.aSPICE
> > >> E/android-service: connect_cb: failed to redirect device, error: No
> > >> free USB channel
> > >> 2021-12-23 15:28:08.634 29721-29760/com.iiordanov.aSPICE
> > >> D/android-service: connect_cb: start
> > >> 2021-12-23 15:28:08.634 29721-29760/com.iiordanov.aSPICE
> > >> E/android-service: connect_cb: failed to redirect device, error: No
> > >> free USB channel
> > >>
> > >> Your help is very appreciated.
> > >>
> > >> Thanks!
> > >> iordan
> > >>
> > >
> > > Hi,
> > >   this is expected. Every USB channel allow to attach one USB device. Is 
> > > like having 2 physical USB ports on your computer. If you don't use an 
> > > HUB you can attach only 2 USB physical devices. Currently there's no 
> > > software USB hub so one USB device takes one USB channel and by default 
> > > only 2 USB channels are attached to the VM.
> > >
> > > Frediano
> >
> >
> >
> > --
> > The conscious mind has only one thread of execution.
> >
>


-- 
The conscious mind has only one thread of execution.


Re: [Spice-devel] attaching a USB device by libusb_device or libusb_device_handle on Android

2022-01-09 Thread i iordanov
Hi Frediano, Uri, and Marc-Andre,

Just wanted to revive the discussion on this topic and see whether you
need anything more for this merge request:

https://gitlab.freedesktop.org/spice/spice-gtk/-/merge_requests/95

Thanks!
iordan

On Thu, Dec 23, 2021 at 3:19 PM i iordanov  wrote:
>
> Hi Frediano,
>
> Thanks for your feedback, that's exactly what I was looking for ahead
> of opening a MR.
>
> On Thu, Dec 23, 2021 at 4:21 AM Frediano Ziglio  wrote:
> >   could you open a MR?
>
> Is this the right copy of the repo to make an MR against?
> https://gitlab.freedesktop.org/spice/spice-gtk
>
> > I suppose you are speaking about allocate_device_for_file_descriptor. It's 
> > not called anywhere in the code so I suppose it is a public API. In this 
> > case it should start with something like spice_. Also it should have a bit 
> > more documentation and be listed in src/spice-glib-sym-file. But 
> > src/usb-backend.h is not a public header and we don't want it to be so it 
> > does not seem a good idea to declare there.
>
> That makes sense. However, if in a new implementation it would make
> sense for UsbDeviceManager to use some functionality from UsbBackend,
> I'd still need to declare it in usb-backend.h, right? Just as an
> aside, is there a way to make a method available to UsbDeviceManager
> but unavailable publicly?
>
> > This seems like a bad idea. It exposes something internal. Why not having 
> > just one additional function in device manager like
> >
> > gboolean
> > spice_usb_device_manager_add_device_from_fd(SpiceUsbDeviceManager *manager, 
> > GError **err);
>
> This is a good suggestion. You're essentially proposing for
> UsbDeviceManager (which is public) to be the one exposing the
> functionality and for it to potentially use some functionality left in
> UsbBackend (which is private) internally. I'll refactor.
>
> > The device could be communicated using device_added signal (if results if 
> > not FALSE), error can be returned, no additional interface to expose.
> > Or returning directory a SpiceUsbDevice* instead of a gboolean (but in this 
> > case interface will have to be blocking).
>
> Any pros / cons with either one? Any preference? If I return
> SpiceUsbDevice * directly, there is no need for the err, parameter and
> I could just return NULL device if something went wrong. Is there any
> preference or rule of thumb that the project generally follows?
>
> Thanks!
> iordan



-- 
The conscious mind has only one thread of execution.


[Spice-devel] New native SPICE and VNC Clients for iOS and Mac OS X

2022-04-19 Thread i iordanov
Hello,

I wanted to let you all know that I've released a new native SPICE
(and VNC) Clients for iOS and Mac OS X written in Swift. aSPICE comes
with console.vv and audio support. I've open-sourced them under the
GPLv3 license and put up the source code here:

https://gitlab.com/iiordanov/remote-desktop-clients-ios

>From the above-mentioned iOS code repository are built bVNC and aSPICE
for iOS/Mac OS X. An RDP client for iOS called aRDP is also in the
works.

This approach to build out multiple apps from a single repository is
similar to my Android clients bVNC and aSPICE, aRDP, and Opaque which
you may be familiar with (code at
https://github.com/iiordanov/remote-desktop-clients).

The new apps are available at the following links if you want to try them out:
aSPICE: https://apps.apple.com/ca/app/aspice-pro/id1560593107
bVNC: https://apps.apple.com/ca/app/bvnc-pro/id1506461202

I hope you find them useful!

Sincerely,
iordan

-- 
The conscious mind has only one thread of execution.


Re: [Spice-devel] New native SPICE and VNC Clients for iOS and Mac OS X

2022-04-20 Thread i iordanov
Not yet, but we will look into it!

iordan

On Wed, Apr 20, 2022 at 4:59 AM Vasiliy Tolstov  wrote:
>
> Hi! Very good news. Do you have free version available via homebrew?
> --
> Vasiliy Tolstov,
> e-mail: v.tols...@selfip.ru
>
>
> На 20 апр. 2022 г., 02:52:29, i iordanov  написали:
>>
>> Hello,
>>
>> I wanted to let you all know that I've released a new native SPICE
>> (and VNC) Clients for iOS and Mac OS X written in Swift. aSPICE comes
>> with console.vv and audio support. I've open-sourced them under the
>> GPLv3 license and put up the source code here:
>>
>> https://gitlab.com/iiordanov/remote-desktop-clients-ios
>>
>> From the above-mentioned iOS code repository are built bVNC and aSPICE
>> for iOS/Mac OS X. An RDP client for iOS called aRDP is also in the
>> works.
>>
>> This approach to build out multiple apps from a single repository is
>> similar to my Android clients bVNC and aSPICE, aRDP, and Opaque which
>> you may be familiar with (code at
>> https://github.com/iiordanov/remote-desktop-clients).
>>
>> The new apps are available at the following links if you want to try them 
>> out:
>> aSPICE: https://apps.apple.com/ca/app/aspice-pro/id1560593107
>> bVNC: https://apps.apple.com/ca/app/bvnc-pro/id1506461202
>>
>> I hope you find them useful!
>>
>> Sincerely,
>> iordan
>>
>> --
>> The conscious mind has only one thread of execution.



-- 
The conscious mind has only one thread of execution.


Re: [Spice-devel] 回复: Sync of audio in android

2013-09-20 Thread i iordanov
Hi Jojo and SPICE developers,

First of all, Jojo, thank you for your contribution to aSPICE. I am
currently working on integrating your audio code into the main trunk.

I have also noticed that audio and video get out of sync. The issue
seems to be more severe when the bandwidth of the connection is lower.
At home, my phone achieves about ~21Mbit/s with my current router, and
at work it achieves ~38Mbit/s. At 21Mbits/s, the issue is quite
severe, but at 38Mbit/s it is a lot less noticeable. My hypothesis is
that the sync issue occurs in part due to bandwidth limitations.
Perhaps with a 802.11N device that is connected at 150Mbit/s or more,
the issue will not be nearly as noticeable. A typical test of mine
consists of playing a video through youtube, keeping the video size
default. Can somebody comment on the bandwidth requirements of such a
scenario and whether my observations are in line with expectations?

Regardless of what is exacerbating the out of sync issue, in the
future we should be making use of timestamps in order to ensure that
audio and video are synced even in scenarios with limited bandwidth.
This would require dropping either audio packets or video frames, and
we can have an option that controls which one is prioritized. Can
somebody comment on that?

I am thinking that performance will be impacted by audio for the
majority of users at the moment, and there should be an option to turn
it on or off. I have not made up my mind what the default should be,
though, what do you guys think?

Thanks!
iordan

On Sun, Sep 8, 2013 at 11:45 AM, jojo  wrote:
> Hi,
> Is someone maintaining the playback channel of gstaudio  ?
>
> it looks like behind pulseaudio  with some feature :(
>
> Thanks,
>
> - Jojo
>
> 在 2013年9月6日星期五,上午11:00,jojo 写道:
>
> Hi,
> I use "gstaudio" to enable the audio output in android platform,
>
> but there is the sync issue with this approach, it looks like the pulse
> audio is
>
> the better choice.
>
> I research some pulse audio porting in android, some ugly problem looks like
> bellow which i think about :
>
> * much more device(driver) maybe can not used by PA, they implement with HAL
> layer with AudioFlinger
>
> * can not use PA as the regular NDK app in NDK, this will be done by OEM in
> their device
>
> am i right ?
>
> Thanks,
>
> - Jojo
>
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] Where is the source code of aSpice? And is there a spice version in iOS?

2013-10-03 Thread i iordanov
Hi Shen,

The source code is part of the bVNC project.

https://github.com/iiordanov/bVNC

Please keep in mind that the user interface is GPL licensed, and if
you distribute binaries to third parties, you must also make public
the exact source code that was used to produce the binaries.

Cheers and thanks!
iordan

On Thu, Sep 26, 2013 at 10:15 PM, Shen Dongliang  wrote:
> Hi all,
> Where is the source code of aSpice?
> And is there a spice version in iOS?
>
>Thanks!
>
>
> Best Regards,
> Edward Shen
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] govirt 0.30 plans

2013-10-03 Thread i iordanov
Hi Christophe,

When do you plan to release govirt 0.30 with the SSL fixes and the new
API for getting available VMs, powering on the VM at login time, etc.?

Do you plan to include something like the function that I submitted to
spice-devel earlier for reading the cert from a local file? You had
some suggestion for changes to the code, would you like me to make
those changes?

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] govirt 0.30 plans

2013-10-07 Thread i iordanov
Hi Christophe,

Thank you!

iordan

On Mon, Oct 7, 2013 at 5:11 AM, Christophe Fergeau  wrote:
> Hey,
>
> On Thu, Oct 03, 2013 at 04:03:22PM -0400, i iordanov wrote:
>> When do you plan to release govirt 0.30 with the SSL fixes and the new
>> API for getting available VMs, powering on the VM at login time, etc.?
>
> Ah thanks for the ping, after some bug fixing in the last weeks in the new
> features, it's starting to be in a good shape, I should try to get a
> release out this week.
>
>> Do you plan to include something like the function that I submitted to
>> spice-devel earlier for reading the cert from a local file? You had
>> some suggestion for changes to the code, would you like me to make
>> those changes?
>
> The OvirtProxy::ssl-ca-file property should do the trick for that.
>
> Christophe



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] Fw: Spice Android client: Screen turns black and won't recover

2013-10-10 Thread i iordanov
Hi Chuan,

On Thu, Oct 10, 2013 at 12:20 PM,   wrote:
> The workaround in v3.3.3 works, and I can’t tell any difference on my
> samsung Galaxy s4, too. But on some of my friends’ devices it can tell.
> I also have a workaround. the idea is that, when the issue occurs we just
> recycle the bitmap and create a new one, like what we do when the remote
> screen resolution has changed.

I thought about that too, but decided that it would neither be elegant
nor applicable to all three clients. It would not work for the VNC
client (bVNC) because there is absolutely no way to detect the issue
programatically in it. The SPICE and RDP clients, (aSPICE and aRDP)
perform a lockPixels() call in native code which fails, and we can
detect the issue at that point. However, bVNC is implemented entirely
in Java, and it only calls drawBitmap() which fails silently.

> If you like, I can send you the source, but the changes I have made is not
> elegant.

Let me look at it in any case.

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] aSPICE v3.3.5 with sound support released

2013-10-11 Thread i iordanov
Hello!

In collaboration with Jojo, the latest version of aSPICE (v3.3.5) now
has sound support. To enable sound, look for the "Enable Sound"
checkbox in the Advanced Settings on the main screen.

Either install/upgrade from Google Play, or grab the APK from here:

https://github.com/iiordanov/bVNC/releases

Cheers!
iordan


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] govirt 0.30 plans

2013-10-25 Thread i iordanov
Hi Christophe,

Are you getting close to a 0.30 release? I can't wait to see the final
version of the upgraded SSL handling!

What happens when a self-signed certificate is encountered for which
no valid CA is specified? Is it just a silent failure or (better) can
one connect some signals so a callback is triggered (like the
authentication callback) where the self-signed certificate is
available for displaying to the user for verification?

Thanks!
iordan

On Mon, Oct 7, 2013 at 1:43 PM, i iordanov  wrote:
> Hi Christophe,
>
> Thank you!
>
> iordan
>
> On Mon, Oct 7, 2013 at 5:11 AM, Christophe Fergeau  
> wrote:
>> Hey,
>>
>> On Thu, Oct 03, 2013 at 04:03:22PM -0400, i iordanov wrote:
>>> When do you plan to release govirt 0.30 with the SSL fixes and the new
>>> API for getting available VMs, powering on the VM at login time, etc.?
>>
>> Ah thanks for the ping, after some bug fixing in the last weeks in the new
>> features, it's starting to be in a good shape, I should try to get a
>> release out this week.
>>
>>> Do you plan to include something like the function that I submitted to
>>> spice-devel earlier for reading the cert from a local file? You had
>>> some suggestion for changes to the code, would you like me to make
>>> those changes?
>>
>> The OvirtProxy::ssl-ca-file property should do the trick for that.
>>
>> Christophe
>
>
>
> --
> The conscious mind has only one thread of execution.



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] govirt 0.30 plans

2013-10-29 Thread i iordanov
Thanks Christophe!

Iordan

On Tue, Oct 29, 2013 at 1:29 PM, Christophe Fergeau  wrote:
> On Fri, Oct 25, 2013 at 11:45:53AM -0400, i iordanov wrote:
>> Are you getting close to a 0.30 release? I can't wait to see the final
>> version of the upgraded SSL handling!
>
> I've finally released this:
> http://ftp.acc.umu.se/pub/GNOME/sources/libgovirt/0.3/libgovirt-0.3.0.tar.xz
>
>> What happens when a self-signed certificate is encountered for which
>> no valid CA is specified? Is it just a silent failure or (better) can
>> one connect some signals so a callback is triggered (like the
>> authentication callback) where the self-signed certificate is
>> available for displaying to the user for verification?
>
> It's reported as a failure to do the call, some work will likely be needed
> if you want something more sophisticated.
>
> Christophe



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] What I can do to improve the performance of aSpice?

2013-10-31 Thread i iordanov
Dear Chuan,

I am cc-ing the spice devel list in case anybody there wants to chime in.

On Thu, Oct 31, 2013 at 10:54 AM,   wrote:
> The speed of playing a 1920 x 1080 FHD video in remote desktop in full
> screen mode is slow.
>
> I have replaced jpeglib with libjpeg-turbo, this increase the mjpeg
> decompressing speed (bVNC/jni/src/channel-display-mjpeg.c), but it’s still
> not fast enough.
>
> Other than replacing jpeglib with libjpeg-turbo, what else can I do to
> improve the performance of aSpice?

As far as I know, the server detects constantly changing areas of the
desktop and treats them as video streams. It encodes them with mjpeg
and sends them over.

However, as far as I can see, mjpeg is not a supported codec on
Android (look for where it lists the Video codecs):
http://developer.android.com/guide/appendix/media-formats.html#network

The choices are:
H.263
H.264 AVC
MPEG-4 SP
VP8

But even with those, there are lots of caveats listed on the right,
like minimum Android version, limitations, etc. The only way to really
improve video performance dramatically is to start encoding the video
stream as a codec supported by Android.

Cheers,
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] govirt 0.30 plans

2013-11-05 Thread i iordanov
Hi Christophe,

I am now using the libgovirt 0.30 release. As a preliminary test with
self-signed certificates, I re-enabled fetching the ssl cert with
ovirt_proxy_fetch_ca_certificate().

However, at the point ovirt_proxy_set_tmp_ca_file() tries to set the
ssl-ca-file property, I get the following error:

GLib-GObject-WARNING **: g_object_set_valist: object class
`OvirtProxy' has no property named `ssl-ca-file'

Afterward, predictably the SSL handshake fails.

Can you tell me what I'm doing wrong?

Thanks!
iordan


On Tue, Oct 29, 2013 at 3:23 PM, i iordanov  wrote:
> Thanks Christophe!
>
> Iordan
>
> On Tue, Oct 29, 2013 at 1:29 PM, Christophe Fergeau  
> wrote:
>> On Fri, Oct 25, 2013 at 11:45:53AM -0400, i iordanov wrote:
>>> Are you getting close to a 0.30 release? I can't wait to see the final
>>> version of the upgraded SSL handling!
>>
>> I've finally released this:
>> http://ftp.acc.umu.se/pub/GNOME/sources/libgovirt/0.3/libgovirt-0.3.0.tar.xz
>>
>>> What happens when a self-signed certificate is encountered for which
>>> no valid CA is specified? Is it just a silent failure or (better) can
>>> one connect some signals so a callback is triggered (like the
>>> authentication callback) where the self-signed certificate is
>>> available for displaying to the user for verification?
>>
>> It's reported as a failure to do the call, some work will likely be needed
>> if you want something more sophisticated.
>>
>> Christophe
>
>
>
> --
> The conscious mind has only one thread of execution.



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] govirt 0.30 plans

2013-11-05 Thread i iordanov
Just as an additional clarification, I am using rest-0.7.90 from:

http://ftp.acc.umu.se/pub/GNOME/sources/rest/0.7/

Thanks!
iordan

On Tue, Nov 5, 2013 at 12:27 PM, i iordanov  wrote:
> Hi Christophe,
>
> I am now using the libgovirt 0.30 release. As a preliminary test with
> self-signed certificates, I re-enabled fetching the ssl cert with
> ovirt_proxy_fetch_ca_certificate().
>
> However, at the point ovirt_proxy_set_tmp_ca_file() tries to set the
> ssl-ca-file property, I get the following error:
>
> GLib-GObject-WARNING **: g_object_set_valist: object class
> `OvirtProxy' has no property named `ssl-ca-file'
>
> Afterward, predictably the SSL handshake fails.
>
> Can you tell me what I'm doing wrong?
>
> Thanks!
> iordan
>
>
> On Tue, Oct 29, 2013 at 3:23 PM, i iordanov  wrote:
>> Thanks Christophe!
>>
>> Iordan
>>
>> On Tue, Oct 29, 2013 at 1:29 PM, Christophe Fergeau  
>> wrote:
>>> On Fri, Oct 25, 2013 at 11:45:53AM -0400, i iordanov wrote:
>>>> Are you getting close to a 0.30 release? I can't wait to see the final
>>>> version of the upgraded SSL handling!
>>>
>>> I've finally released this:
>>> http://ftp.acc.umu.se/pub/GNOME/sources/libgovirt/0.3/libgovirt-0.3.0.tar.xz
>>>
>>>> What happens when a self-signed certificate is encountered for which
>>>> no valid CA is specified? Is it just a silent failure or (better) can
>>>> one connect some signals so a callback is triggered (like the
>>>> authentication callback) where the self-signed certificate is
>>>> available for displaying to the user for verification?
>>>
>>> It's reported as a failure to do the call, some work will likely be needed
>>> if you want something more sophisticated.
>>>
>>> Christophe
>>
>>
>>
>> --
>> The conscious mind has only one thread of execution.
>
>
>
> --
> The conscious mind has only one thread of execution.



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] govirt 0.30 plans

2013-11-05 Thread i iordanov
Hi Christophe,

I got around the issue of the self-signed certificate and not being
able to set the ssl-ca-file property through OvirtProxy by manually
hacking rest-0.7.90 for now. If you would like to see the rest-0.7.90
hack, please let me know, but I don't think it's relevant.

Once I get past the certificate issue, I encounter another difficulty
with both oVirt 3.2 and oVirt 3.3 (I installed both in an effort to
see if an older oVirt will work).

What happens is that both the new govirt usage:
vms = ovirt_api_get_vms(api);
ovirt_collection_fetch(vms, proxy, &error);
vm = OVIRT_VM(ovirt_collection_lookup_resource(vms, vm_name));

and the old govirt usage:
ovirt_proxy_fetch_vms(proxy, &error);
vm = ovirt_proxy_lookup_vm(proxy, vm_name);

result in vm == NULL (vms was not NULL).

The exact call which fails with resource == NULL is:
resource = g_hash_table_lookup(collection->priv->resources, name);

What I have done is manually navigated to https://FQDN/api/vms in
order to attach the output I get there for you to see if you can spot
why libgovirt fails to look up the VMs. The call failed with name set
to both "win" and "winbak".

I will be happy to test patches to libgovirt 0.30 for both the
ssl-ca-file issue and the issue I'm reporting now. Let me know how I
can be of additional assistance.

Many thanks!
iordan iordanov

-- 
The conscious mind has only one thread of execution.















win










desktop

up

2147483648







false
1


spice
NODE_FQDN
5900
1
false
false




2013-11-05T02:49:48.331-05:00
2013-11-05T01:21:05.697-05:00
ovirt
false
false

migratable


1073741824



true
native















winbak












desktop

up

2147483648







false
1


spice
NODE_FQDN
5901
1
false
false




2013-11-05T11:01:56.955-05:00
2013-11-05T02:36:09.126-05:00
ovirt
false
false

migratable


1073741824



true
native



___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] govirt 0.30 plans

2013-11-06 Thread i iordanov
Hi Christophe,

On Wed, Nov 6, 2013 at 4:06 AM, Christophe Fergeau  wrote:
> Ah right, this property is only in librest git, see
> http://cgit.freedesktop.org/spice/spice-gtk/commit/?id=32b123f44fc79eaad388d6be09f103457f3

This doesn't appear to be related to rest - copy/paste issue?

I did find the git repository for librest, and indeed, building it
from the repo fixes the SSL-related problems, so that's great. I also
noticed your fresh commit adding the ssl-ca-property in September :).

Cheers,
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] govirt 0.30 plans

2013-11-06 Thread i iordanov
Hi Christophe,

This one may turn out to not be an actual issue.

I had gotten used to the functionality offered by oVirt Live 0.8 (I
think it bundles oVirt 3.0) where I was able to attach as user
"admin@internal" to virtual machines created in the Administrative
Console (rather than in the User Console).

It appears that oVirt 3.2 and 3.3 either do not allow this anymore or
something else is amiss. One may not attach to such machines despite
them being reported at /api/vms.

To make a long story short, I made one of these machines a Template
and created a VM based on it in the User Console of admin@internal.
After that, I was able to connect!

Do you think there is still anything wrong? Should we be able to
attach to those vms (e.g. win and winbak)?

Cheers,
iordan



On Wed, Nov 6, 2013 at 4:22 AM, Christophe Fergeau  wrote:
> On Tue, Nov 05, 2013 at 06:03:21PM -0600, i iordanov wrote:
>> What I have done is manually navigated to https://FQDN/api/vms in
>> order to attach the output I get there for you to see if you can spot
>> why libgovirt fails to look up the VMs. The call failed with name set
>> to both "win" and "winbak".
>
> This code is happily parsed by the attached test program, so I'm not sure
> parsing is at fault. You can look at the REST calls by setting the
> REST_DEBUG env variable to 'proxy'
>
> Christophe



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk v5 2/2] Use system-wide trust certificate store

2013-11-12 Thread i iordanov
Hi Christophe,

I know I may be opening a can of worms with this question, but it'll
help with supporting mobile devices, and maybe improve portability.

Typically we cross-compile binaries for mobile devices, so detecting
the location of anything automatically will yield inappropriate
results. In addition, we cannot rely that on a mobile device the
system-wide store is in /etc/pki, /etc/ssl or that it's accessible.

Hence, would it be possible to provide an option along the lines of
what librest provides (--with-ca-certificates=[path]), which specifies
where to look for the system-wide CA bundle?

This way, I can create a CA bundle file, add it to mobile applications
as a resource, and then specify its location to librest and spice-gtk
at compile time.

If such an option cannot be provided, it would be nice if I can simply
change one location in the source of spice-gtk to tell it where to
look for the bundle. Where is that location?

Thanks!
iordan

On Tue, Nov 12, 2013 at 10:23 AM, Christophe Fergeau
 wrote:
> On Tue, Nov 12, 2013 at 04:20:03PM +0100, Christophe Fergeau wrote:
>> Currently, spice-gtk will look in $HOME/.spicec/spice_truststore.pem
>> by default for its trust certificate store (to verify the certificates
>> used during SPICE TLS connections). However, these days a system-wide
>> trust store can be found in /etc/pki or /etc/ssl.
>> This commit checks at compile time where the trust store is located,
>> and then loads it before loading the user-specified trust store.
>> This can be disabled at compile time using --without-ca-certificates.
>
> I forgot to amend this ;)
>
> Christophe
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk v5 2/2] Use system-wide trust certificate store

2013-11-13 Thread i iordanov
Hi David,

The KeyChain on Android is available only through Java. In some old
versions, apparently one was able to access it through native code,
but that's no longer the case.

I haven't looked into what it would take to make use of the KeyChain,
but it certainly won't be as easy as telling OpenSSL to verify a
certificate against its certificate authority store.

I'd have to basically rip out the current code and send the
certificate through a callback to Java.

In the interest of staying as close to libspice as possible and
keeping the modifications to a minimum, it would make better sense to
either feed libspice a CA bundle, or to tell OpenSSL where to find it.

Cheers,
iordan

On Wed, Nov 13, 2013 at 5:33 AM, David Jaša  wrote:
> Hi Iordan,
>
> I'm a mere Android user so this question of mine may be dumb:
>
> On Android, there is a system store for CAs and a user store for
> certificates (not just CAs but also personal and maybe self-signed). Is
> there some good way (API, fs location, ...) how can apps use these
> essentially system certs?
>
> David
>
>
> i iordanov píše v Út 12. 11. 2013 v 10:55 -0500:
>> Hi Christophe,
>>
>> I know I may be opening a can of worms with this question, but it'll
>> help with supporting mobile devices, and maybe improve portability.
>>
>> Typically we cross-compile binaries for mobile devices, so detecting
>> the location of anything automatically will yield inappropriate
>> results. In addition, we cannot rely that on a mobile device the
>> system-wide store is in /etc/pki, /etc/ssl or that it's accessible.
>>
>> Hence, would it be possible to provide an option along the lines of
>> what librest provides (--with-ca-certificates=[path]), which specifies
>> where to look for the system-wide CA bundle?
>>
>> This way, I can create a CA bundle file, add it to mobile applications
>> as a resource, and then specify its location to librest and spice-gtk
>> at compile time.
>>
>> If such an option cannot be provided, it would be nice if I can simply
>> change one location in the source of spice-gtk to tell it where to
>> look for the bundle. Where is that location?
>>
>> Thanks!
>> iordan
>>
>> On Tue, Nov 12, 2013 at 10:23 AM, Christophe Fergeau
>>  wrote:
>> > On Tue, Nov 12, 2013 at 04:20:03PM +0100, Christophe Fergeau wrote:
>> >> Currently, spice-gtk will look in $HOME/.spicec/spice_truststore.pem
>> >> by default for its trust certificate store (to verify the certificates
>> >> used during SPICE TLS connections). However, these days a system-wide
>> >> trust store can be found in /etc/pki or /etc/ssl.
>> >> This commit checks at compile time where the trust store is located,
>> >> and then loads it before loading the user-specified trust store.
>> >> This can be disabled at compile time using --without-ca-certificates.
>> >
>> > I forgot to amend this ;)
>> >
>> > Christophe
>> >
>> > ___
>> > Spice-devel mailing list
>> > Spice-devel@lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
>> >
>>
>>
>>
>
> --
>
> David Jaša, RHCE
>
> SPICE QE based in Brno
> GPG Key: 22C33E24
> Fingerprint: 513A 060B D1B4 2A72 7F0D 0278 B125 CD00 22C3 3E24
>
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk v5 2/2] Use system-wide trust certificate store

2013-11-13 Thread i iordanov
Hi Christophe,

On Wed, Nov 13, 2013 at 5:27 AM, Christophe Fergeau  wrote:
> If you don't specify a CA file explicitly, spice-gtk will try to use
> the CA file located in ~/.spicec/spice_truststore.pem if you use
> spice_set_session_option in your application (which implies using
> the spice commandline option stuff).

OK, then I'll simply set the ca_file to point to a CA bundle I ship
with the application for both ovirt and SPICE by default. If the user
overrides that with their own CA, then the CA bundle provided with the
app will not be used. Essentially, this emulates the behavior of
having a properly set path in OpenSSL and passing the --ovirt-ca-file
and/or --spice-ca-file options to remote-viewer, right?

Still, if OpenSSL provided functionality to set the default path to
its key-store at run-time, that would work best as it wouldn't require
a recompilation in order to change the path. I assume there is some
sort of option when configuring OpenSSL to set that path, but while
unlikely, it may be hard coded...

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] govirt 0.30 plans

2013-11-16 Thread i iordanov
Hi Itamar,

Thanks for the explanations! I'll let Christophe confirm that govirt
defaults to user-mode.

On Sat, Nov 16, 2013 at 5:26 AM, Itamar Heim  wrote:
> so you have two options - move to admin mode in govirt, or easier (and
> probably more consistent if you are aiming your solution for users rather
> than admins), give admin@internal a UserRole on the VMs, not an Admin Role.

The client will be aimed at users, so there is no real problem here,
once I got over the initial hurdle of actually attaching to machines.

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] oVirt support in aSPICE stalled due to broken network file I/O

2013-11-18 Thread i iordanov
Hi Christophe,

On Mon, Sep 16, 2013 at 8:23 AM, Christophe Fergeau  wrote:
> I've been looking into this today, and ended up adding a ssl-ca-file
> property to RestProxy (which OvirtProxy inherits from). This is needed
> in order to be able to use custom CA certificates for the REST https
> communication as the CA cert to use must be set on SoupSession objects
> which only RestProxy has access to.

There may be a slight omission in the librest upgrade, unless I'm
missing something. There does not appear to be a host-subject property
analogous to the one in the spice session class, is there?

Many thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] ovirt authentication and the "authenticate" signal

2013-11-20 Thread i iordanov
Hi Christophe,

Does the OvirtProxy object always need to authenticate by emitting the
"authenticate" signal?

It seems to still emit the signal even though I set its username and
password properties a priori with known good values. Am I doing something
wrong, or is it meant to behave this way?

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] VM pools and libgovirt

2013-11-25 Thread i iordanov
Hi guys!

I discovered the "Pools" feature in oVirt (I am using v3.3), and created a
pool of VMs. Then in FreeIPA I created a group and added a bunch of users
to it. I added the group to the pool's permissions with UserRole.

Now the way the web console works seems correct. When I login with one of
the users for the first time, I see the pool (say named "pool") and if I
double-click it, it launches a machine from the pool (it picked the first
one) and thereafter, "pool" gets replaced with the VM launched, "pool-1".
One is then able to attach to the console of "pool-1".

However, libgovirt does not seem to have support for pools. When one calls:

vms = ovirt_api_get_vms(api);

vms does not contain any trace of the pool initially. If one starts
double-clicks on "pool" from the web console, and "pool-1" is started, it
shows up in vms thereafter, as expected.

Do you guys think that there is a use-case for the client to be able to
show the pool to the user and allow him/her to start a VM from that pool
right then and there without needing the web interface?

If so, and providing the REST API allows that, would you be interested in
adding such functionality to libgovirt?

Thanks!
iordan


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] VM pools and libgovirt

2013-11-26 Thread i iordanov
On Tue, Nov 26, 2013 at 6:41 AM, Christophe Fergeau wrote:

> From a quick look at the documentation
>
> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.3-Beta/html/Developer_Guide/chap-Virtual_Machine_Pools.html
> it should not be too hard to add support for it (though
> https://bugzilla.redhat.com/show_bug.cgi?id=1034710 is missing in the
> doc).
> I think what is needed is to derive an OvirtVmPool class from
> OvirtResource which would parse the few extra attributes in the vm pool
> (size, prestarted_vms), and which would expose the 'allocatevm' action.
> Then OvirtApi would gain a method to get an OvirtCollection wrapping
> the 'vmpools' collection.
> Do you think you can provide a patch for this?
>

This sounds like an interesting project!

>From the following file in my oVirt installation:
/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/brokers.py

I gather that a POST request must be made to
/api/vmpools/SOMEVMPOOLID/allocatevm

with a certain content, certain headers, etc. However, I cannot craft a
successful POST "manually".

I guess I'm missing some crucial information which must be supplied in the
documentation?

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] VM pools and libgovirt

2013-11-26 Thread i iordanov
On Tue, Nov 26, 2013 at 9:03 AM, Christophe Fergeau wrote:

> I'd expect that doing something similar to ovirt_vm_action() should work?
> This action stuff needs to be moved from OvirtVm to OvirtResource, but I
> did not get to it yet ;)
>

Yes, but at least one thing that we don't know is what "action"s one would
take on a vmpool, right?

iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] VM pools and libgovirt

2013-11-26 Thread i iordanov
I take this back, the "action" here would be "allocatevm", right? I should
try playing with this.

Thanks!
iordan


On Tue, Nov 26, 2013 at 9:10 AM, i iordanov  wrote:

>
>
>
> On Tue, Nov 26, 2013 at 9:03 AM, Christophe Fergeau 
> wrote:
>
>> I'd expect that doing something similar to ovirt_vm_action() should work?
>> This action stuff needs to be moved from OvirtVm to OvirtResource, but I
>> did not get to it yet ;)
>>
>
> Yes, but at least one thing that we don't know is what "action"s one would
> take on a vmpool, right?
>
> iordan
>
> --
> The conscious mind has only one thread of execution.
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] VM pools and libgovirt

2013-11-26 Thread i iordanov
Yes, I had noticed that which is why I retracted my question :D.

Thanks Christophe!

iordan


On Tue, Nov 26, 2013 at 9:17 AM, Christophe Fergeau wrote:

> On Tue, Nov 26, 2013 at 09:12:16AM -0500, i iordanov wrote:
> > I take this back, the "action" here would be "allocatevm", right? I
> should
> > try playing with this.
>
> Yes it is, you can get the list of actions by accessing /api/vmpools/ in
> your webbrowser (OvirtVm has code to parse the available actions and put
> them in a hash table).
>
> Christophe
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] VM pools and libgovirt

2013-11-29 Thread i iordanov
Hi Christophe,

Good news! I have added the functionality we discussed to libgovirt 0.30
and it works. The only thing I don't have is
ovirt_vmpool_invoke_action_async() and related functions. I use the
synchronous call.

Can you please tell me:

0) Do you require the asynchronous functions before I submit my changes?

1) Would a patch against libgovirt 0.30 be acceptable, or would you require
a patch for the master branch of git?

2) Is a patch file acceptable, or do you prefer some other way of
submitting the changes?

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] VM pools and libgovirt

2013-12-03 Thread i iordanov
Hi Christophe,

On Mon, Dec 2, 2013 at 4:33 AM, Christophe Fergeau wrote:

> Thanks a lot for working on that!
>

My pleasure! Attached find the patch, generated the way you wanted.

Cheers,
iordan

-- 
The conscious mind has only one thread of execution.
From d940ea24d8146a8d728ac5b7e38ec03eaf808001 Mon Sep 17 00:00:00 2001
From: Iordan Iordanov 
Date: Tue, 3 Dec 2013 02:58:45 -0500
Subject: [PATCH] - Added initial support for VM pools. - The library is now
 able to allocate VMs from the pool synchronously. - The
 attributes size, prestarted_vms, and max_user_vms are
 parsed.

---
 govirt/Makefile.am|4 +
 govirt/govirt-private.h   |1 +
 govirt/ovirt-api.c|   26 
 govirt/ovirt-api.h|1 +
 govirt/ovirt-proxy.h  |1 +
 govirt/ovirt-resource.c   |1 +
 govirt/ovirt-utils.c  |7 +
 govirt/ovirt-utils.h  |1 +
 govirt/ovirt-vmpool-private.h |   40 ++
 govirt/ovirt-vmpool-xml.c |   80 +++
 govirt/ovirt-vmpool.c |  316 +
 govirt/ovirt-vmpool.h |   67 +
 12 files changed, 545 insertions(+)
 create mode 100644 govirt/ovirt-vmpool-private.h
 create mode 100644 govirt/ovirt-vmpool-xml.c
 create mode 100644 govirt/ovirt-vmpool.c
 create mode 100644 govirt/ovirt-vmpool.h

diff --git a/govirt/Makefile.am b/govirt/Makefile.am
index d9e70a5..0eade7e 100644
--- a/govirt/Makefile.am
+++ b/govirt/Makefile.am
@@ -26,6 +26,7 @@ libgovirt_la_HEADERS =		\
 	ovirt-storage-domain.h	\
 	ovirt-types.h		\
 	ovirt-vm.h		\
+	ovirt-vmpool.h		\
 	ovirt-vm-display.h	\
 	$(NULL)
 
@@ -42,6 +43,7 @@ noinst_HEADERS =		\
 	ovirt-storage-domain-private.h\
 	ovirt-utils.h		\
 	ovirt-vm-private.h	\
+	ovirt-vmpool-private.h	\
 	$(NULL)
 
 libgovirt_la_SOURCES =		\
@@ -62,6 +64,8 @@ libgovirt_la_SOURCES =		\
 	ovirt-vm.c		\
 	ovirt-vm-display.c	\
 	ovirt-vm-xml.c		\
+	ovirt-vmpool.c		\
+	ovirt-vmpool-xml.c		\
 	$(NULL)
 
 nodist_libgovirt_la_HEADERS =	\
diff --git a/govirt/govirt-private.h b/govirt/govirt-private.h
index 972ebac..3258aae 100644
--- a/govirt/govirt-private.h
+++ b/govirt/govirt-private.h
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #endif /* __OVIRT_PRIVATE_H__ */
diff --git a/govirt/ovirt-api.c b/govirt/ovirt-api.c
index ddb2300..bdcc576 100644
--- a/govirt/ovirt-api.c
+++ b/govirt/ovirt-api.c
@@ -41,6 +41,7 @@
 struct _OvirtApiPrivate {
 OvirtCollection *storage_domains;
 OvirtCollection *vms;
+OvirtCollection *vmpools;
 };
 
 
@@ -72,6 +73,7 @@ static void ovirt_api_dispose(GObject *object)
 
 g_clear_object(&api->priv->storage_domains);
 g_clear_object(&api->priv->vms);
+g_clear_object(&api->priv->vmpools);
 
 G_OBJECT_CLASS(ovirt_api_parent_class)->dispose(object);
 }
@@ -131,6 +133,30 @@ OvirtCollection *ovirt_api_get_vms(OvirtApi *api)
 return api->priv->vms;
 }
 
+/**
+ * ovirt_api_get_vmpools:
+ * @api: a #OvirtApi
+ *
+ * Return value: (transfer full):
+ */
+OvirtCollection *ovirt_api_get_vmpools(OvirtApi *api)
+{
+const char *href;
+
+g_return_val_if_fail(OVIRT_IS_API(api), NULL);
+
+if (api->priv->vmpools != NULL)
+return api->priv->vmpools;
+
+href = ovirt_resource_get_sub_collection(OVIRT_RESOURCE(api), "vmpools");
+if (href == NULL)
+return NULL;
+
+api->priv->vmpools = ovirt_collection_new(href, "vmpools", OVIRT_TYPE_VMPOOL, "vmpool");
+
+return api->priv->vmpools;
+}
+
 
 /**
  * ovirt_api_get_storage_domains:
diff --git a/govirt/ovirt-api.h b/govirt/ovirt-api.h
index d1de522..3af1bc0 100644
--- a/govirt/ovirt-api.h
+++ b/govirt/ovirt-api.h
@@ -63,6 +63,7 @@ OvirtApi *ovirt_api_new(void);
 
 OvirtCollection *ovirt_api_get_storage_domains(OvirtApi *api);
 OvirtCollection *ovirt_api_get_vms(OvirtApi *api);
+OvirtCollection *ovirt_api_get_vmpools(OvirtApi *api);
 
 G_END_DECLS
 
diff --git a/govirt/ovirt-proxy.h b/govirt/ovirt-proxy.h
index 985b76d..83d7024 100644
--- a/govirt/ovirt-proxy.h
+++ b/govirt/ovirt-proxy.h
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 G_BEGIN_DECLS
 
diff --git a/govirt/ovirt-resource.c b/govirt/ovirt-resource.c
index fca06e8..81241be 100644
--- a/govirt/ovirt-resource.c
+++ b/govirt/ovirt-resource.c
@@ -25,6 +25,7 @@
 #include 
 
 #include 
+#include 
 
 #include "govirt-private.h"
 #include "ovirt-error.h"
diff --git a/govirt/ovirt-utils.c b/govirt/ovirt-utils.c
index 618992a..6799ddb 100644
--- a/govirt/ovirt-utils.c
+++ b/govirt/ovirt-utils.c
@@ -126,6 +126,13 @@ ovirt_utils_boolean_from_string(const char *value)
 return (g_strcmp0(value, "true") == 0);
 }
 
+G_GNUC_INTERNAL guint64
+ovirt_utils_guint64_from_string(const char *value)
+{
+g_return_val_if_fail(value != NULL, FALSE);
+
+return g_ascii_strtoull(value, NULL, 10);
+}
 
 G_GNUC_INTERNAL const char *ovirt_utils_strip_api_base_dir(const char *path

Re: [Spice-devel] VM pools and libgovirt

2013-12-03 Thread i iordanov
Hi Christophe,

On Tue, Dec 3, 2013 at 5:12 AM, Christophe Fergeau wrote:

> Thanks for the patch, a few quick initial comments:
> - formatting of the commit log was off, see (for example)
>
> https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_GIT_commit_message_structure
>   for the recommended format of git commit logs (helps when using 'git
> shortlog' for example)
>   This document as a whole is an interesting read imo ;)
>

Thanks for the tip!


> - I'd use ovirt_vmpool_allocate_vm (rather than _allocatevm)
>

I used allocatevm because the action is actually "allocatevm" not
"allocate_vm", but if you think the function name doesn't need to be in
line with the action, then I agree.


> - imo the ovirt_invoke_action stuff should be moved to a generic place
>   before this patch, but I can look into that
>

Yes, it's basically duplicated code, but I didn't think it was up to me to
restructure :).


> - there were a few minor white space issues (see patch below)
>

My editor was misconfigured...


> - you need to export the new public functions in govirt/govirt.sym (see
>   patch below)
>

Yes, I meant to ask you about that, but I wasn't sure what version to put,
so I left it up to you (which was a good idea I think :))


Would you like me to generate a patch with all the suggested changes and a
better log entry?

Cheers!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] VM pools and libgovirt

2013-12-04 Thread i iordanov
Hi Christophe,

I'll do some testing this evening and will let you know.

Thanks!
iordan


On Wed, Dec 4, 2013 at 10:30 AM, Christophe Fergeau wrote:

> Hey,
>
> On Tue, Dec 03, 2013 at 06:21:22PM +0100, Christophe Fergeau wrote:
> > On Tue, Dec 03, 2013 at 11:46:40AM -0500, i iordanov wrote:
> > > Would you like me to generate a patch with all the suggested changes
> and a
> > > better log entry?
> >
> > I've been doing that actually, with various changes:
> > - renamed allocatevm to allocate_vm
> > - renamed _vmpool_ to _vm_pool
> > - moved ovirt_vm_pool_xml.c to ovirt_vm_pool.c as it was not that big
> > - used guint for the various VmPool properties
> > - detect parsing errors when parsing numbers
> > - fixed the copyright headers (the new files should be (C) 2013 yourself,
> >   not (C) 2013 Red Hat Inc)
> >
> > I still have these changes roughly split up if you don't like some of
> them
> > and want me to drop them.
>
> I've also added an async active_vm variant, and pushed all of this to
> http://cgit.freedesktop.org/~teuf/govirt/log/
> It would be nice if you could check I did not break anything for you (I
> haven't tested ovirt_vm_pool_activate_vm() at all). Then I can push all of
> it to git master ;)
>
> Thanks,
>
> Christophe
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] VM pools and libgovirt

2013-12-04 Thread i iordanov
Hi,

On Wed, Dec 4, 2013 at 10:30 AM, Christophe Fergeau wrote:

> It would be nice if you could check I did not break anything for you (I
> haven't tested ovirt_vm_pool_activate_vm() at all). Then I can push all of
> it to git master ;)
>

I tested and it allocates VMs just as well as the before your changes. It
also reports the parsed attributes correctly for me.

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] VM pools and libgovirt

2013-12-06 Thread i iordanov
Hi Christophe,

I have another patch for you to consider. This one removes some duplicated
code by creating and using a utility function to ovirt-utils.c. I also
switched out the two G_MAXUINT's in OvirtVmPool for G_MAXUINT32's.

We can make use of it any time an integer attribute needs to be parsed.
Maybe it should be in the OvirtResource class, but I'll leave that for you
to decide. Also, feel free to change naming or anything else you don't like.

Thanks!
iordan


On Thu, Dec 5, 2013 at 4:05 AM, Christophe Fergeau wrote:

> On Wed, Dec 04, 2013 at 11:12:09PM -0500, i iordanov wrote:
> > On Wed, Dec 4, 2013 at 10:30 AM, Christophe Fergeau  >wrote:
> > > It would be nice if you could check I did not break anything for you (I
> > > haven't tested ovirt_vm_pool_activate_vm() at all). Then I can push
> all of
> > > it to git master ;)
> > >
> >
> > I tested and it allocates VMs just as well as the before your changes. It
> > also reports the parsed attributes correctly for me.
>
> Cool, thanks for the testing, I can push it upstream then!
>
> Christophe
>



-- 
The conscious mind has only one thread of execution.
From 0da8920996800ce271cbe3fff1f554a9c0367e0e Mon Sep 17 00:00:00 2001
From: Iordan Iordanov 
Date: Fri, 6 Dec 2013 13:26:07 -0500
Subject: [PATCH] Reduced code duplication in OvirtVmPool by adding a utility
 function.

The functions to get size, prestarted_vms, and user_max_vms were all almost
the same code because each one was getting an integer from an XML node.
To deal with the code duplication, a utility function was added which
given a g_object and an XML node, sets a specified g_object property
from a specified XML sub-node. This patch removes the separate functions
and replaces them with calls to the new utility function, called
g_object_set_guint_property_from_xml().
---
 govirt/ovirt-utils.c   |   20 +++
 govirt/ovirt-utils.h   |4 +++
 govirt/ovirt-vm-pool.c |   63 +---
 3 files changed, 30 insertions(+), 57 deletions(-)

diff --git a/govirt/ovirt-utils.c b/govirt/ovirt-utils.c
index 3b9593a..8601cfe 100644
--- a/govirt/ovirt-utils.c
+++ b/govirt/ovirt-utils.c
@@ -212,3 +212,23 @@ G_GNUC_INTERNAL gboolean ovirt_utils_gerror_from_xml_fault(RestXmlNode *root, GE
 
 return TRUE;
 }
+
+
+G_GNUC_INTERNAL gboolean g_object_set_guint_property_from_xml(GObject *g_object,
+  RestXmlNode *node,
+  const gchar *node_name,
+  const gchar *prop_name)
+{
+RestXmlNode *sub_node;
+sub_node = rest_xml_node_find(node, node_name);
+if (sub_node != NULL) {
+guint value;
+g_return_val_if_fail(sub_node->content != NULL, FALSE);
+if (!ovirt_utils_guint_from_string(sub_node->content, &value)) {
+return FALSE;
+}
+g_object_set(g_object, prop_name, value, NULL);
+return TRUE;
+}
+return FALSE;
+}
diff --git a/govirt/ovirt-utils.h b/govirt/ovirt-utils.h
index f627c13..e92a2ec 100644
--- a/govirt/ovirt-utils.h
+++ b/govirt/ovirt-utils.h
@@ -32,6 +32,10 @@ G_BEGIN_DECLS
 RestXmlNode *ovirt_rest_xml_node_from_call(RestProxyCall *call);
 const char *ovirt_rest_xml_node_get_content(RestXmlNode *node, ...);
 gboolean ovirt_utils_gerror_from_xml_fault(RestXmlNode *root, GError **error);
+gboolean g_object_set_guint_property_from_xml(GObject *g_object,
+   RestXmlNode *node,
+   const gchar *node_name,
+   const gchar *prop_name);
 
 const char *ovirt_utils_genum_get_nick (GType enum_type, gint value);
 int ovirt_utils_genum_get_value (GType enum_type, const char *nick,
diff --git a/govirt/ovirt-vm-pool.c b/govirt/ovirt-vm-pool.c
index ebbf3ae..b2000dc 100644
--- a/govirt/ovirt-vm-pool.c
+++ b/govirt/ovirt-vm-pool.c
@@ -138,7 +138,7 @@ static void ovirt_vm_pool_class_init(OvirtVmPoolClass *klass)
   "Size of pool",
   "The number of VMs in the pool",
   0,
-  G_MAXUINT,
+  G_MAXUINT32,
   0,
   G_PARAM_READWRITE));
 g_object_class_install_property(object_class,
@@ -147,7 +147,7 @@ static void ovirt_vm_pool_class_init(OvirtVmPoolClass *klass)
   "Prestarted VMs",
  

Re: [Spice-devel] VM pools and libgovirt

2013-12-09 Thread i iordanov
Hi Christophe,

On Mon, Dec 9, 2013 at 11:35 AM, Christophe Fergeau wrote:

> Ah cool, thanks. This mostly looks good, though I'd probably add a check
> that the property has the right type using g_object_class_find_property.
>

That's a good idea.


>
> > I also switched out the two G_MAXUINT's in OvirtVmPool for G_MAXUINT32's.
>
> Hmm, I'm not sure about that one, what is the reasoning for it? I'd move
> this to a different commit.
>

Fair point about the different commit. I was aligning them to your choice
of making ovirt_utils_guint_from_string() return false if value64 exceeds
G_MAXUINT32.

This is a quick change, so I'll get you a new patch shortly.

Thanks!
iordan
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] VM pools and libgovirt

2013-12-09 Thread i iordanov
Hi Christophe,

Here's the new patch with the extra safety checks.

Cheers!
iordan


On Mon, Dec 9, 2013 at 11:56 AM, i iordanov  wrote:

> Hi Christophe,
>
> On Mon, Dec 9, 2013 at 11:35 AM, Christophe Fergeau 
> wrote:
>
>> Ah cool, thanks. This mostly looks good, though I'd probably add a check
>> that the property has the right type using g_object_class_find_property.
>>
>
> That's a good idea.
>
>
>>
>> > I also switched out the two G_MAXUINT's in OvirtVmPool for
>> G_MAXUINT32's.
>>
>> Hmm, I'm not sure about that one, what is the reasoning for it? I'd move
>> this to a different commit.
>>
>
> Fair point about the different commit. I was aligning them to your choice
> of making ovirt_utils_guint_from_string() return false if value64 exceeds
> G_MAXUINT32.
>
> This is a quick change, so I'll get you a new patch shortly.
>
> Thanks!
> iordan
>



-- 
The conscious mind has only one thread of execution.
From 04eadda83949733020a5cffc1dc26768063f31e9 Mon Sep 17 00:00:00 2001
From: Iordan Iordanov 
Date: Mon, 9 Dec 2013 12:23:43 -0500
Subject: [PATCH] Reduced code duplication in OvirtVmPool by adding a utility
 function.

The functions to get size, prestarted_vms, and user_max_vms were all almost
the same code because each one was getting an integer from an XML node.
To deal with the code duplication, a utility function was added which
given a g_object and an XML node, sets a specified g_object property
from a specified XML sub-node. This patch removes the separate functions
and replaces them with calls to the new utility function, called
g_object_set_guint_property_from_xml().
---
 govirt/ovirt-utils.c   |   23 +++
 govirt/ovirt-utils.h   |4 
 govirt/ovirt-vm-pool.c |   57 +++-
 3 files changed, 30 insertions(+), 54 deletions(-)

diff --git a/govirt/ovirt-utils.c b/govirt/ovirt-utils.c
index 3b9593a..dc4585e 100644
--- a/govirt/ovirt-utils.c
+++ b/govirt/ovirt-utils.c
@@ -212,3 +212,26 @@ G_GNUC_INTERNAL gboolean ovirt_utils_gerror_from_xml_fault(RestXmlNode *root, GE
 
 return TRUE;
 }
+
+
+G_GNUC_INTERNAL gboolean g_object_set_guint_property_from_xml(GObject *g_object,
+  RestXmlNode *node,
+  const gchar *node_name,
+  const gchar *prop_name)
+{
+RestXmlNode *sub_node;
+GParamSpec *spec;
+sub_node = rest_xml_node_find(node, node_name);
+if (sub_node != NULL && sub_node->content != NULL) {
+guint value;
+if (!ovirt_utils_guint_from_string(sub_node->content, &value)) {
+return FALSE;
+}
+spec = g_object_class_find_property(G_OBJECT_GET_CLASS(g_object), prop_name);
+if (spec != NULL && spec->value_type == G_TYPE_UINT) {
+g_object_set(g_object, prop_name, value, NULL);
+return TRUE;
+}
+}
+return FALSE;
+}
diff --git a/govirt/ovirt-utils.h b/govirt/ovirt-utils.h
index f627c13..e92a2ec 100644
--- a/govirt/ovirt-utils.h
+++ b/govirt/ovirt-utils.h
@@ -32,6 +32,10 @@ G_BEGIN_DECLS
 RestXmlNode *ovirt_rest_xml_node_from_call(RestProxyCall *call);
 const char *ovirt_rest_xml_node_get_content(RestXmlNode *node, ...);
 gboolean ovirt_utils_gerror_from_xml_fault(RestXmlNode *root, GError **error);
+gboolean g_object_set_guint_property_from_xml(GObject *g_object,
+   RestXmlNode *node,
+   const gchar *node_name,
+   const gchar *prop_name);
 
 const char *ovirt_utils_genum_get_nick (GType enum_type, gint value);
 int ovirt_utils_genum_get_value (GType enum_type, const char *nick,
diff --git a/govirt/ovirt-vm-pool.c b/govirt/ovirt-vm-pool.c
index ebbf3ae..61caafb 100644
--- a/govirt/ovirt-vm-pool.c
+++ b/govirt/ovirt-vm-pool.c
@@ -196,61 +196,10 @@ gboolean ovirt_vm_pool_allocate_vm_finish(OvirtVmPool *vm_pool,
 }
 
 
-static gboolean vm_pool_set_size_from_xml(OvirtVmPool *vm_pool, RestXmlNode *node)
-{
-RestXmlNode *size_node;
-size_node = rest_xml_node_find(node, "size");
-if (size_node != NULL) {
-guint size;
-g_return_val_if_fail(size_node->content != NULL, FALSE);
-if (!ovirt_utils_guint_from_string(size_node->content, &size)) {
-return FALSE;
-}
-g_object_set(G_OBJECT(vm_pool), "size", size, NULL);
-return TRUE;
-}
-return FALSE;
-}
-
-
-static gboolean vm_pool_set_prestarted_vms_from_xml(OvirtVmPool *vm_pool, RestXmlNode *node)
-{
-RestXmlNode *prestarted_vms_node;
-prest

Re: [Spice-devel] SPICE for text mode serial consoles ?

2014-01-15 Thread i iordanov
Hi Daniel,

Would the spiceterm project from Proxmox be of interest?

https://git.proxmox.com/?p=spiceterm.git;a=blob_plain;f=spiceterm.pod;hb=master

Cheers!
iordan


On Wed, Jan 15, 2014 at 10:37 AM, Daniel P. Berrange wrote:

> A long time back OpenStack had a remote text console service, in parallel
> with its VNC console console. This was later deleted because it was using
> insecure code from an unmaintained 3rd party project. Fairly frequently
> though people raise the issue of re-enabling remote text (ie serial)
> console access, as a low bandwidth alternative to a fully graphical
> console.
>
> I was wondering, given that SPICE is designed with many independant
> data channels, would it make sense to provide a way to add new channel
> type that could transport a text mode console ? eg SPICE would act as
> the backend for QEMU serial ports, as well as the graphical display.
> Clients could have a choice of opening the graphics related channels,
> the serial port channels, or both.
>
> NB I'm not saying I've time to work on this at all - I was just wondering
> if this was conceptually a reasonable feature to propose.
>
> Regards,
> Daniel
> --
> |: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/:|
> |: http://libvirt.org  -o- http://virt-manager.org:|
> |: http://autobuild.org   -o- http://search.cpan.org/~danberr/:|
> |: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc:|
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] SPICE for text mode serial consoles ?

2014-01-15 Thread i iordanov
Hi Daniel,

On Wed, Jan 15, 2014 at 11:08 AM, Daniel P. Berrange wrote:

> For this to be of value we want
> to be transporting plain text end-to-end in both directions.
>

This makes sense.

Cheers,
iordan
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] connecting to oVirt/RHEV VMs through proxy and the oVirt API

2014-01-16 Thread i iordanov
Hello,

My apologies for cross-posting, but this discussion concerns both mailing
lists, I think.

In Opaque, I recently started setting the proxy property of SpiceSession
from a console file, as is done in remote-viewer, in order to support
installations where the nodes are not "visible" from the point of view of
the client.

However, then I remembered that I have not seen the proxy property being
available through the oVirt/RHEV API. I looked at the latest remote-viewer
code, and I looked through the oVirt/RHEV API documentation, and indeed, I
see no way to get proxy information other than through the console.vv file.

If I am correct, then this means that both Opaque and remote-viewer cannot
connect to VMs behind a proxy unless a console.vv file is used, which also
means that since console.vv files are unobtainable through the User Portal
on mobile devices, mobile devices effectively cannot at all connect to such
VMs if the user is not an Administrator.

Would it be possible to expose the proxy parameter through the API? I
couldn't find a bug opened about this, but it doesn't mean it isn't there
:).

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [Users] connecting to oVirt/RHEV VMs through proxy and the oVirt API

2014-01-17 Thread i iordanov
Hi Juan,

On Fri, Jan 17, 2014 at 4:55 AM, Juan Hernandez  wrote:

> You are right. Obtaining the global proxy setting is currently
> impossible in the API. There is no bug requesting it, as far as I know.
> Can you open a new one?
>

Here is the bug report for future reference:

https://bugzilla.redhat.com/show_bug.cgi?id=1054948

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] Support for non-English keyboard layouts in aSPICE and Opaque

2014-01-26 Thread i iordanov
Hi guys,

Some of you may have seen most of this in my posting on the ovirt-users
mailing list. I wanted to inform the spice-devel list separately, in order
to hear your input on the topic as it concerns SPICE directly.

I really didn't like the idea of releasing Opaque (the oVirt/RHEV VM
console Android client) into production supporting only English (QWERTY),
so I decided to implement a workaround for the existing inability to send
Unicode directly to the OS of the VMs. It's not perfect, because it
requires users to choose their layout themselves correctly, and it requires
many layouts to be supported in order to approach universal usefulness.
However, I expect that interested people will contribute keyboard layout
map files for their own layouts once I document the final format and
release the documentation with the source code.

Using this method, Opaque (and soon aSPICE) translate Unicode characters
on-device according to a layout map chosen by the user into a series of
scan codes and meta key-presses. Currently English (QWERTY), German
(QWERTZ), and French (AZERTY) are fully supported including all AltGr and
dead-key combinations.

Even though a Unicode channel may become reality in the future, this method
will allow aSPICE and Opaque to immediately support existing installations
until there is a better solution.

At this point, I think that Opaque is feature-full enough for a public
release, so I'll be concentrating on integrating the project into
bVNC/aRDP/aSPICE.

Sincerely,
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] Support for non-English keyboard layouts in aSPICE and Opaque

2014-01-27 Thread i iordanov
Hi Dietmar,

Thanks for your suggestion. These keymap files appear to describe how to
effect special characters to the VM, but I don't see any description of
unicode characters representing letters and numbers. What did you use for
that purpose?

It's a useful resource for a cross-check in any case!

Thanks,
iordan


On Mon, Jan 27, 2014 at 12:09 AM, Dietmar Maurer wrote:

> > I really didn't like the idea of releasing Opaque (the oVirt/RHEV VM
> console
> > Android client) into production supporting only English (QWERTY), so I
> decided
> > to implement a workaround for the existing inability to send Unicode
> directly to
> > the OS of the VMs. It's not perfect, because it requires users to choose
> their
> > layout themselves correctly, and it requires many layouts to be
> supported in
> > order to approach universal usefulness. However, I expect that interested
> > people will contribute keyboard layout map files for their own layouts
> once I
> > document the final format and release the documentation with the source
> code.
>
> I also hit that problem in spiceterm,. I ended up using the qemu keymap
> files from
> /usr/share/kvm/keymaps/. They are quite easy to parse.
>
>
>


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] Support for non-English keyboard layouts in aSPICE and Opaque

2014-01-27 Thread i iordanov
Hi Dietmar,

Case in point. Let's consider:
/usr/share/qemu/keymaps/de

The user wants to input the letter "q" from their Android device. Since
this is QWERZ, I need a mapping of unicode 0x71 to scancode 0x10.

All I can find in /usr/share/qemu/keymaps/de that mentions 0x10 is the "at"
symbol with 0x10 altgr.

Thanks!
iordan


On Mon, Jan 27, 2014 at 11:48 AM, Dietmar Maurer wrote:

> Not sure if I understand your question. Those files have mappings for
> letters and numbers.
>
> You can look up the used names in /usr/include/X11/keysymdef.h file.
>
> I use a small script to extract those name->unicode mappings:
>
>
> https://git.proxmox.com/?p=spiceterm.git;a=blob;f=genkeysym.pl;h=cdccf3cf84c98a5944961cfdb5c6e85cd29c8542;hb=HEAD
>
> > Thanks for your suggestion. These keymap files appear to describe how to
> effect
> > special characters to the VM, but I don't see any description of unicode
> > characters representing letters and numbers. What did you use for that
> purpose?
>
>


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] Support for non-English keyboard layouts in aSPICE and Opaque

2014-01-28 Thread i iordanov
Hi Dietmar,

But that common file would work only for QWERTY!

#
# QWERTY first row
#
...
#
# QWERTY second row
#
...
#
# QWERTY third row
#
...

So it certainly doesn't cover all the cases (QWERTZ, AZERTY, etc) that
Opaque/aSPICE need to cover!

iordan




On Tue, Jan 28, 2014 at 12:42 AM, Dietmar Maurer wrote:

> > Case in point. Let's consider:
> > /usr/share/qemu/keymaps/de
> > The user wants to input the letter "q" from their Android device. Since
> this is
> > QWERZ, I need a mapping of unicode 0x71 to scancode 0x10.
> > All I can find in /usr/share/qemu/keymaps/de that mentions 0x10 is the
> "at"
> > symbol with 0x10 altgr.
>
> You missed the 'include' directive at the beginning of the file:
>
> include common
>
> That also includes /usr/share/qemu/keymaps/common
>
>
>
>


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] Support for non-English keyboard layouts in aSPICE and Opaque

2014-01-29 Thread i iordanov
Hi Dietmar,

Another case in point.

On Wed, Jan 29, 2014 at 12:08 AM, Dietmar Maurer wrote:

> I am not sure why you want to depend on the andriod keyboard layout?
>

I do not. Users can pick whatever layout they please on their device.
Opaque and aSPICE receive a KeyEvent from which a unicode value can be
extracted. I have to somehow convert this unicode value to a series of
scancodes that are *correct for the keyboard layout set inside the VM* of
the user.



> Simply set the VM to use a QWERTZ keyboard, and use the same layout
> with oqaque?
>

We're discussing (for example) a German user who has picked QWERTZ inside
their VM so that when they're connecting from their laptop which also has
QWERTZ, everything is sane.

Now, let's say the user connects from their Android device to the same VM
while on the road. If the VM is set to use QWERTZ, but I am using the
"common" layout file that is under discussion, what will happen is that
when the user presses the letter "z" on their device, they will get unicode
0x7a (regardless of the layout they're using on their device). If we use
the "common" layout file to figure out the scancode for this letter, we get
back scancode 0x2c. However, this scancode will generate a letter "y" on
the VM side.



>
> Or do you want to emulate android devices inside a VM?
>
>
No.

I hope this clears your questions up. I think you're solving a
fundamentally different problem in spiceterm to the one I'm solving in
Opaque/aSPICE. Do you not agree?

Thanks,
iordan


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] Support for non-English keyboard layouts in aSPICE and Opaque

2014-01-29 Thread i iordanov
On Wed, Jan 29, 2014 at 2:09 PM, Dietmar Maurer  wrote:

> > Now, let's say the user connects from their Android device to the same
> VM while
> > on the road. If the VM is set to use QWERTZ, but I am using the "common"
> > layout file that is under discussion
>
> I think you are confused. Nobody used the 'common' layout. Instead, that
> file is
> used as default mapping, but values may be overwritten by the language
> file.
>
> A good example is the 'z' mapping in the 'de' layout.
>

I hadn't spotted that. Pointing out a remapping in the non-default mappings
would have been sufficient throughout the preceding discussion. I guess you
were just as confused as I was.

iordan




-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] Opaque oVirt/RHEV/Proxmox client and source code released

2014-02-07 Thread i iordanov
Hello!

Apologies for the cross-post.

I've released Opaque into production on Google Play:
https://play.google.com/store/apps/details?id=com.undatech.opaque

and on Blackberry World for devices running Blackberry OS 10.2.1 or newer:
http://appworld.blackberry.com/webstore/content/46004889

The source code is now part of the renamed (formerly bVNC) repository:
https://github.com/iiordanov/remote-desktop-clients

The old name of the repository links to the new one. I didn't think it's a
good idea to keep calling it bVNC given that it already contains code to
build 4 different remote desktop clients.

If you are an oVirt or RHEV admin, please ensure that Opaque works in your
environment before recommending it to your users. Please start by reading
the KNOWN ISSUES section in the description of the application.

Thanks for all the feedback I received from the beta test community! I will
still be releasing new features to be beta-tested before pushing them to
production.

Sincerely,
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] using scan code from hardware keyboards

2014-02-12 Thread i iordanov
Hey guys,

When my hardware keyboard is connected/paired with my Android device, key
events do contain a scan code. I would love to just send that scan code
through to the VM, however, the Android documentation is really
discouraging on this matter.

Can you guys take a look at the docs for the method which retrieves the
scan code, and tell me whether you would rely on the value returned by
getScanCode() given what's written?

http://developer.android.com/reference/android/view/KeyEvent.html#getScanCode%28%29

In addition, my hardware keyboard has an English layout, and I have no way
of testing what a hardware keyboard with a non-English layout generates
when one presses a key which is not in the ASCII table. The reason it's
interesting is that Android key events may contain a key code, and  scan
code. The documented key codes for Android are all within the ASCII table.
When a soft-keyboard KeyEvent carries unicode data outside the ASCII table,
its key code == 0, and its "action" is not DOWN or UP, but MULTIPLE. So,
will (for example) a German hardware keyboard on which u-umlaut is pressed
generate an event with action == ACTION_MULTIPLE and a key code == 0, or
will it generate an event with action == DOWN/UP and key code set to
something inaccurate? Does anybody own an Android and a hardware keyboard
with a non-English layout to help me test this?

As things stand, if I don't trust the scan code the keyboard generates, I
cannot use my English layout hardware keyboard to type any language other
than English because the scan codes are simulated based on the unicode
character the event contains. On my English keyboard, the event inevitably
contains unicode characters that fall within the ASCII table, as you can
imagine :).

Your thoughts and suggestions are welcome.

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] using scan code from hardware keyboards

2014-02-13 Thread i iordanov
Hi David,

On Thu, Feb 13, 2014 at 6:56 AM, David Jaša  wrote:

> So what you need to test is to switch the keyboard layout in the OS to
> the interesting one (no idea how you do that in android)


There is no built-in way to switch layouts on Android. You can change the
language of your soft-keyboard, but the moment you pair or attach a
hardware keyboard, the soft keyboard disappears. Moreover, the layout seems
to switch back to English when that happens on my device - ouch!

I  It looks like there are hacks to deal with that like this application:
https://play.google.com/store/apps/details?id=com.apedroid.hwkeyboardhelper&hl=en

which on first glance appears to allow you to change your layout when a
hardware keyboard is being used.

So, either Android has a way to guess the hardware keyboard's layout based
on its device ID, or regardless of what symbols are actually written on
your hardware keyboard, it sends KeyEvents with "unreliable" [sic] scan
codes and invalid key codes, or it sends KeyEvents with a unicode character
set (something hard to believe, I know). I'm still not clear on this, and I
need for somebody to actually test it for me.


> and press some
> key. For example, the key with semicolon ";" on english/us layout
> produces "ů" when switched to czech layout.
>

I am not sure how this would apply on Android and that's why I'm asking :).

Finally, can somebody also voice your opinion on the reliability of scan
codes on Android given what's written in the API?
http://developer.android.com/reference/android/view/KeyEvent.html#getScanCode%28%29

Thanks!
iordan
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] aSPICE/Opaque can now record audio

2014-03-12 Thread i iordanov
Hey guys,

Following a suggestion by a developer, in order to enable audio
recording on Android, I changed spice-gstaudio.c from:

gchar *pipeline =
g_strdup_printf("autoaudiosrc name=audiosrc ! queue !
audioconvert ! audioresample ! "
"appsink caps=\"%s\" name=appsink", audio_caps);

to:

gchar *pipeline =
g_strdup_printf("openslessrc name=audiosrc ! queue !
audioconvert ! audioresample ! "
"appsink caps=\"%s\" name=appsink", audio_caps);


Does this look like an issue with Gstreamer where it cannot determine
the source for audio recording automatically on Android?

aSPICE v3.5.6 in Google Play already has this feature. This
improvement should make it into Opaque as soon as I find time as well.

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] aSPICE/Opaque can now record audio

2014-03-13 Thread i iordanov
Hi Christophe,

On Thu, Mar 13, 2014 at 5:18 AM, Christophe Fergeau  wrote:
> The point of autoaudiosrc is to guess for you the best recording source to
> use, so I'd say this is a bug with gstreamer or with openslessrc. Is this
> something shipped with gstreamer, or is it an out of tree gstreamer plugin?

It ships with gstreamer.

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] aSPICE/Opaque can now record audio

2014-04-26 Thread i iordanov
Hello SPICE devs,

A user of aSPICE (and by extension Opaque) reported that with audio
recording enabled, the client continually records and sends data to
the server thereby wasting large amounts of bandwidth. This wouldn't
really be an issue for desktops and to a lesser degree laptops, but
for mobile devices it has battery drain and potentially data usage
cost implications. So I'd like to add functionality to the client to
send audio only when the user has indicated they want to. I haven't
decided what I want the UI to look like, but I don't have the
functionality in he back-end anyway, which is why I'm contacting you.

What do you think would be the most appropriate modification to
spice-gtk to achieve what users need? I am not convinced it's a good
idea or useful to create and destroy a channel every time a button is
tapped. I could be convinced otherwise, but rather I'm thinking of
just stopping packets from being sent over when recording is disabled.
To that end, I think adding a property to SpiceGstaudio which
indicates whether to send packets and then disabling the call to
spice_record_send_data() if the property is false would work, right?

Is there any chance you guys would mainline such a change? If not, can
you guys think of functionality that would serve aSPICE/Opaque
purposes which you would consider mainlining?

Cheers and thanks!
iordan

On Thu, Mar 13, 2014 at 11:25 PM, i iordanov  wrote:
> Hi Christophe,
>
> On Thu, Mar 13, 2014 at 5:18 AM, Christophe Fergeau  
> wrote:
>> The point of autoaudiosrc is to guess for you the best recording source to
>> use, so I'd say this is a bug with gstreamer or with openslessrc. Is this
>> something shipped with gstreamer, or is it an out of tree gstreamer plugin?
>
> It ships with gstreamer.
>
> Thanks!
> iordan
>
> --
> The conscious mind has only one thread of execution.



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] international keyboard layout support in aSPICE

2014-10-25 Thread i iordanov
Hey guys,

I finally got some time to back-port the international keyboard layout
support from the Android Ovirt client Opaque into the SPICE client
aSPICE.

The changes are available in v3.6.7 and are analogous to existing
functionality in Opaque.

There is now a field just before the Advanced Settings button which
allows one to select a preferred keyboard layout. Upon selecting a
layout, the user would have to use an IME on their Android that allows
them to send the special characters they require (e.g. use a Spanish
keyboard to send "ñ"). Finally, the user would have to use a layout in
their virtual machine that matches the preferred layout selected in
aSPICE.

I hope everyone finds this useful!

Cheers,
iordan




-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] spice proxy support in govirt

2014-12-28 Thread i iordanov
Hello,

My apologies for the partial mail sent out, I hit a strange key
combination by mistake :). As I was saying, this bug got closed not
long ago:

https://bugzilla.redhat.com/show_bug.cgi?id=1054948

and I got around to upgrading to oVirt 3.5 today. When I set the
SpiceProxyDefault setting in oVirt:

engine-config -s SpiceProxyDefault="http://ovirt.iiordanov.com:8080";

This results in a proxy property being exposed in the display property
of a VM, thus:


...
http://ovirt.iiordanov.com:8080
...


I looked into the latest code of govirt, and I don't see support for
SpiceProxy in there. Would you be so kind as to add this feature?

Thanks!
iordan

On Sun, Dec 28, 2014 at 2:29 AM, i iordanov  wrote:
> Hi Christophe,
>
> This bug got closed not long ago:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1054948
>
> and I got around to upgrading to oVirt 3.5 today. When I set the
> SpiceProxyDefault setting in oVirt:
>
> 
> ...
> http://ovirt.iiordanov.com:8080
> ...
> 
>
> --
> The conscious mind has only one thread of execution.



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] spice proxy support in govirt

2015-01-15 Thread i iordanov
Hi Christophe,

I am quite busy during the week, but I'll try to find time during the weekend.

Thanks!
iordan

On Thu, Jan 15, 2015 at 8:04 AM, Christophe Fergeau  wrote:
> Hey,
>
> On Sun, Dec 28, 2014 at 02:34:10AM -0600, i iordanov wrote:
>> Hello,
>>
>> My apologies for the partial mail sent out, I hit a strange key
>> combination by mistake :). As I was saying, this bug got closed not
>> long ago:
>
> Sorry for the late reply, was on holidays for a while, came back just now :)
>
>> I looked into the latest code of govirt, and I don't see support for
>> SpiceProxy in there. Would you be so kind as to add this feature?
>
> I quickly cooked/compile-tested the attached patch, if you have time to
> test it, let me know how it works, otherwise I'll get back to that later
> (need to get lot of email under control first ;)
>
> Christophe



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] New SPICE client for Android

2013-06-10 Thread i iordanov
Hi Marc-Andre, Christophe,

I will reply to both of you in one message because Marc's reply contains
Christophe's message :). I am in Canada, so there is a time-zone difference
too.

On Mon, Jun 10, 2013 at 8:26 AM, Marc-André Lureau <
marcandre.lur...@gmail.com> wrote:
>
> Fantastic news! I played with it a bit on an Ace2, and I found it great.
> Thanks for your hard work!
>

You're welcome! It's a pleasure when I get such a positive response from
everyone.


>
> I am mostly missing guest auto-resize and sound support :) Did you hit
> technical problems or limitations from Android, or with enough time all
> should be solvable?
>

I think so. For the guest auto-resize, it was not immediately clear what I
have to do to make it happen. The client (aSPICE) certainly "knows" what
resolution it "wants" to get from the server, so it's just a matter of
expanding the API between Java and native to include a request for the
remote side to resize. Once that request is put in, everything else will be
automatic. The native layer will get a call to "primary_create", and will
then request a new bitmap from Java to draw into. Can you please point me
to the relevant code in spice-gtk to shorten my search?

Sound support is not yet coded in the Java layer. I've made sure not to
excise it from spice-gtk, in that I built celt051 for it and have included
the sound channel code in the library I build for Android. It is definitely
a planned feature, and I expect I should get working on it relatively soon.


> Btw, there is no build instructions I could find, but it looks like
> ndk-build from command line should do it.
>
>
> However, you use many prebuilt static libraries from /opt/android. How did
> you get those? (at some point I started looking at cerbero from the
> gstreamer-sdk to be able to build spice-gtk from scratch for different
> platforms)
>

Yes, apart from all those pre-built libraries in /opt/android, the build
instructions are simply "ndk-build", that part couldn't get any simpler.
The real challenge is getting some sort of coherent documentation put
together on how to build the rest. I got glib 2.28 pre-built from tarnyko.
He was also gracious enough to provide me the source and some quick notes
that he put together for building it. Please note that he says he is very
busy at the moment, so we should try not to bother him.

He has placed the source code here:
http://www.tarnyko.net/repo/agcc-glib.tar.lzma

The notes he sent me by email were:

- I used the old Mozilla r4c0moz3 ndk, like in the guy's mail. v7 gave me
troubles. The "cross-compiler" folder contains corresponding agcc.pl ;
- The build notes are in "compiler_glib/z_android-glib.
txt".
- The same folder contains static x86 versions of "glib-compile-schemas"
and "glib-genmarshal", which are needed for the process.

Please note that I'm very busy at the moment, and while I'd like to help
you, I may do it with sensible delays. I want to provide a full buildenv
myself at one time. 


>
>> Oh, this is nice, thanks for the announcement. Did you need to make a lot
>> of changes to spice-gtk? I assume some of these changes could be
>> integrated upstream to make things easier for people wanting to use SPICE
>> on Android?
>>
>>
> Yes, feel free to propose changes in spice-gtk to make your life easier,
> or to improve Android support.
>

OK, you guys asked for it ;). Here are some things that I've come up
against while making aSPICE, and this is not an exhaustive list, I will
probably add to it over time:

- There is no xkeysym (used for VNC, basically an (almost) complete
mapping) to linux keycode mapping in keymaps.csv. I have put in my enormous
TODO file the following lead to follow up on in an effort to add it, but
I've simply run out of cycles up to this point. There appears to be a
method we can add the mapping programatically here:


http://stackoverflow.com/questions/10157826/xkb-how-to-convert-a-keycode-to-keysym

and I would appreciate any assistance in that matter. At the moment, aSPICE
uses win32 virtual key codes to do what should be done with xkeysyms.

- I am experiencing some alignment issues on the ARM architecture with
non-aligned access to 64-bit values that are causing SIGBUS-es. I would
like to find a solution to them.

- There is no clear delineation between the spice library used to
communicate with the server and the GTK client. Or at least I couldn't find
it documented anywhere. In order to craft the Android client, I had to hack
away a bunch of code from the GTK client (with some ideas from shohyanglim
at gmail). I've tried to keep the modifications where they belong, so over
time, we can clean them up. To summarize:

The android-spice-widget.* files are modified versions of spice-widget.*

The android-spicy.c file is a modified version of spicy.c.

- Don't even bother looking at the keymap-gen-with-android.pl and
keymaps-with-android.csv f

Re: [Spice-devel] New SPICE client for Android

2013-06-10 Thread i iordanov
Hi Alon,

On Mon, Jun 10, 2013 at 8:53 AM, Alon Levy  wrote:

> I noticed you say "Multi-language support.." in the opening screen, this
> seems a left over from aVNC - Spice should work with any keyboard, the
> server doesn't actually know the language.
>

Yes, you are right it's left-over from bVNC. However, I am referring to the
fact that when somebody switches to a keyboard other than English on their
Android device, the characters should be transmitted correctly over to the
server. So I'm referring to the capability of the Android client.

However, the reality is probably that it should be an upcoming feature,
because (as I wrote to Marc-Andre and Christophe), I think it will require
a modification to keymaps.csv for it to be completely the case.

Cheers!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] aSPICE development discussion

2013-06-11 Thread i iordanov
Hello!

I decided to start a separate thread to discuss some of the upstream
changes I proposed.

On Mon, Jun 10, 2013 at 3:38 PM, Marc-André Lureau <
marcandre.lur...@gmail.com> wrote:

> You can modify the guest display resolution by calling
> spice_main_update_display().
>

I'll look into that as soon as possible.


> anyway ;). But when connecting to a guest with multiple monitors
> configured, you should decide wether to disabled or keep the extra
> monitors, to the risk of having unreachable monitors or content. Perhaps a
> monitor switching mechanism would be interesting?
>

So when you say that I have to decide, you mean that the client tells the
server what to do with the configured monitors? Why can't it simply put all
configured monitors in one large bitmap and send them over? That way,
they'll all be visible at the same time, and arranged as they are logically
configured on the server-side. Then, the Android user can zoom in wherever
they see fit, and there will be no unreachable content. Also, this way
there is no need for any switching.

bVNC already works like that with UltraVNC as reported by some of my users.


> Isn't getScanCode() enough? With keymaps.csv you can then translate it
> from Linux to xt, which is what the spice server (and qemu) expect.
>

>From the documentation of getScanCode here:
http://developer.android.com/reference/android/view/KeyEvent.html#getScanCode%28%29

It seems the value is unreliable and hardware-dependent... getKeyCode, and
getCharacters (in the case where a keyCode does not exist for the pressed
key), appear to be the "reliable" method. I already have a reliable
mechanism of converting them to an X keysym, which is why I'm suggesting we
add a keysym -> xt mapping to keymaps.csv.


- I am experiencing some alignment issues on the ARM architecture with
>> non-aligned access to 64-bit values that are causing SIGBUS-es. I would
>> like to find a solution to them.
>>
>>
> Interesting, do you have a reproducer? Feel free to file a bug to us if
> you have more informations, it's a good way to help each others. Gdb should
> be pretty useful to grab the backtrace of offending code:
> http://stackoverflow.com/questions/10534367/how-to-get-ndk-gdb-working-on-android
>

I know exactly where it is happening, and there is already a workaround put
in place for it. If you look into the file
"common/generated_client_demarshallers.c", and look for:

#ifdef ANDROID

near the start, you'll see the modified code.

This brings me to the next question. Do the generated_.*marshallers.c vary
from architecture to architecture? I've generated this file by running
"configure" on an amd64 system, but am compiling it for ARM. How bad is
this if at all?


>
> I think you should not try to mimic spice-widget or spicy too much.
> Instead you should write your own application and objects based on
> spice-glib API. Of course, you have similarities with spice-gtk and spicy:
> a canvas/display (sort of shared with jni and java canvas), and your app.
>

This makes sense.


>
> So it looks to me like android-spicy.c and android-spice-widget.c have no
> need to be splitted and you could merge them. In a word, all of src/android
> should be organized in a way that suits you, and don't worry about spicy or
> spice-widget at all. Just make it provide the API you need.
>

Alright.

Many thanks!
iordan

>
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] New SPICE client for Android

2013-06-11 Thread i iordanov
Hi David,

On Tue, Jun 11, 2013 at 11:51 AM, David Jaša  wrote:

>
> would you mind adding your projects to f-droid repository? The more
> open-source apps are there, the better. :)
>

Absolutely, I only learned about f-droid a few days ago.


> I also noticed no SSL/TLS connection options, did you have problems
> building it, or is it just omitted from the GUI?
>

It's just ommitted from the GUI. I wasn't sure how to include the
functionality.

One way is to add a checkbox with a description that reads something along
the lines of:

"Use TLS"

Which would make the "SPICE port" value a TLS port, and aSPICE would only
connect over TLS at that point.

The other possibility is to add another connection option to the drop-down
list which reads SPICE over TLS, and not have a checkbox at all. The
resulting functionality would be above (aSPICE would connect only over TLS).

Is there a use-case where people would want to enter both a non-TLS and a
TLS port at the same time? I personally want to be sure I've connected over
TLS when I've explicitly indicated I would like to connect over TLS :D.


> Anyway, I've tried it and it works really nice!
>

I'm glad it works well for now :). Do not hesitate to let me know of any
issues you (inevitably will) discover.

Cheers!
iordan


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] New SPICE client for Android

2013-06-11 Thread i iordanov
To everyone who has thanked me you are welcome! I only have one request
from you guys and anybody else who reads this thread. If you have a minute,
please put a review up for aSPICE Free/Pro. It doesn't have to have text if
you have nothing to say. I would like to get some sort of realistic score
for the application on Google Play, because with as few reviews as it has
now, it's score is very easily affected by bad review. Just this morning
somebody put up a 2-star review with basically "Please help me" in the
review body :)

Thanks for all the positive responses!

Sincerely,
iordan


On Tue, Jun 11, 2013 at 2:18 PM, i iordanov  wrote:

> Hi David,
>
> On Tue, Jun 11, 2013 at 11:51 AM, David Jaša  wrote:
>
>>
>> would you mind adding your projects to f-droid repository? The more
>> open-source apps are there, the better. :)
>>
>
> Absolutely, I only learned about f-droid a few days ago.
>
>
>> I also noticed no SSL/TLS connection options, did you have problems
>> building it, or is it just omitted from the GUI?
>>
>
> It's just ommitted from the GUI. I wasn't sure how to include the
> functionality.
>
> One way is to add a checkbox with a description that reads something along
> the lines of:
>
> "Use TLS"
>
> Which would make the "SPICE port" value a TLS port, and aSPICE would only
> connect over TLS at that point.
>
> The other possibility is to add another connection option to the drop-down
> list which reads SPICE over TLS, and not have a checkbox at all. The
> resulting functionality would be above (aSPICE would connect only over TLS).
>
> Is there a use-case where people would want to enter both a non-TLS and a
> TLS port at the same time? I personally want to be sure I've connected over
> TLS when I've explicitly indicated I would like to connect over TLS :D.
>
>
>> Anyway, I've tried it and it works really nice!
>>
>
> I'm glad it works well for now :). Do not hesitate to let me know of any
> issues you (inevitably will) discover.
>
> Cheers!
> iordan
>
>
> --
> The conscious mind has only one thread of execution.
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] New SPICE client for Android

2013-06-22 Thread i iordanov
Hello everyone,

I have released v3.2.8 of aSPICE in Google Play. This version supports SSL
and obeys rotation lock!

In order to use SSL, one must tap on the "Import CA" button. I've tried to
put as clear instructions in the dialog itself as possible. That being
said, your comments on correctness and clarity would be extremely welcome.
Once the CA is imported (and the cert subject entered if necessary), one
must also set the TLS port on the right of the "Import CA" button.

One thing that I am not sure how to relate to the users is, if they are
using an SSH tunnel, the SPICE server they're connecting to is *actually*
localhost. Hence, the subject is pretty much always mandatory... I wonder
if it'll become a point of confusion.

I've also put a Help button at the bottom of the dialog which starts a
browser and opens this page:
http://spice-space.org/page/SSLConnection

However, I am not sure whether that URL will survive in the long-run.

I hope you guys find this new feature useful and will try to break it for
me and let me know how it breaks!

Many thanks,
iordan


On Thu, Jun 13, 2013 at 11:49 PM, andya  wrote:

> How to build the Android aspice package for the "ant" command ?
>
> I have met a lot of errors?
>
>
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
>


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] why getScanCode() will not work for keyboard input

2013-06-23 Thread i iordanov
Hi Marc-Andre,

(And anybody else who wants to weigh in on this). After some research,
reading and experimentation, here is what I've discovered.

getScanCode() works only for physical devices (e.g. USB keyboards,
bluetooth keyboards, or hardware device keyboards). The vast majority of
input devices on Android are soft-keyboards which generate KeyEvents with
invalid or missing scan codes.

Such KeyEvents also don't even have a keycode. In such events, Android sets
the keycode to KEYCODE_UNKNOWN. In addition, a KeyEvent is quite often a
sequence of unicode characters rather than a single unicode character.

What *can* be obtained from every KeyEvent, however, is one or more unicode
characters with the getUnicodeChar() and getCharacters() functions
respectively.. For VNC purposes, what I do in bVNC is to convert these
unicode characters to X11 keysym values, which are then passed to the VNC
server. These keysyms are not just the ones that correspond to the XT
keyboard keys, but a much larger set which maps pretty much every unicode
character to a keysym.

Do you guys see any way in which we can handle this situation where the
input is not as straight forward as an XT keyboard?

What would work is if mobile clients were able to either send unicode
characters or X11 keysyms to the server.

Does anybody else have any better ideas?

Thanks again!
iordan


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] Howto built about for SPICE client for Android

2013-07-01 Thread i iordanov
Hello to everyone who is trying to build aSPICE.

1) Yes, by default when the source for the project is downloaded, a VNC
client is built. To change the behavior of the client, you can look at the
boolean variables isRdp and isSpice in VncCanvas.java which control whether
the project behaves as an RDP or SPICE client instead of a VNC client.
However, it is not enough to change the value of those variables, as the
RDP client needs FreeRDP built, and the SPICE client needs a collection of
other libraries built.

2) The BUILDING file contains instructions only for how to build the VNC
client and the RDP client (using the additional FreeRDP library).

3) The instructions for building the SPICE client will require some work,
but I will eventually get that done as well. Basically, it boils down to
this:

- Cross-build (for ARM with the android NDK) all the static libraries
listed near the top of bVNC/eclipse_projects/bVNC/jni/src/Android.mk
- Install them in the appropriate location (/opt/android in my case).
- cd bVNC/eclipse_projects/bVNC/jni/ ; ndk-build

I would appreciate any help with writing up of instructions if anybody else
gets to it first, but it is my intention to eventually produce some sort of
reasonable list of instructions and add them to the BUILDING file. I will
also document how one switches the project's behavior.

Cheers,
iordan


On Mon, Jul 1, 2013 at 7:58 PM, jojo  wrote:

>  Hi,
> Due to instructing of BUILDING of https://github.com/iiordanov/bVNC
>
> it creates VNC clinet by default, how to create the spice client by
> default ?
>
> Could you give me any hints ?
>
> Thanks,
>
> - Jojo
>
>


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] porting the virt-viewer onto Android

2013-07-25 Thread i iordanov
Hello!

I've cc'd Jojo with whom we discussed at length building aSPICE and
succeeded in the end to set up a build environment on his machine. Jojo,
please chime in if I forget something.

1) One needs to build a set of libraries which Jojo and I were able to
build, but so far haven't found the time to put together build
instructions. Jojo, will you be able to do so? It would be of great help at
this time, and it's fresher in your mind.

2) Yes, the build instructions for the native code are simply ndk-build, as
Jojo (cc'd) can attest.

3) However there are currently *TWO* places where a boolean "isSpice* must
be set manually to true. This will be fixed in a future release to be one
place. One is in VncCanvas, and the other in CompactBitmapData. This
variable is ordinarily set to true if the package name is aSPICE, however,
if memory serves me right setting the package name to aSPICE (without
moving a bunch of directories around and also run running sed liberally on
the code) may break sqlitegen, a package which sets up all the settings
database-related files. Sqlitegen is left over from android-vnc-viewer.

4) Finally, since the JNI calls in the project as it appears in github (as
bVNC) will originate from com.iiordanov.bVNC and not com.iiordanov.aSPICE,
there is a sed command I sent to Jojo which can be used to automatically
fix the native code for use in bVNC. I really should think about how to get
rid of this requirement. The command follows:

cd bVNC/eclipse_projects/bVNC/jni/src/android
sed -i 's/\(com.iiordanov.\)aSPICE/\1bVNC/' *

Jojo, was there anything else that needed to be done? Can you provide build
instructions for the library dependencies?

Thanks!
iordan


On Wed, Jul 24, 2013 at 10:16 AM, Marc-André Lureau wrote:

> Hi
>
> - Mensaje original -
> > Dear Miss/Mr,
> > I am an developer addicted to appliction development on Linux platform.
> And I
> > have been enthusiastic over KVM technoly for while and experienced the
> spice
> > client software virt-viewer. Now I'd like to port the virt-viewer onto
> > Android platform. I find it difficult to implement it for me
> ,however,since
> > I am in fact lacking experience on across-platformed transplant.
> > Additionally I 've not grasped of the vir-viewer thoroughly. I would
> > appreciate you if you can give me some suggestions.
>
> Iordan implemented aSpice, it is part of bVNC
>
> https://github.com/iiordanov/bVNC
>
> There is no build instructions, but ndk-build should work. However, you
> need a bunch of libraries that are difficult to find or cross-compile
> yourself. It would be nice to automate this somehow with a cross-build
> system like cerbero.
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] 回复: porting the virt-viewer onto Android

2013-08-05 Thread i iordanov
Hi Jojo,

On Sun, Aug 4, 2013 at 10:08 PM, jojo  wrote:

>  Hi,
> Almost of all what you said is right.
>  Ok, i have enabled Audio by now, please give me a little more time.
>

Good news! I can't wait to see your code! :)


>
> And it will be much more simple to build aSPICE client with dependence
> lib(glib and so on).
>

More good news! Many thanks Jojo, we await your improvements.

Cheers,
iordan
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] aSPICE and oVirt proxy

2013-08-23 Thread i iordanov
Hello SPICE developers!

When I was coding aSPICE I elected to use non-UI code from spicy. This may
have not been the wisest choice, because the recommended client is now
remote/virt-viewer. I'm guessing because spicy has not been maintained for
some time, it lacks logic to authenticate with a username to an oVirt
proxy.I have a few questions regarding this work.

1) Have I understood correctly that oVirt proxy support is what is lacking
in spicy?

2) Are there any other connection types that require a username?

3) Do you think it is feasible to isolate the code which deals with oVirt
proxy handling in virt-viewer and use that in aSPICE?

4) Am I better off porting the non-UI code from virt-viewer to Android and
using that instead of the non-UI code from spicy?

Thanks in advance for any input on this topic!

Sincerely,
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] aSPICE and oVirt proxy

2013-08-26 Thread i iordanov
Hi Marc-Andre, Christophe,

Thank you very much for your answers, it took me a little while to find the
libgovirt code, but now I have it and will read it and remote-viewer's code
to add the same functionality to aSPICE.

Cheers,
iordan


On Mon, Aug 26, 2013 at 7:18 AM, Christophe Fergeau wrote:

> On Sat, Aug 24, 2013 at 01:38:50AM +0200, Marc-André Lureau wrote:
> >
> > > 3) Do you think it is feasible to isolate the code which deals with
> oVirt
> > > proxy handling in virt-viewer and use that in aSPICE?
> > >
> >
> > The isolation from libgovirt should be enough for implementing a
> different
> > client easily.
>
> Yes, there is not a lot of oVirt-related logic in virt-viewer, most of the
> work is done in libgovirt.
>
> Christophe
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] aSPICE and oVirt proxy

2013-08-29 Thread i iordanov
Hey Christophe, Marc-Andre,

Would introspection be necessary for aSPICE? I would be calling libgovirt
functions exclusively from C.

I think I I'll have to turn it off in order to cross-compile some of these
libraries, so it would be *very* nice if it were not necessary! As far as I
can tell, cross-compiling introspection is impossible at this point from
what I read, e.g.:

https://mail.gnome.org/archives/gtk-devel-list/2011-December/msg00101.htmlThanksfor
any input!

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] aSPICE and oVirt proxy

2013-08-29 Thread i iordanov
That's what I thought. Thanks Christophe!

iordan


On Thu, Aug 29, 2013 at 5:31 PM, Christophe Fergeau wrote:

> On Thu, Aug 29, 2013 at 05:28:34PM -0400, i iordanov wrote:
> > Hey Christophe, Marc-Andre,
> >
> > Would introspection be necessary for aSPICE? I would be calling libgovirt
> > functions exclusively from C.
>
> You don't need introspection if you use the library from C. Introspection
> is used for Python, php, vala, ...
>
> Christophe
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [virt-tools-list] Is virsh supposed to work on Windows?

2013-09-05 Thread i iordanov
Hey Fernando,

1) As a possible workaround, can't you put a Linux server with virt-manager
installed somewhere, and then have the Windows sysadmins use it through X11
forwarding (with Xming, or Cygwin installed on the Windows machines)?

2) Also, if virt-manager can run under Cygwin, you can use it directly on
the Windows machines that way (I don't know if it does).

Cheers,
iordan




On Thu, Sep 5, 2013 at 3:01 PM, Fernando Lozano wrote:

> Hi,
>
>> I'm trying to use virsh and virt-viewer on Windows.  I'm running the
> latest binaries from 
> http://spice-space.org/**download.html,
> that is,
> virt-viewer-x64-0.5.7.msi on a Windows 7 64-bits computer.
>
 I am willing to help all I can to test, but I'm not a Gnome developer. I
>>>
>>> have not coded a single line in C for more than 10 yeas. :-(
>>>
>> You are lucky! :) libvirt is not a gnome technology. If you have some
>> developper experience, it might not be so hard to fix some of the issues
>> (like the paths).
>>
>
> If I were compiling and running on Linux, I'd give it a try despite my
> outdated C coding skills. But the current process of cross-compiling on
> Linux then running on Windows is not an easy one. Heck, if you readhatters
> and fedoraers who are used to do it doesn't do frequently, and have
> frequent dependency problems, what hope do I have to being able to do this
> -- even if I get approval from my boss? ;-)
>
> The ultimate goal is running virt-manager from Windows (but I found no
> port yet to test). It would be enough for the short-term being able to run
> at least virsh and virt-viewer so Windows syasdmins doesn't complain so
> much and doesn't tell my boss we should buy XenServer. (not kidding)
>
> It looks like the paths are not the issue with the code -- they were not
> easy to find, but this is a documenation probem. :-) I already send
> feedback to the lists about the correct paths for windows users.
>
> Sysinternals ProcessMonitor is a freeware windows tool that provides
> strace-like features, and from it I can tell reading the certificate files
> is not the problem anymore. It also shows no network errors and no other
> windows systemcalls issues.
>
>
>  If it's just accessing remote display, you could stick to remote-viewer?
>> Yes you need to know the port though.
>>
> If it were just for me I'd live with that. But other TI people here are
> complaining about "not user friendly" running remote-viewer directly and do
> not want to use Xming. So I need to provide an "easier" way to remote guest
> console access from windows, and also a way to run some kvm administration.
> As I said, they are already lobbying to move from KVM to something else. :-(
>
>
>  What version of virsh is included in that msi?  Maybe it's just a case
 of a stale build, for something that has been fixed upstream?

>>> C:>virsh -V
>>> Virsh command line tool of libvirt 0.10.2
>>>
>> See my previous reply. You can check the $prefix\deps.txt file for the
>> build versions.
>>
>
> As expected, deps.txt agrees with virsh -V:
>
> mingw32-libvirt-0.10.2-3.fc19.**noarch
> mingw32-libvirt-static-0.10.2-**3.fc19.noarch
>
> Same contents for both x64 and x86 virt-viewer 0.5.7 msi's from
> spice-space.org.
>
>  Do you know who built the Windows port? I know someone is doing that,
>>> because the binaries are updated every few months. :-)
>>>
>> Daniel & me? It's useful, since you found bugs. I could eventually fix
>> them, but libvirt on windows is probably not a priority...  I would start
>> by filling bugs.
>>
> As a Linux user myself, I would't care less about the windows port ;-) But
> as an IT consultant, I see most potentical RHEL+KVM or RHEV users (and KVM
> + CentOS, Fedora, Debian, etc users) have windows workstations and no
> knowledge, worse yet, no interest in using X remote displays. Not to
> mention there are times you need the guest console, X remote won't be
> enough.
>
> Besides it's very very inefficient accessing a guest console from
> virt-manager using Xming or other X server for Windows, with or without
> ssh. You are on an end-to-end 1Gbps LAN but feels like an ADSL connection
> or worse. :-(
>
> I'd argue to the Red Hat managers that windows ports of virt-manager and
> etc needs a higher priority if they want to grab market share from vmware,
> hyper-v or xenserver.
>
>
>  Again, I'm willing to help any way I can, but I can be only a tester,
>>> and a documentation writer. I won't be able to help as a developer. :-(
>>>
>> I would say hacking on libvirt windows is easy, as long as you have a
>> windows (to run) & a fedora (to build). Some issues could even be debugged
>> with wine (yes!)
>>
> The few docs I saw about porting Linux software for windows (like gimp)
> makes it look very hard, involving a significand investment in time just to
> get started and a deep knowledge about both platforms. Would you be able to
> provide a HOW-TO for virsh and maybe virt-viewer? 

[Spice-devel] oVirt support in aSPICE stalled due to broken network file I/O

2013-09-09 Thread i iordanov
Hey guys,

I've been looking at adding oVirt support to aSPICE, and at the moment I'm
completely stuck because of some glib functionality not working on Android.
The library govirt uses glib's convenient support for network file I/O (for
fetching certificates, VMs, etc.), but because of gio's reliance on gvfsd,
network file I/O does not operate on Android.

I've reported the bug to GNOME here:
https://bugzilla.gnome.org/show_bug.cgi?id=707796

but this will take a very long time to be fixed if it gets fixed at all.

In the meanwhile, (Christophe), do you think it's feasible to work around
this issue by augmenting govirt with some alternate methods of reading
files from the oVirt proxy (i.e. outside glib, download the file to a
temporary location and open it as a local file, etc.)?

Many thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] aSPICE for android with usbredir

2013-09-11 Thread i iordanov
Hello!

At the moment aSPICE does not support usbredir. It is certainly something
that I plan to support in the future, but I haven't even had a chance to
explore the feasibility of such a feature on the Android platform.

Cheers!
iordan


On Mon, Sep 9, 2013 at 10:22 PM, 李超  wrote:

> hi:
> Thanks for your hard work,and sorry for my English is poor.
>
>  I use aSPICE download from http://spice-space.org/download.html in
> my android device,but it doesn't support usbredir.
>
> so,if I want to do so,how can do it? Are you planning a version with
> usbredir?
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
>


-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] oVirt support in aSPICE stalled due to broken network file I/O

2013-09-12 Thread i iordanov
Hi Christophe,

It is currently very hard, bordering on impossible to build gvfs for
Android, because it ends up depending on GTK. The sequence of
dependencies is:

glib network I/O -> gvfs -> libsoup-gnome -> gnome-keyring -> gcr-3 ->
gcr-ui-3 -> GTK

The glib guys are arguing that this is not a bug, since it's just a
dependency that's missing, but I am trying to convince them that the
low-level glib should not end up depending on a UI library...

Hence for the moment, I absolutely cannot use glib network I/O. Can
you tell me, since you've written libgovirt, do you think it's
possible to add functionality to *it* rather than writing workarounds
for client software? I could work around this issue in aSPICE, but
that would not help for any other client on any other platform that
doesn't have GTK.

Regardless of whether you do agree it's best if govirt either stopped
relying on glib network file I/O or had an option to use a different
method, what library would you say would be best suited to replace all
the network file I/O operations that you have in govirt with a
download -> local file I/O sequence? Libcurl comes to mind, but
perhaps libsoup is better suited for the purpose in your opinion?

Thanks in advance for any help or advice you can offer.

Sincerely,
iordan
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] oVirt support in aSPICE stalled due to broken network file I/O

2013-09-13 Thread i iordanov
Hi Christophe,

I read through some govirt code, and I think you're right that gvfs is only
used during the fetching of the certificate. If that's the case, I will
start by not fetching the CA automatically, but requiring for users to
provide it to aSPICE the same way as they have to provide it for a simple
SPICE connection (within the "Import CA" dialog in aSPICE, which is
analogous to the --spice-ca-file option in virt-viewer). I think this will
work for most if not all people.

Thanks again!
iordan



On Thu, Sep 12, 2013 at 1:20 PM, Christophe Fergeau wrote:

> Hey Iordan,
>
> On Thu, Sep 12, 2013 at 01:11:45PM -0400, i iordanov wrote:
> > Hi Christophe,
> >
> > It is currently very hard, bordering on impossible to build gvfs for
> > Android, because it ends up depending on GTK. The sequence of
> > dependencies is:
> >
> > glib network I/O -> gvfs -> libsoup-gnome -> gnome-keyring -> gcr-3 ->
> > gcr-ui-3 -> GTK
> >
> > The glib guys are arguing that this is not a bug, since it's just a
> > dependency that's missing, but I am trying to convince them that the
> > low-level glib should not end up depending on a UI library...
> >
> > Hence for the moment, I absolutely cannot use glib network I/O. Can
> > you tell me, since you've written libgovirt, do you think it's
> > possible to add functionality to *it* rather than writing workarounds
> > for client software? I could work around this issue in aSPICE, but
> > that would not help for any other client on any other platform that
> > doesn't have GTK.
> >
> > Regardless of whether you do agree it's best if govirt either stopped
> > relying on glib network file I/O or had an option to use a different
> > method, what library would you say would be best suited to replace all
> > the network file I/O operations that you have in govirt with a
> > download -> local file I/O sequence? Libcurl comes to mind, but
> > perhaps libsoup is better suited for the purpose in your opinion?
>
> Could you try what I suggested in
>
> http://lists.freedesktop.org/archives/spice-devel/2013-September/014430.html
> ? I think gvfs is only used if you use the helpers to fetch the
> certificate, and the rest of the code is just doing calls into
> librest/libsoup which I think are not using gio/gvfs.
> If this is a correct, then I think it's not a big issue that you don't have
> gvfs on your platform. If it is, I'll have to look where/how it's used to
> figure out how to workaround this.
>
> Hope that helps,
>
> Christophe
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] oVirt support in aSPICE stalled due to broken network file I/O

2013-09-13 Thread i iordanov
Hi Christophe,

I hope this is not too much to ask, but would it be possible for OvirtProxy
to have a ca-cert-file property as well as a ca-cert property? This way,
supporting the spice-ca-file option as well as the existing aSPICE
functionality will be much easier.

Thanks!
iordan


On Fri, Sep 13, 2013 at 12:09 PM, i iordanov  wrote:

> Hi Christophe,
>
> I read through some govirt code, and I think you're right that gvfs is
> only used during the fetching of the certificate. If that's the case, I
> will start by not fetching the CA automatically, but requiring for users to
> provide it to aSPICE the same way as they have to provide it for a simple
> SPICE connection (within the "Import CA" dialog in aSPICE, which is
> analogous to the --spice-ca-file option in virt-viewer). I think this will
> work for most if not all people.
>
> Thanks again!
> iordan
>
>
>
> On Thu, Sep 12, 2013 at 1:20 PM, Christophe Fergeau 
> wrote:
>
>> Hey Iordan,
>>
>> On Thu, Sep 12, 2013 at 01:11:45PM -0400, i iordanov wrote:
>> > Hi Christophe,
>> >
>> > It is currently very hard, bordering on impossible to build gvfs for
>> > Android, because it ends up depending on GTK. The sequence of
>> > dependencies is:
>> >
>> > glib network I/O -> gvfs -> libsoup-gnome -> gnome-keyring -> gcr-3 ->
>> > gcr-ui-3 -> GTK
>> >
>> > The glib guys are arguing that this is not a bug, since it's just a
>> > dependency that's missing, but I am trying to convince them that the
>> > low-level glib should not end up depending on a UI library...
>> >
>> > Hence for the moment, I absolutely cannot use glib network I/O. Can
>> > you tell me, since you've written libgovirt, do you think it's
>> > possible to add functionality to *it* rather than writing workarounds
>> > for client software? I could work around this issue in aSPICE, but
>> > that would not help for any other client on any other platform that
>> > doesn't have GTK.
>> >
>> > Regardless of whether you do agree it's best if govirt either stopped
>> > relying on glib network file I/O or had an option to use a different
>> > method, what library would you say would be best suited to replace all
>> > the network file I/O operations that you have in govirt with a
>> > download -> local file I/O sequence? Libcurl comes to mind, but
>> > perhaps libsoup is better suited for the purpose in your opinion?
>>
>> Could you try what I suggested in
>>
>> http://lists.freedesktop.org/archives/spice-devel/2013-September/014430.html
>> ? I think gvfs is only used if you use the helpers to fetch the
>> certificate, and the rest of the code is just doing calls into
>> librest/libsoup which I think are not using gio/gvfs.
>> If this is a correct, then I think it's not a big issue that you don't
>> have
>> gvfs on your platform. If it is, I'll have to look where/how it's used to
>> figure out how to workaround this.
>>
>> Hope that helps,
>>
>> Christophe
>>
>
>
>
> --
> The conscious mind has only one thread of execution.
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] oVirt support in aSPICE stalled due to broken network file I/O

2013-09-13 Thread i iordanov
Hi Christophe,

If adding a ca-file property to OvirtProxy is not acceptable, would you
consider adding (something like) the following function to ovirt-proxy.c?

Please note that this is a preliminary variant that I haven't tested much,
and may not have enough error checking!

void ovirt_proxy_load_ca_cert_file (OvirtProxy *proxy,
   const gchar *ca_file_name,
   GError **error)
{
GMappedFile *ca_file = NULL;
GBytes *bytes = NULL;
gconstpointer ca_data;
gsize cert_length = 0;

ca_file = g_mapped_file_new(ca_file_name, FALSE, error);
if (ca_file == NULL) {
goto error;
}

bytes = g_mapped_file_get_bytes(ca_file);
cert_length = g_bytes_get_size(bytes);
ca_data = g_bytes_get_data (bytes, &cert_length);
set_downloaded_ca_cert(proxy, (char*)ca_data, cert_length);

error:
if (ca_file != NULL)
g_object_unref(ca_file);

if (bytes != NULL)
g_object_unref(bytes);
}

Cheers,
iordan


On Fri, Sep 13, 2013 at 12:53 PM, i iordanov  wrote:

> Hi Christophe,
>
> I hope this is not too much to ask, but would it be possible for
> OvirtProxy to have a ca-cert-file property as well as a ca-cert property?
> This way, supporting the spice-ca-file option as well as the existing
> aSPICE functionality will be much easier.
>
> Thanks!
> iordan
>
>
> On Fri, Sep 13, 2013 at 12:09 PM, i iordanov  wrote:
>
>> Hi Christophe,
>>
>> I read through some govirt code, and I think you're right that gvfs is
>> only used during the fetching of the certificate. If that's the case, I
>> will start by not fetching the CA automatically, but requiring for users to
>> provide it to aSPICE the same way as they have to provide it for a simple
>> SPICE connection (within the "Import CA" dialog in aSPICE, which is
>> analogous to the --spice-ca-file option in virt-viewer). I think this will
>> work for most if not all people.
>>
>> Thanks again!
>> iordan
>>
>>
>>
>> On Thu, Sep 12, 2013 at 1:20 PM, Christophe Fergeau 
>> wrote:
>>
>>> Hey Iordan,
>>>
>>> On Thu, Sep 12, 2013 at 01:11:45PM -0400, i iordanov wrote:
>>> > Hi Christophe,
>>> >
>>> > It is currently very hard, bordering on impossible to build gvfs for
>>> > Android, because it ends up depending on GTK. The sequence of
>>> > dependencies is:
>>> >
>>> > glib network I/O -> gvfs -> libsoup-gnome -> gnome-keyring -> gcr-3 ->
>>> > gcr-ui-3 -> GTK
>>> >
>>> > The glib guys are arguing that this is not a bug, since it's just a
>>> > dependency that's missing, but I am trying to convince them that the
>>> > low-level glib should not end up depending on a UI library...
>>> >
>>> > Hence for the moment, I absolutely cannot use glib network I/O. Can
>>> > you tell me, since you've written libgovirt, do you think it's
>>> > possible to add functionality to *it* rather than writing workarounds
>>> > for client software? I could work around this issue in aSPICE, but
>>> > that would not help for any other client on any other platform that
>>> > doesn't have GTK.
>>> >
>>> > Regardless of whether you do agree it's best if govirt either stopped
>>> > relying on glib network file I/O or had an option to use a different
>>> > method, what library would you say would be best suited to replace all
>>> > the network file I/O operations that you have in govirt with a
>>> > download -> local file I/O sequence? Libcurl comes to mind, but
>>> > perhaps libsoup is better suited for the purpose in your opinion?
>>>
>>> Could you try what I suggested in
>>>
>>> http://lists.freedesktop.org/archives/spice-devel/2013-September/014430.html
>>> ? I think gvfs is only used if you use the helpers to fetch the
>>> certificate, and the rest of the code is just doing calls into
>>> librest/libsoup which I think are not using gio/gvfs.
>>> If this is a correct, then I think it's not a big issue that you don't
>>> have
>>> gvfs on your platform. If it is, I'll have to look where/how it's used to
>>> figure out how to workaround this.
>>>
>>> Hope that helps,
>>>
>>> Christophe
>>>
>>
>>
>>
>> --
>> The conscious mind has only one thread of execution.
>>
>
>
>
> --
> The conscious mind has only one thread of execution.
>



-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] oVirt support in aSPICE stalled due to broken network file I/O

2013-09-15 Thread i iordanov
Hi Christophe,

I've tested the function and made one small change (bytes had to be
unref-ed before ca_file). This works for my purposes and solves my
issue of not being able to download the file using glib network I/O.
Would you be willing to include it in govirt? Notice that it
automatically uses set_downloaded_ca_cert() to set the ca property of
OvirtProxy.

void ovirt_proxy_load_ca_cert_file (OvirtProxy *proxy,
const gchar *ca_file_name,
GError **error)
{
GMappedFile *ca_file = NULL;
GBytes *bytes = NULL;
gconstpointer ca_data;
gsize cert_length = 0;

ca_file = g_mapped_file_new(ca_file_name, FALSE, error);
if (ca_file == NULL) {
goto error;
}

bytes = g_mapped_file_get_bytes(ca_file);
cert_length = g_bytes_get_size(bytes);
ca_data = g_bytes_get_data (bytes, &cert_length);
set_downloaded_ca_cert(proxy, (char*)ca_data, cert_length);

error:
if (bytes != NULL)
g_object_unref(bytes);
if (ca_file != NULL)
g_object_unref(ca_file);
return;
}

Thanks!
iordan

On Fri, Sep 13, 2013 at 4:52 PM, i iordanov  wrote:
> Hi Christophe,
>
> If adding a ca-file property to OvirtProxy is not acceptable, would you
> consider adding (something like) the following function to ovirt-proxy.c?
>
> Please note that this is a preliminary variant that I haven't tested much,
> and may not have enough error checking!
>
> void ovirt_proxy_load_ca_cert_file (OvirtProxy *proxy,
>const gchar *ca_file_name,
>GError **error)
> {
> GMappedFile *ca_file = NULL;
> GBytes *bytes = NULL;
> gconstpointer ca_data;
> gsize cert_length = 0;
>
> ca_file = g_mapped_file_new(ca_file_name, FALSE, error);
> if (ca_file == NULL) {
> goto error;
> }
>
> bytes = g_mapped_file_get_bytes(ca_file);
> cert_length = g_bytes_get_size(bytes);
> ca_data = g_bytes_get_data (bytes, &cert_length);
> set_downloaded_ca_cert(proxy, (char*)ca_data, cert_length);
>
> error:
> if (ca_file != NULL)
> g_object_unref(ca_file);
>
> if (bytes != NULL)
> g_object_unref(bytes);
> }
>
> Cheers,
> iordan
>
>
> On Fri, Sep 13, 2013 at 12:53 PM, i iordanov  wrote:
>>
>> Hi Christophe,
>>
>> I hope this is not too much to ask, but would it be possible for
>> OvirtProxy to have a ca-cert-file property as well as a ca-cert property?
>> This way, supporting the spice-ca-file option as well as the existing aSPICE
>> functionality will be much easier.
>>
>> Thanks!
>> iordan
>>
>>
>> On Fri, Sep 13, 2013 at 12:09 PM, i iordanov  wrote:
>>>
>>> Hi Christophe,
>>>
>>> I read through some govirt code, and I think you're right that gvfs is
>>> only used during the fetching of the certificate. If that's the case, I will
>>> start by not fetching the CA automatically, but requiring for users to
>>> provide it to aSPICE the same way as they have to provide it for a simple
>>> SPICE connection (within the "Import CA" dialog in aSPICE, which is
>>> analogous to the --spice-ca-file option in virt-viewer). I think this will
>>> work for most if not all people.
>>>
>>> Thanks again!
>>> iordan
>>>
>>>
>>>
>>> On Thu, Sep 12, 2013 at 1:20 PM, Christophe Fergeau 
>>> wrote:
>>>>
>>>> Hey Iordan,
>>>>
>>>> On Thu, Sep 12, 2013 at 01:11:45PM -0400, i iordanov wrote:
>>>> > Hi Christophe,
>>>> >
>>>> > It is currently very hard, bordering on impossible to build gvfs for
>>>> > Android, because it ends up depending on GTK. The sequence of
>>>> > dependencies is:
>>>> >
>>>> > glib network I/O -> gvfs -> libsoup-gnome -> gnome-keyring -> gcr-3 ->
>>>> > gcr-ui-3 -> GTK
>>>> >
>>>> > The glib guys are arguing that this is not a bug, since it's just a
>>>> > dependency that's missing, but I am trying to convince them that the
>>>> > low-level glib should not end up depending on a UI library...
>>>> >
>>>> > Hence for the moment, I absolutely cannot use glib network I/O. Can
>>>> > you tell me, since you've written libgovirt, do you think it's
>>>> > possible to add functionality to *it* rather than writing workarounds
>>>> > for client software? I could work around this 

Re: [Spice-devel] oVirt support in aSPICE stalled due to broken network file I/O

2013-09-16 Thread i iordanov
Hi Christophe,

On Mon, Sep 16, 2013 at 8:23 AM, Christophe Fergeau  wrote:
> I've been looking into this today, and ended up adding a ssl-ca-file
> property to RestProxy

This is for the oVirt (non-spice-related) SSL encryption, right? This
makes sense, and it will allow people with self-signed certificates to
specify their CA to their remote viewer of choice and have the server
certificate verified.

Thanks!
iordan

-- 
The conscious mind has only one thread of execution.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel