qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Leicher <leicher@cs.uni-frankfurt.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] patch to change window title in qemu vnc
Date: Sat, 04 Oct 2008 17:10:57 +0200	[thread overview]
Message-ID: <48E78781.9040300@cs.uni-frankfurt.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

Hi,

enclosed you find a patch, that changes the window title as seen by VNC 
clients connecting to qemu vnc-sessions from "QEMU" to "QEMU VNC:" 
followed by the displaynumber you specified with the command line 
parameter -vnc :0.

This comes in very handy in case you have different qemu instances 
running on a remote host, and you access them via vnc, as the client's 
window title gives you a hint to which virtual machine you are connected 
right now.

Regards, Andreas

[-- Attachment #2: qemu-vnc.patch --]
[-- Type: text/plain, Size: 737 bytes --]

*** vnc.c	2008-01-06 20:38:42.000000000 +0100
--- vnc.c	2008-10-02 16:42:06.000000000 +0200
***************
*** 1305,1313 ****
      vnc_write(vs, pad, 3);           /* padding */
  
      if (qemu_name)
!         size = snprintf(buf, sizeof(buf), "QEMU (%s)", qemu_name);
      else
!         size = snprintf(buf, sizeof(buf), "QEMU");
  
      vnc_write_u32(vs, size);
      vnc_write(vs, buf, size);
--- 1305,1313 ----
      vnc_write(vs, pad, 3);           /* padding */
  
      if (qemu_name)
!         size = snprintf(buf, sizeof(buf), "QEMU (%s) VNC%s", qemu_name, vs->display);
      else
!         size = snprintf(buf, sizeof(buf), "QEMU VNC%s",  vs->display);
  
      vnc_write_u32(vs, size);
      vnc_write(vs, buf, size);

             reply	other threads:[~2008-10-04 15:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-04 15:10 Andreas Leicher [this message]
2008-10-04 22:24 ` [Qemu-devel] patch to change window title in qemu vnc Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48E78781.9040300@cs.uni-frankfurt.de \
    --to=leicher@cs.uni-frankfurt.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).