Patchwork [v2] ui/gtk: require at least GTK 2.18 and VTE 0.26

login
register
mail settings
Submitter Anthony Liguori
Date Feb. 22, 2013, 3:50 p.m.
Message ID <1361548255-13465-1-git-send-email-aliguori@us.ibm.com>
Download mbox | patch
Permalink /patch/222551/
State New
Headers show

Comments

Anthony Liguori - Feb. 22, 2013, 3:50 p.m.
This gives us the bare amount of features we need.  We can add work arounds
for older versions and lower the requirement but this should be a good
starting point.

Suggested-by: Daniel Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
v1 -> v2
 - tremendous simplification suggested by danpb
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Stefan Weil - Feb. 22, 2013, 4:05 p.m.
Am 22.02.2013 16:50, schrieb Anthony Liguori:
> This gives us the bare amount of features we need.  We can add work arounds
> for older versions and lower the requirement but this should be a good
> starting point.
>
> Suggested-by: Daniel Berrange <berrange@redhat.com>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> ---
> v1 -> v2
>  - tremendous simplification suggested by danpb
> ---
>  configure | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 0dadd31..0eb25dd 100755
> --- a/configure
> +++ b/configure
> @@ -1644,8 +1644,8 @@ fi
>  # GTK probe
>  
>  if test "$gtk" != "no"; then
> -    if $pkg_config gtk+-2.0 --modversion >/dev/null 2>/dev/null && \
> -       $pkg_config vte --modversion >/dev/null 2>/dev/null; then
> +    if $pkg_config --exists 'gtk+-2.0 >= 2.18.0' && \
> +       $pkg_config --exists 'vte >= 0.26.0'; then

It's even possible to combine both checks in one :-)

--exists 'gtk+-2.0 >= 2.18.0 vte >= 0.26.0'

But we need a different solution because not all platforms
support VTE. It must be possible to use GTK without VTE,
so VTE needs its own section in configure.

>  	gtk_cflags=`$pkg_config --cflags gtk+-2.0 2>/dev/null`
>  	gtk_libs=`$pkg_config --libs gtk+-2.0 2>/dev/null`
>  	vte_cflags=`$pkg_config --cflags vte 2>/dev/null`
Anthony Liguori - Feb. 22, 2013, 4:48 p.m.
Stefan Weil <sw@weilnetz.de> writes:

> Am 22.02.2013 16:50, schrieb Anthony Liguori:
>> This gives us the bare amount of features we need.  We can add work arounds
>> for older versions and lower the requirement but this should be a good
>> starting point.
>>
>> Suggested-by: Daniel Berrange <berrange@redhat.com>
>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>> ---
>> v1 -> v2
>>  - tremendous simplification suggested by danpb
>> ---
>>  configure | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 0dadd31..0eb25dd 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1644,8 +1644,8 @@ fi
>>  # GTK probe
>>  
>>  if test "$gtk" != "no"; then
>> -    if $pkg_config gtk+-2.0 --modversion >/dev/null 2>/dev/null && \
>> -       $pkg_config vte --modversion >/dev/null 2>/dev/null; then
>> +    if $pkg_config --exists 'gtk+-2.0 >= 2.18.0' && \
>> +       $pkg_config --exists 'vte >= 0.26.0'; then
>
> It's even possible to combine both checks in one :-)
>
> --exists 'gtk+-2.0 >= 2.18.0 vte >= 0.26.0'
>
> But we need a different solution because not all platforms
> support VTE. It must be possible to use GTK without VTE,
> so VTE needs its own section in configure.

As I mentioned eariler, the "other platforms" should start looking at
supporting VTE.

Rolling our own terminal emulation is not reasonable.

Regards,

Anthony Liguori

>
>>  	gtk_cflags=`$pkg_config --cflags gtk+-2.0 2>/dev/null`
>>  	gtk_libs=`$pkg_config --libs gtk+-2.0 2>/dev/null`
>>  	vte_cflags=`$pkg_config --cflags vte 2>/dev/null`
Anthony Liguori - Feb. 22, 2013, 5:01 p.m.
Applied.  Thanks.

Regards,

Anthony Liguori
Markus Armbruster - Feb. 22, 2013, 5:04 p.m.
Anthony Liguori <aliguori@us.ibm.com> writes:

