# 2 DirectFB problems...I think

## archlyn

First off, I don't know if this is the correct forum for this or not.  If not, I apologize

Now, down to business:

I compiled and installed ZSNES from SVN sources. (ie I didn't use emerge).  Everything went fine there, no problems at all with configure or the compilation.

However, when I start zsnes I see the following:

ZSNES vPre 1.43, (c) 1997-2006, ZSNES Team

Be sure to check http://www.zsnes.com/ for the latest version.

```

ZSNES is written by the ZSNES Team (See AUTHORS.TXT)

ZSNES comes with ABSOLUTELY NO WARRANTY.  This is free software,

and you are welcome to redistribute it under certain conditions;

please read 'LICENSE.TXT' thoroughly before doing so.

Use ZSNES -? for command line definitions.

This is a work in progress build. It contains code which

May or may not be complete

Starting Mouse detection.

ManyMouse: 0 mice detected.

       ---------------------- DirectFB v0.9.24 ---------------------

             (c) 2000-2002  convergence integrated media GmbH

             (c) 2002-2004  convergence GmbH

        -----------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2006-07-20 17:06)

(*) Direct/Memcpy: Using MMXEXT optimized memcpy()

(!) DirectFB/core/vt: Error opening `/dev/tty0'!

    --> Permission denied

(!) DirectFB/Core: Could not initialize 'system' core!

    --> Initialization error!

(!) [ 9683:    0.000] --> Caught signal 11 (at 0x1c, invalid address) 

```

What can I do about it?

-----------

I'm not sure if this is related to the above or not, but I'm posting it here too anyway:

Issue #2:

I have directfb and svgalib in my USE flags.  I emerged links, installation went fine.  I start links with the -g switch and receive no errors but I get no mouse, at all, despite gpm being installed and running.  Also, when I exit links., my screen goes black.  Switching between consoles doesn't help, all of them are black

----------

## Ahri

For the first problem I _think_ you need root priveledges to run, which is why you're getting the 

```
(!) DirectFB/core/vt: Error opening `/dev/tty0'!

    --> Permission denied
```

 error.

Beyond that I'm not sure, I'll be very interested in this thread if someone can help solve the issue(s) though.

EDIT: rather than using root, you're better off adding yourself to the tty group, and then log out/in.

----------

## Ahri

Having added myself to the tty group and tested mplayer with DirectFB, I get the following error: 

```
(!) DirectFB/fbdev/vt: KD_GRAPHICS failed!

    --> Operation not permitted

(!) DirectFB/Core: Could not initialize 'system' core!

    --> Initialization error!

(!) [14286:    0.000] --> Caught signal 11 (at 0x1c, invalid address) <--

Killed

```

----------

## Ahri

After finding http://mail.directfb.org/pipermail/directfb-users/2006-January/001400.html I set mplayer's suid and tried again, and I think it works (I'm testing this remotely from work so I don't know if it's actually playing). Incidentally I know that mplayer can play to the framebuffer without suid set if I use `-vo ggi' -- so how come ggi gets to write to DirectFB but mplayer can't directly?

Surely there's a more ideal solution as I don't really want to make all mplayer/prboom/etc suid root. Yes I know I can use X - that's not the point.

----------

## archlyn

How do you set a program's suid?

I forgot to mention that I'm trying to run ZSNES from an an x terminal  - could this be the problem? If so, how do I make zsnes use something OTHER that DirectFB?

I tried SDL_VIDEODRIVER="x11" and get an error message to the effect of "Could not set resolution" I'll post the exact error ASAP

----------

## Ahri

Well it does tell you at the supplied link... 

```
# sudo chmod 4755 `which mplayer`
```

 should do it if you have sudo set up. Or use 

```
# chmod +s `which mplayer`
```

 as root if you can remember that better than octal privs  :Smile:  Or mix n match  :Wink: 

I too would like to use ZSNES, I'll probably have a muck about later; I'm delving into DirectFB at the moment (posting this from Firefox running in xdirectfb actually) so maybe I'll be able to help. Or not. I wish someone with some expertise would thoroughly explain the cause of the errors we've had and possible fixes.

----------

