The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Unable to open a console terminal
Matthias Simon
Guest

Hi,

I am trying to run SDL on a custom embedded platform, but I have problems
with the console. The device runs a custom linux with kernel 2.6.27. It
comes with a framebuffer, so I cross-compiled SDL with fbcon and directfb
support.

If a start via telnet a little test-program, SDL_Init(SDL_INIT_VIDEO)
gives me an "Unable to open a console terminal". Thanks to strace I know
that the reason for this error are several failing ioctls (VT_OPENQRY,
VT_GETSTATE and KDGKBMODE). BTW both drivers (fbcon & directfb) give me
this error.

I also compiled this program for my debian-desktop-machine. If I run it
via ssh, it also returns an "Unable to open a console terminal". That
makes me wonder if it is possible to run SDL applications via ssh.

Kernel has also support for virtual terminal (I think). But my console
links to the uart. Is that the problem?

What am I doing wrong? Do I have to write my own video driver, which omits
keyboard initialisation?

I really could use some guidance from above...

Thanks and Regards,

Matthias
Unable to open a console terminal
Sam Lantinga
Guest

This usually means that your devices are protected and you need to run your
program as root.

On Mon, Jul 20, 2009 at 6:43 AM, Matthias Simon
<matthias.simon at uni-ulm.de>wrote:

Quote:
Hi,

I am trying to run SDL on a custom embedded platform, but I have problems
with the console. The device runs a custom linux with kernel 2.6.27. It
comes with a framebuffer, so I cross-compiled SDL with fbcon and directfb
support.

If a start via telnet a little test-program, SDL_Init(SDL_INIT_VIDEO)
gives me an "Unable to open a console terminal". Thanks to strace I know
that the reason for this error are several failing ioctls (VT_OPENQRY,
VT_GETSTATE and KDGKBMODE). BTW both drivers (fbcon & directfb) give me
this error.

I also compiled this program for my debian-desktop-machine. If I run it
via ssh, it also returns an "Unable to open a console terminal". That
makes me wonder if it is possible to run SDL applications via ssh.

Kernel has also support for virtual terminal (I think). But my console
links to the uart. Is that the problem?

What am I doing wrong? Do I have to write my own video driver, which omits
keyboard initialisation?

I really could use some guidance from above...

Thanks and Regards,

Matthias


















_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




--
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20090720/02027ddc/attachment.htm>
Unable to open a console terminal
Matthias Simon
Guest

Hello again,

I found a solution. There were two different errors:

1) on my local machine I didn't run SDL with uid=0
2) though I had uid=0 on my embedded device and my kernel had virtual
console support, there were no /dev/tty* files.

A very typic layer 8 problem

Thanks & Regards,

Matthias