> Stefan Weil <sw@weilnetz.de> writes:
>
>> Am 22.02.2013 16:50, schrieb Anthony Liguori:
>>> This gives us the bare amount of features we need.  We can add work arounds
>>> for older versions and lower the requirement but this should be a good
>>> starting point.
>>>
>>> Suggested-by: Daniel Berrange <berrange@redhat.com>
>>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>>> ---
>>> v1 -> v2
>>>  - tremendous simplification suggested by danpb
>>> ---
>>>  configure | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configure b/configure
>>> index 0dadd31..0eb25dd 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -1644,8 +1644,8 @@ fi
>>>  # GTK probe
>>>  
>>>  if test "$gtk" != "no"; then
>>> -    if $pkg_config gtk+-2.0 --modversion >/dev/null 2>/dev/null && \
>>> -       $pkg_config vte --modversion >/dev/null 2>/dev/null; then
>>> +    if $pkg_config --exists 'gtk+-2.0 >= 2.18.0' && \
>>> +       $pkg_config --exists 'vte >= 0.26.0'; then
>>
>> It's even possible to combine both checks in one :-)
>>
>> --exists 'gtk+-2.0 >= 2.18.0 vte >= 0.26.0'
>>
>> But we need a different solution because not all platforms
>> support VTE. It must be possible to use GTK without VTE,
>> so VTE needs its own section in configure.
>
> As I mentioned eariler, the "other platforms" should start looking at
> supporting VTE.
>
> Rolling our own terminal emulation is not reasonable.

Agreed.  There's always VNC, even on "other platforms".
Stefan Weil - Feb. 22, 2013, 5:04 p.m.
Am 22.02.2013 17:48, schrieb Anthony Liguori:
> Stefan Weil <sw@weilnetz.de> writes:
>
>> Am 22.02.2013 16:50, schrieb Anthony Liguori:
>>> This gives us the bare amount of features we need.  We can add work arounds
>>> for older versions and lower the requirement but this should be a good
>>> starting point.
>>>
>>> Suggested-by: Daniel Berrange <berrange@redhat.com>
>>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>>> ---
>>> v1 -> v2
>>>  - tremendous simplification suggested by danpb
>>> ---
>>>  configure | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configure b/configure
>>> index 0dadd31..0eb25dd 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -1644,8 +1644,8 @@ fi
>>>  # GTK probe
>>>  
>>>  if test "$gtk" != "no"; then
>>> -    if $pkg_config gtk+-2.0 --modversion >/dev/null 2>/dev/null && \
>>> -       $pkg_config vte --modversion >/dev/null 2>/dev/null; then
>>> +    if $pkg_config --exists 'gtk+-2.0 >= 2.18.0' && \
>>> +       $pkg_config --exists 'vte >= 0.26.0'; then
>> It's even possible to combine both checks in one :-)
>>
>> --exists 'gtk+-2.0 >= 2.18.0 vte >= 0.26.0'
>>
>> But we need a different solution because not all platforms
>> support VTE. It must be possible to use GTK without VTE,
>> so VTE needs its own section in configure.
> As I mentioned eariler, the "other platforms" should start looking at
> supporting VTE.
>
> Rolling our own terminal emulation is not reasonable.
>
> Regards,
>
> Anthony Liguori

As I mentioned earlier, there is no VTE binary for MinGW / MinGW-w64.
According to the VTE mailing lists, the last efforts to fix this were
stopped
some time ago. I tried building a VTE binary and had to get a cascade
of required packages. Most of those packages also had to be built locally
and needed modifications for MinGW.Even then, I had the impression that
the VTE code still needs a lot of work to be compilable with MinGW.

There _is_ already a working terminal emulation in QEMU since several years.
I know its limitations very well and also contributed some improvements
in the past. The QEMU terminal emulation is not excellent, but it is good
enough for the monitor, serial console and other text windows.

Therefore I strongly want to have GTK support based on QEMU's terminal
emulation (or any other terminal emulation != VTE) for MinGW.

Regards,

Stefan Weil
Stefan Weil - Feb. 22, 2013, 5:26 p.m.
Am 22.02.2013 18:01, schrieb Anthony Liguori:
> Applied.  Thanks.
>
> Regards,
>
> Anthony Liguori

Debian stable (Squeeze) has vte-0.24.3.
Your patch disables QEMU's GTK gui for that common platform.

Would you mind reducing the VTE version requirement to 0.24.0?
I see no obvious problems when I change it here for Squeeze.

Regards,

