After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667396 - enable gvncviewer example binary to connect to unix domain sockets [PATCH]
enable gvncviewer example binary to connect to unix domain sockets [PATCH]
Status: RESOLVED FIXED
Product: gtk-vnc
Classification: Other
Component: general
0.5.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-vnc-maint
gtk-vnc-maint
Depends on:
Blocks:
 
 
Reported: 2012-01-06 07:13 UTC by Daniel Kahn Gillmor
Modified: 2012-07-09 10:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch against 0.5 (2.65 KB, patch)
2012-01-06 07:14 UTC, Daniel Kahn Gillmor
none Details | Review

Description Daniel Kahn Gillmor 2012-01-06 07:13:34 UTC
the examples/gvncviewer.c vnc client is nice and simple, but it appears to be unable to connect to unix domain sockets.

the attached patch (applies to 0.5) should enable it to bind to unix domain sockets, such as those set up by qemu -display vnc=unix:/tmp/whatever

The logic is: test the provided hostname to see if a matching file exists and is a unix-domain socket.  If it is, try to connect to it that way.  otherwise, proceed with argument parsing and TCP sockets as usual.
Comment 1 Daniel Kahn Gillmor 2012-01-06 07:14:22 UTC
Created attachment 204725 [details] [review]
patch against 0.5
Comment 2 Daniel P. Berrange 2012-07-09 10:53:08 UTC
Thanks for providing the patch, however, the use of the native sockets API is somewhat non-portable. So instead, I wrote a patch using GSocketAddress to provide equivalent functionality

commit 078e3cffaab939151aa6afc2df08f7444f6db9ec
Author: Daniel P. Berrange <berrange@redhat.com>
Date:   Mon Jul 9 11:49:20 2012 +0100

    Add support for connecting to GSocketAddress instances
    
    To improve UNIX domain socket support, add the ability to open
    a GSocketAddress instance. Pass the 'hostname' with the addr
    for the purposes of SASL/TLS hostname verification. Also add
    another method for opening a FD which accepts a hostname, again
    for SASL/TLS hostname verification when using a tunnelled
    socket