Does SDL require root access to read controls?

Hi Guys,

I’ve sort fo inherited the support of a public domain glue layer
to SDL for a Java cross-platform controler library.

I’ve built it under SUSE9.1 and m ytests run fine if Im root.
If Im not logged inas root though the ets reports that it
finds no input devices.

Do you really have to be root to run SDL based Linux apps or do I just need
to configure my non-root user differently somehow?

Thanks

JK

Hey Jeff, you may want to read John Hall’s “Programming Linux Games”:

http://www.nostarch.com/frameset.php?startat=plg

You might be able to get it from your local library, or buy a fairly
cheap used copy on the intarnet. The book itself deals with, as the
tittle suggests, games on the GNU/Linux platform. However it also goes
into details on the underworkings of SDL such as why SDL does not
requre super user privileges to acces system hardware (eg: video,
input devices, etc…).

There’s also the SDL documentation wiki, as far as I know it does not
going to alot of details there only explanation of functions and
variable.

Anyhow good luck, and I hope that you’ll enjoy using SDL.On 4/27/05, Jeff Kesselman <jeffrey.kesselman at sun.com> wrote:

Do you really have to be root to run SDL based Linux apps or do I just need
to configure my non-root user differently somehow?

Jack Doe wrote:

Hey Jeff, you may want to read John Hall’s “Programming Linux Games”:

http://www.nostarch.com/frameset.php?startat=plg

You might be able to get it from your local library, or buy a fairly
cheap used copy on the intarnet. The book itself deals with, as the
tittle suggests, games on the GNU/Linux platform. However it also goes
into details on the underworkings of SDL such as why SDL does not
requre super user privileges to acces system hardware (eg: video,
input devices, etc…).

That book was released as a PDF by no starch some time ago. google for it.

There’s also the SDL documentation wiki, as far as I know it does not
going to alot of details there only explanation of functions and
variable.

Anyhow good luck, and I hope that you’ll enjoy using SDL.

Do you really have to be root to run SDL based Linux apps or do I just need
to configure my non-root user differently somehow?

You probably need access to the devices in /dev/input/> On 4/27/05, Jeff Kesselman <jeffrey.kesselman at sun.com> wrote:

That book was released as a PDF by no starch some time ago. google for it.

But please buy it if you can find a copy; I’m sure John would appreciate
your money as much as your recommendation. :slight_smile:

–ryan.

Mikael Eriksson <miffe-miffe telia.com> writes:

You probably need access to the devices in /dev/input/

That was it! Thank you guys!

The code is the Linux plugin for the JInput API at www.javagaming.org
I notice that there ia a source forge project to do full Java bindings for
SDL. I might at some point re-write the plug-in to use those but right now
its working fine again :slight_smile:

I think ill put a note in the readme that the user needs access to /dev/input

Oh and thanks for the recommendation, I can always use another good game
programming book. I’ll check Amazon for it. if they don’t have it, Do you guys
know an online vendor that does?

NerdBooks.com appears to have at least one copy:

http://www.nerdbooks.com/item.php?id=1886411492

-bill!On Fri, Apr 29, 2005 at 04:26:12AM +0000, Jeff Kesselman wrote:

Oh and thanks for the recommendation, I can always use another good game
programming book. I’ll check Amazon for it. if they don’t have it, Do you guys
know an online vendor that does?