QEMU error

Programming, for all ages and all languages.
Post Reply
CleverDever
Posts: 3
Joined: Sat Jun 18, 2022 9:35 am

QEMU error

Post 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?
Attachments
Capture.PNG
Capture.PNG (9.6 KiB) Viewed 7523 times
klange
Member
Member
Posts: 679
Joined: Wed Mar 30, 2011 12:31 am
Libera.chat IRC: klange
Discord: klange

Re: QEMU error

Post 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).
CleverDever
Posts: 3
Joined: Sat Jun 18, 2022 9:35 am

Re: QEMU error

Post by CleverDever »

Can you guide me what steps should I follow for my OS to work??
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: QEMU error

Post by Octocontrabass »

Install QEMU in Windows. Don't use QEMU in WSL.
CleverDever
Posts: 3
Joined: Sat Jun 18, 2022 9:35 am

Re: QEMU error

Post by CleverDever »

Thank you for your help guys.It finally worked. :D
Post Reply