Skip to contentSkip to conversation

Qemu on Windows: Redirect output to console

Qemu-devel Peter Laursen 2 participants 2 messages Jun 25, 2007

lore
Share & tools
lore
#0 lore raw

Hi everyone,

Thanks for your replies, they have been of great help. I still havenøt solved the basic problem of redirecting the output to a console, mostly because -nographic does not work on Windows ports of Qemu...

There already are Linux operating systems that ship with screen readers that read the graphic desktops built in, so I would only want to run text-based operating systems (FreeBSD, for example - I've heard that is almost pure command line and I'd like to check it out if possible. I know tha Debian is)

Sadly, I couldn't get the -serial option to work either - here's the command line that I used to start qemu with:

qemu.exe -L . -m 128 -hda linux.img -soundhw all -localtime -M isapc - serial tcp:127.0.0.1:5555,server -nographic

that should, in theory, allow me to get the output into a telnet client?

I hadn't thought about piping Festival on a Windows box - but I'd like to see if I can get this to work first before I try that.

Any other suggestions or anything else I could try?

I look forward to hearing from you and thank you very much for your help.

Best regards,

Peter.

Quoted 11 lines

Hi Peter,

there already exists a QEMU command line option -nographic which disables graphical output and redirects the first serial port of the emulated machine to the console.

With QEMU running Linux in text mode, this works fine - you will "see" the boot messages and can run a shell or any text application from the console, so it should be possible to analyse this output with a screen reader.

Quoted 7 lines

QEMU can also redirect any serial port to pipes, so some speech synthesizer like "festival" could be connected directly.

This URL describes the command line options -serial and -nographic:
http://fabrice.bellard.free.fr/qemu/qemu-doc.html#TOC10

I have no idea how you can access graphical interfaces like MS

Windows.

Quoted 7 lines

Stefan

Quoted 3 lines · Peter Laursen

Hi everyone,

I have downloaded the 0.9.0 version of the Qemu source code and

managed

Quoted 4 lines
Quoted 4 lines

to compile it using MinGW and MSYS. But I face a problem with the compiled binary.

I am blind and therefore need to redirect the output from the guest

OS

Quoted 1 line
Quoted 1 line

to a standard Windows console or a software speech synthesizer so

that

Quoted 8 lines
Quoted 8 lines

a screen reader will be able to read the output produced. What functions will I eventually need to modify? A text console would of course be preferred.
My main reason for hoping to getting this to work is to allow blind people to experiment safely with other operating systems - it would also minimize the learning curve.

I hope that you will be able to point me in the right directions as

to

Quoted 2 lines
Quoted 2 lines

which source files and functions I would need to change. I have searched through the source files and googled for documentation for

the

Quoted 2 lines
Quoted 2 lines

source code, but I didn't find any. I also searched to see if there were any patches that might accomplish the work - I was unable to

find

Quoted 10 lines
Quoted 5 lines

any.

I look forward to hearing from you.

Peter.

#1 lore raw

Hi,

Quoted 11 lines · Peter Laursen

Hi everyone,

Thanks for your replies, they have been of great help. I still havenøt solved the basic problem of redirecting the output to a console, mostly because -nographic does not work on Windows ports of Qemu...

There already are Linux operating systems that ship with screen readers that read the graphic desktops built in, so I would only want to run text-based operating systems (FreeBSD, for example - I've heard that is almost pure command line and I'd like to check it out if possible. I know tha Debian is)

That's not true, FreeBSD as well as all Linux flavours are unix clones and they can run all the same software, including the GNOME and KDE environments, as well as all the command line world. Debian's installer is text based and FreeBSD's installer is text based but the rest depends on whatever you configured in the installer.

Quoted 6 lines

Sadly, I couldn't get the -serial option to work either - here's the command line that I used to start qemu with:

qemu.exe -L . -m 128 -hda linux.img -soundhw all -localtime -M isapc - serial tcp:127.0.0.1:5555,server -nographic

In addition to that you need to tell Linux to actually run a console on the serial port instead of on the video card. This can be done in the bootloader by appending "console=ttyS0" to kernel parameters, but there's unfortunately no way to interact with the bootloader without a video adapter because bootloaders are configured that way on most distributions. Assuming you have a sound enabled SSH client you could SSH into the linux guest and interact with it that way, from there you can reconfigure the system to make a serial console.

Unrelated to that, there's a patch for QEMU that adds an curses based interface similar to the one that the bochs emulator has. I imagine it can be a hell to set up on ms windows, if at all possible, but it eliminates the use serial ports, it lets you interact with the bootloader and no reconfiguration is needed.

Have you tried distributions like Oralux, BLINUX or Free(b)soft? I know Free(b)soft is all command line based (or actually emacs based) and sound enabled at the same time, by employing festival if no hardware sythesiser or braille tty (brltty) is found.

I still think SSH is the most universal way to interact with any system and lets you experience all the non-graphical parts of the OS, including Debian installer or FreeBSD installer.

Regards,