Stefan Weil
Stefan Weil - Feb. 22, 2013, 5:27 p.m.
Am 22.02.2013 18:04, schrieb Markus Armbruster:
> Anthony Liguori <aliguori@us.ibm.com> writes:
>
>> Stefan Weil <sw@weilnetz.de> writes:
>>
>>> Am 22.02.2013 16:50, schrieb Anthony Liguori:
>>>> This gives us the bare amount of features we need.  We can add work arounds
>>>> for older versions and lower the requirement but this should be a good
>>>> starting point.
>>>>
>>>> Suggested-by: Daniel Berrange <berrange@redhat.com>
>>>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>>>> ---
>>>> v1 -> v2
>>>>  - tremendous simplification suggested by danpb
>>>> ---
>>>>  configure | 4 ++--
>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/configure b/configure
>>>> index 0dadd31..0eb25dd 100755
>>>> --- a/configure
>>>> +++ b/configure
>>>> @@ -1644,8 +1644,8 @@ fi
>>>>  # GTK probe
>>>>  
>>>>  if test "$gtk" != "no"; then
>>>> -    if $pkg_config gtk+-2.0 --modversion >/dev/null 2>/dev/null && \
>>>> -       $pkg_config vte --modversion >/dev/null 2>/dev/null; then
>>>> +    if $pkg_config --exists 'gtk+-2.0 >= 2.18.0' && \
>>>> +       $pkg_config --exists 'vte >= 0.26.0'; then
>>> It's even possible to combine both checks in one :-)
>>>
>>> --exists 'gtk+-2.0 >= 2.18.0 vte >= 0.26.0'
>>>
>>> But we need a different solution because not all platforms
>>> support VTE. It must be possible to use GTK without VTE,
>>> so VTE needs its own section in configure.
>> As I mentioned eariler, the "other platforms" should start looking at
>> supporting VTE.
>>
>> Rolling our own terminal emulation is not reasonable.
> Agreed.  There's always VNC, even on "other platforms".

Did I miss something? VNC is not a terminal emulation.
As far as I know VNC uses QEMU's terminal emulation.
MinGW just requires a similar solution for GTK.

Stefan W.
Anthony Liguori - Feb. 22, 2013, 5:49 p.m.
Stefan Weil <sw@weilnetz.de> writes:

> Am 22.02.2013 17:48, schrieb Anthony Liguori:
>> Stefan Weil <sw@weilnetz.de> writes:
>>
>>> But we need a different solution because not all platforms
>>> support VTE. It must be possible to use GTK without VTE,
>>> so VTE needs its own section in configure.
>> As I mentioned eariler, the "other platforms" should start looking at
>> supporting VTE.
>>
>> Rolling our own terminal emulation is not reasonable.
>>
>> Regards,
>>
>> Anthony Liguori
>
> As I mentioned earlier, there is no VTE binary for MinGW / MinGW-w64.
> According to the VTE mailing lists, the last efforts to fix this were
> stopped
> some time ago. I tried building a VTE binary and had to get a cascade
> of required packages. Most of those packages also had to be built locally
> and needed modifications for MinGW.Even then, I had the impression that
> the VTE code still needs a lot of work to be compilable with MinGW.
>
> There _is_ already a working terminal emulation in QEMU since several years.
> I know its limitations very well and also contributed some improvements
> in the past. The QEMU terminal emulation is not excellent, but it is good
> enough for the monitor, serial console and other text windows.
>
> Therefore I strongly want to have GTK support based on QEMU's terminal
> emulation (or any other terminal emulation != VTE) for MinGW.
>

Sorry, VTE is the only way forward.  Just ignoring the obvious problem
of incomplete terminal emulation, there are many other problems with our
current terminal code.  For example, try the following with gtk:

  qemu -name "Färber"

And then with SDL

  qemu -name "Färber" -sdl

And do an 'info name' command in the monitor.  Might not seem like a big
deal if your language only has a few differences from US-ASCII but it's
a huge issue for a language like Simplified Chinese where there is no
overlap at all.

Furthermore, these languages require use of an Input Method to enter in
characters.  VTE provides a single function call to add the necessary
menu options and handles all of the details for you.

Our current console code also renders with a bitmap font.  With a high
density display, which I suspect most laptops will have in a few years
thanks to Retina, the rendered bitmap font is not even readable.  Sure,
you can scale, but scaling looks awful compared to a properly rendered
vectored font.

And then there are the issues of copy/paste, accessibility with screen
readers, I could go on for hours I think :-)

I'm 100% confident that quickest way to a decent UI for Windows is to
fixup VTE.  It doesn't seem bad right now but as we add more features,
the gap between our console code and VteTerminal will be massive.

Regards,

Anthony Liguori

> Regards,
>
> Stefan Weil
Anthony Liguori - Feb. 22, 2013, 5:51 p.m.
Stefan Weil <sw@weilnetz.de> writes:

