summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-session-vnc.c
Commit message (Collapse)AuthorAgeFilesLines
* VNC session: emit session-cancelled signalJonathon Jongsma2015-06-191-0/+1
| | | | | | When the user cancells an authentication dialog (e.g. by pressing 'Esc', emit the session-cancelled signal to be consistent with the spice session implementation.
* Rename session-auth-failed to session-auth-unsupportedJonathon Jongsma2015-06-191-1/+1
| | | | | | | | Now that VNC and Spice both return the same signal on normal authentication failures ('session-auth-refused'), the 'session-auth-failed' signal is too confusingly similar. Rename it to -unsupported to make it obvious that it's a different type of (unrecoverable) error.
* session-vnc: Set window for display to avoid gtk-vnc v0.3.8 crashPavel Grunt2015-05-211-0/+5
| | | | | | | The VNC display widget of gtk-vnc v0.3.8 needs a window at the moment it is initialized otherwise it would crash. Resolves: rhbz#1196517
* Prefill the username in the authentication dialogFabiano Fidêncio2014-10-101-3/+7
| | | | | Lets prefill the username entry using the user name of the current user.
* VirtViewerDisplayVnc: set 'session' propertyJonathon Jongsma2014-09-241-2/+2
| | | | | | Set the display's session property in the constructor. If the session is not set, then virt_viewer_display_get_session() doesn't return anything useful.
* Change collect_credentials() to return a booleanJonathon Jongsma2014-08-261-5/+5
| | | | | | Instead of returning 0 for success and -1 for failure, change to a boolean success value to be more consistent with the rest of the virt-viewer code.
* app: report disconnection error detailsMarc-André Lureau2014-07-081-1/+1
| | | | | | It may be useful to provide more detailed reason for disconnection. https://bugzilla.redhat.com/show_bug.cgi?id=1115986
* Replace DEBUG_LOG with g_debugMarc-André Lureau2014-06-101-8/+8
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1107518
* Don't set VNC display to ready until vnc is initializedJonathon Jongsma2014-02-131-2/+0
| | | | | | | We were setting the show_hint to READY as soon as we got the vnc-connected signal. But there may be an authentication step between vnc-connected and vnc-initialized. In this case, we switch to an empty black display during the authentication step instead of showing the 'waiting for display N' status.
* Move vnc-specific auth logic to VirtViewerSessionVncJonathon Jongsma2014-02-131-6/+86
|
* vnc: Clear all displays before creating dummy displayChristophe Fergeau2013-10-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If VirtViewerSessionVnc::disconnected is called because of an authentication failure, we get: (remote-viewer:29588): gtk-vnc-DEBUG: vncdisplay.c Disconnected from VNC server (remote-viewer:29588): Gtk-WARNING **: Attempting to add a widget with type VncDisplay to a container of type VirtViewerDisplayVnc, but the widget is already inside a container of type VirtViewerDisplayVnc, please use gtk_widget_reparent() #0 0x0000003136e50499 in g_logv (log_domain=0x3f2e13e143 "Gtk", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffd210) at gmessages.c:989 #1 0x0000003136e505ef in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at gmessages.c:1025 #2 0x00000000004230eb in virt_viewer_display_vnc_new (vnc=0x8a8250) at virt-viewer-display-vnc.c:169 #3 0x0000000000422191 in virt_viewer_session_vnc_disconnected (vnc=0x8a8250, session=0x86bf00) at virt-viewer-session-vnc.c:113 #4 0x00000031372104c7 in _g_closure_invoke_va (closure=closure@entry=0x8ad2b0, return_value=return_value@entry=0x0, instance=instance@entry=0x8a8250, args=args@entry=0x7fffffffd530, n_params=0, param_types=0x0) at gclosure.c:840 #5 0x0000003137229749 in g_signal_emit_valist (instance=0x8a8250, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd530) at gsignal.c:3238 #6 0x000000313722a3af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3386 #7 0x00007ffff7dbeb5a in on_disconnected (conn=0x8b5aa0, opaque=0x8a8250) at vncdisplay.c:1563 #8 0x00000031372104c7 in _g_closure_invoke_va (closure=closure@entry=0x7d55f0, return_value=return_value@entry=0x0, instance=instance@entry=0x8b5aa0, args=args@entry=0x7fffffffd820, n_params=0, param_types=0x0) at gclosure.c:840 #9 0x0000003137229749 in g_signal_emit_valist (instance=0x8b5aa0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd820) at gsignal.c:3238 #10 0x000000313722a3af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3386 #11 0x00007ffff7b97308 in do_vnc_connection_emit_main_context (opaque=0x7fffe3c91f40) at vncconnection.c:578 #12 0x0000003136e49256 in g_main_dispatch (context=0x681840) at gmain.c:3065 #13 g_main_context_dispatch (context=context@entry=0x681840) at gmain.c:3641 #14 0x0000003136e495d8 in g_main_context_iterate (context=0x681840, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3712 #15 0x0000003136e499ea in g_main_loop_run (loop=0x830430) at gmain.c:3906 #16 0x0000003f2dfa8f75 in gtk_main () at gtkmain.c:1158 #17 0x0000000000429bf3 in main (argc=1, argv=0x7fffffffdcd8) at remote-viewer-main.c:179 This commit calls virt_viewer_session_clear_displays() before creating a dummy VNC display with virt_viewer_display_vnc_new(), which avoids this warning.
* file: add version field, raise an error if incompatibilyMarc-André Lureau2013-03-081-1/+2
| | | | | | The virt-viewer connection file can now have a version=0.5 field. If the virt-viewer version opening the connection doesn't provide at least that version, an error is raised with the version required.
* Allow app_initial_connect() to raise an errorMarc-André Lureau2013-03-081-2/+3
|
* vnc: add connection by fileMarc-André Lureau2013-01-181-18/+32
| | | | | | | | | | | | | | | Learn to connect to a VNC server with the connection details file, ex: [virt-viewer] type=vnc host=localhost port=2356 password=foobar v2: - add username/password support https://bugzilla.redhat.com/show_bug.cgi?id=843410
* session: add virt_viewer_session_mime_type()Marc-André Lureau2012-11-271-0/+6
|
* vnc: when session is disconnected, make the display as non-readyMarc-André Lureau2012-07-231-3/+3
|
* Simplify display flag handlingMarc-André Lureau2012-07-231-1/+1
|
* Add support for raw IPv6 addresses in VNC & libvirt URIsDaniel P. Berrange2012-04-231-1/+16
| | | | | | Support vnc://[x:y:z:]:5901/ for raw IPv6 addresses in URIs, and qemu+ssh://root@[x:y:x:]:22/ for raw IPv6 addresses in libvirt URIs
* Fix close of VNC displaysDaniel P. Berrange2012-04-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When clicking the close button on a virt-viewer window with a VNC session open, while the VNC session terminates, the window does not go away. The problem is that the virt_viewer_session_vnc_disconnected method never gets invoked. The close button triggers a call to virt_viewer_session_clear_displays which unrefs the VirtViewerDisplayVnc instance. This in turn triggers a call to gtk_container_destroy, which destroys all widgets it contains, ie the VncDisplay * object. With the VncDisplay object in its dispose phase, no signals will ever be emitted, thus the 'vnc-disconnected' signal never gets seen. The design issue is that VirtViewerDisplayVnc is assuming it owns the VncDisplay, whereas in fact the real owner is the VirtViewerSessionVnc object. The solution is to introduce a new virt_viewer_display_close method which can be used to de-parent the widget before VirtViewerDisplay is unref'd. The VirtViewerSessionVnc object also needs to hold a full ref on the VncDisplay object, not merely a floating reference * virt-viewer-display-spice.c, virt-viewer-display.c, virt-viewer-display.h: Add virt_viewer_display_close * virt-viewer-display-vnc.c: Deparent VNC widget in virt_viewer_display_close impl * virt-viewer-session-vnc.c: Improve logging * virt-viewer-session.c: Call virt_viewer_display_close before unrefing display * virt-viewer-window.c: Improve logging Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Extract tlsPort for SPICE and use it to enable secure connectionsDaniel P. Berrange2012-02-141-9/+10
|
* Ensure auth popup windows have correct transient parentDaniel P. Berrange2012-02-081-3/+22
|
* Add config.h to every source fileDaniel P. Berrange2012-02-061-0/+2
|
* Update copyright headersDaniel P. Berrange2012-02-061-2/+2
|
* Convert TABS to spaces & reindent everywhereDaniel P. Berrange2012-02-061-127/+124
|
* Tune the first argument in calls to g_type_class_add_private()Guannan Ren2012-01-311-1/+1
|
* Make VNC support opening connections based on URIDaniel P. Berrange2012-01-311-0/+26
|
* Show display and rise its window when we have the display show hintMarc-André Lureau2011-07-261-0/+5
| | | | Track event for Spice, and imitate it for VNC.
* Split pull part of VirtViewerDisplay out into VirtViewerSessionDaniel P. Berrange2011-07-111-0/+254
To facilitate introduction of multi-head support, pull some of the VirtViewerDisplay class out into a new VirtViewerSession class.