Page 1 of 1

QEMU error

Posted: Sat Jun 18, 2022 9:45 am
by CleverDever
Hello, I am new to this forum and trying to develop a sample OS from this article https://wiki.osdev.org/Bare_Bones.
I have followed every step of this article, from making a cross-compiler to making an ISO file using grub. I want to test my OS using qemu but whenever I try to run it it gives me the following error.
Unable to init server: Could not connect: Connection refused
gtk initialization failed.

Can anyone help me with this issue?

Re: QEMU error

Posted: Sun Jun 19, 2022 5:17 pm
by klange
It looks like you're using WSL. QEMU is a graphical application, so you'll need to make sure your WSL environment is set up with support for that - either by running an X server, or with WSLg, or something similar.

Alternatively, QEMU has native Windows builds, which may be a better option as it's available with support for hardware virtualization that can be troublesome to setup with nesting within WSL (since WSL is, itself, using hardware virtualization to run Linux).

Re: QEMU error

Posted: Mon Jun 20, 2022 1:01 am
by CleverDever
Can you guide me what steps should I follow for my OS to work??

Re: QEMU error

Posted: Mon Jun 20, 2022 2:43 pm
by Octocontrabass
Install QEMU in Windows. Don't use QEMU in WSL.

Re: QEMU error

Posted: Tue Jun 21, 2022 11:52 am
by CleverDever
Thank you for your help guys.It finally worked. :D