> Am 22.02.2013 18:01, schrieb Anthony Liguori:
>> Applied.  Thanks.
>>
>> Regards,
>>
>> Anthony Liguori
>
> Debian stable (Squeeze) has vte-0.24.3.
> Your patch disables QEMU's GTK gui for that common platform.
>
> Would you mind reducing the VTE version requirement to 0.24.0?
> I see no obvious problems when I change it here for Squeeze.

That confuses me because the docs claim that VtePty was introduced in
0.26.  See:

http://developer.gnome.org/vte/unstable/vte-Vte-PTY.html

Regards,

Anthony Liguori

>
> Regards,
>
> Stefan Weil
Stefan Weil - Feb. 22, 2013, 6:10 p.m.
Am 22.02.2013 18:51, schrieb Anthony Liguori:
> Stefan Weil <sw@weilnetz.de> writes:
>
>> Am 22.02.2013 18:01, schrieb Anthony Liguori:
>>> Applied.  Thanks.
>>>
>>> Regards,
>>>
>>> Anthony Liguori
>> Debian stable (Squeeze) has vte-0.24.3.
>> Your patch disables QEMU's GTK gui for that common platform.
>>
>> Would you mind reducing the VTE version requirement to 0.24.0?
>> I see no obvious problems when I change it here for Squeeze.
> That confuses me because the docs claim that VtePty was introduced in
> 0.26.  See:
>
> http://developer.gnome.org/vte/unstable/vte-Vte-PTY.html
>
> Regards,
>
> Anthony Liguori

That's correct. "No obvious problems" means that VtePty can be
easily avoided by conditional compilation. I'll send a patch which
does this.

Regards,

Stefan Weil
Markus Armbruster - Feb. 22, 2013, 6:12 p.m.
Stefan Weil <sw@weilnetz.de> writes:

> Am 22.02.2013 18:04, schrieb Markus Armbruster:
>> Anthony Liguori <aliguori@us.ibm.com> writes:
>>
>>> Stefan Weil <sw@weilnetz.de> writes:
>>>
>>>> Am 22.02.2013 16:50, schrieb Anthony Liguori:
>>>>> This gives us the bare amount of features we need.  We can add work arounds
>>>>> for older versions and lower the requirement but this should be a good
>>>>> starting point.
>>>>>
>>>>> Suggested-by: Daniel Berrange <berrange@redhat.com>
>>>>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>>>>> ---
>>>>> v1 -> v2
>>>>>  - tremendous simplification suggested by danpb
>>>>> ---
>>>>>  configure | 4 ++--
>>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/configure b/configure
>>>>> index 0dadd31..0eb25dd 100755
>>>>> --- a/configure
>>>>> +++ b/configure
>>>>> @@ -1644,8 +1644,8 @@ fi
>>>>>  # GTK probe
>>>>>  
>>>>>  if test "$gtk" != "no"; then
>>>>> -    if $pkg_config gtk+-2.0 --modversion >/dev/null 2>/dev/null && \
>>>>> -       $pkg_config vte --modversion >/dev/null 2>/dev/null; then
>>>>> +    if $pkg_config --exists 'gtk+-2.0 >= 2.18.0' && \
>>>>> +       $pkg_config --exists 'vte >= 0.26.0'; then
>>>> It's even possible to combine both checks in one :-)
>>>>
>>>> --exists 'gtk+-2.0 >= 2.18.0 vte >= 0.26.0'
>>>>
>>>> But we need a different solution because not all platforms
>>>> support VTE. It must be possible to use GTK without VTE,
>>>> so VTE needs its own section in configure.
>>> As I mentioned eariler, the "other platforms" should start looking at
>>> supporting VTE.
>>>
>>> Rolling our own terminal emulation is not reasonable.
>> Agreed.  There's always VNC, even on "other platforms".
>
> Did I miss something? VNC is not a terminal emulation.

I meant VNC for the guest's screen + suitable character devices for
monitors.  Too terse again, sorry.

[...]

Patch

diff --git a/configure b/configure
index 0dadd31..0eb25dd 100755
--- a/configure
+++ b/configure
@@ -1644,8 +1644,8 @@  fi
 # GTK probe
 
 if test "$gtk" != "no"; then
-    if $pkg_config gtk+-2.0 --modversion >/dev/null 2>/dev/null && \
-       $pkg_config vte --modversion >/dev/null 2>/dev/null; then
+    if $pkg_config --exists 'gtk+-2.0 >= 2.18.0' && \
+       $pkg_config --exists 'vte >= 0.26.0'; then
 	gtk_cflags=`$pkg_config --cflags gtk+-2.0 2>/dev/null`
 	gtk_libs=`$pkg_config --libs gtk+-2.0 2>/dev/null`
 	vte_cflags=`$pkg_config --cflags vte 2>/dev/null`