Could not initialize SDL(No available video device)

Dear all:
I tried to run qemu-kvm from my gnome-terminal after using a non-root account to locally login my XWindow Desktop.
This is what I did in the gnome-terminal:

sudo /usr/bin/qemu-kvm -m 1024 -name f15 -drive file=/home/joe/Images/FreeDOS-1.1-memstick-2-2048M.img,if=virtio -fsdev local,security_model=passthrough,id=fsdev0,path=/tmp -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare

However, after I entered the root password, it gave me the following message --

Could not initialize SDL(No available video device) - exiting

Then I realized one of the root causes was because I cannot [B]sudo[/B] any gui applications under such conditions. For examples:

[B}sudo xterm[/B]
xterm Xt error: Can’t open display: %s
xterm: DISPLAY is not set

The standard soultion is to use gnomesu, xdg-su, and so on.

But in the qemu-kvm case, apparently it does not work out by using such solutions.

Can any one give me any help? 

                Thank you anyway.

Hi
By default sudo isn’t configured, you need to go in and configure as
required with visudoers.

Why not use virt-manager?


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.28-4-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!