# Could not initialize SDL(No available video device)

**URL:** <https://forums.suse.com/t/could-not-initialize-sdl-no-available-video-device/26549>\
**Category:** SLED Applications\
**Created:** [January 10, 2015, 1:31am UTC](https://forums.suse.com/t/could-not-initialize-sdl-no-available-video-device/26549 "2015-01-10T01:31:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nagual\_sorcerer07](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@nagual\_sorcerer07](https://forums.suse.com/u/nagual_sorcerer07)\
**Post date:** [January 10, 2015, 1:31am UTC](https://forums.suse.com/t/could-not-initialize-sdl-no-available-video-device/26549/1 "2015-01-10T01:31:10Z")

</div>

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.
```

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [January 10, 2015, 2:14am UTC](https://forums.suse.com/t/could-not-initialize-sdl-no-available-video-device/26549/2 "2015-01-10T02:14:31Z")

</div>

> [@](#):
>
> On Fri 09 Jan 2015 11:34:01 PM CST, nagual sorcerer07 wrote:
> 
> 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 _sudo_  
> 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!
