[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] qemu curses driver

From: andrzej zaborowski
Subject: [Qemu-devel] qemu curses driver
Date: Sat, 10 Dec 2005 09:17:22 +0100

Hello qemu,
I made this simple curses/ncurses interface for qemu. If anyone is
interested in using it, I attach a patch, relative to CVS version from
some two days ago. I think it is also safe to apply to the CVS, if you
think this is a useful addition (which I think it is). I tried to make
it rather portable, but I've only been able to test it on Linux and
FreeBSD i386 (only ncurses) so I suppose it works on all unix, but I
have no idea how ms windows would deal with it. There's a curses
implementation for windows called PDcurses and it should be fine, but
if the "configure" doesn't detect any curses library on the system, it
will just compile without the curses driver, like if it wasn't there.

About how it works:
It adds a "-curses" command line switch which will suppress the SDL
driver (just like "-nographics"). When qemu is running with "-curses"
it displays everything in the current terminal, be it native console,
linux framebuffer, xterm, or running over ssh, leaving the task of
rendering characters to the terminal. This results in much less speed
overhead compared to the SDL driver (this is important on my slow
machine). This works as long as the virtual graphics adapter is in
text-mode. When it switches to graphics, qemu displays something like
"1024 x 768 Graphics mode" in the middle of the screen, until the
virtual machine goes back to a text-mode. Similarly works the VGA
Blank mode.
The qemu consoles work just like with the SDL interface, except you
switch them with Alt+Number instead of Ctrl+Alt+Number because ncurses
doesn't detect Ctrl and Alt keys together. So usually the virtual
machine screen is at Alt+1, the qemu console at Alt+2, serial console
at Alt+3 and parallel console at Alt+4.
Resizing the terminal (like when resizing the xterm window) is handled
(at least with ncurses, this may not be implemented in other curses
libraries). The virtual machine won't notice any resizing, only thing
that changes is the portion of the screen displayed in the terminal.
Normal text-mode character attributes are handled.
I think these are the most important things to mention.

Tell me if anything needs to be changed in the patch, then I will send
corrected versions. I hope this is useful,
Andrzej Zaborowski
balrog 2oo5

Dear Outlook users: Please remove me from your address books

Attachment: qemu-curses-ui.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]