Framebuffer and root

Do I need root to run SDL application on framebuffer device?
Why?–
All eyes see the figure of the wizard
As he climbs to the top of the world
No sound, as he falls instead of rising "Stargazer"
Time standing still, then there’s blood on the sand - Ronnie James Dio

  • Jacek Pop?awski on Tue, Nov 13, 2001:

Do I need root to run SDL application on framebuffer device?
Why?

You don’t. Whatever user who runs the application that uses the
framebuffer must have permissions to read and write from the device. Most
distributions have a group set aside to access the framebuffer, in those
cases it’s a simple as adding your user to that group.

mrbrown at alphaflight:~$ ls -laF /dev/fb0*
crw-rw---- 1 root video 29, 0 Sep 19 19:43 /dev/fb0
crw-rw---- 1 root video 29, 1 Sep 19 19:43 /dev/fb0autodetect
crw-rw---- 1 root video 29, 0 Sep 19 19:43 /dev/fb0current

In this case you would add your user to the video group.

M. R.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20011112/58244f81/attachment.pgp

Application refuses to run, becouse:

Couldn’t initialize SDL: Unable to open mouse

When I am root - everything is OK.

How to fix it?On Tue, Nov 13, 2001 at 12:09:55AM -0600, M. R. Brown wrote:

You don’t.


Feel the magic
Feel it dancing in the air
But it’s fear - and you’ll hear "Rainbow In The Dark"
It calling you beware - Ronnie James Dio

  • Jacek Pop?awski on Tue, Nov 13, 2001:

Application refuses to run, becouse:

Couldn’t initialize SDL: Unable to open mouse

The mouse is a separate device. It also has permissions that you must set
properly. If you have GPM already running in the background, SDL will try
and use this for mouse input. Otherwise, you need to set the permissions
for your user so that you can read/write the mouse device. Look for the
permissions on /dev/psaux, or check and see what device file /dev/mouse
(usually a symbolic link) points to.

If you have a PS/2-based mouse, then /dev/psaux is usually your mouse device.
For USB mice, your mouse is usually on /dev/input/mice.

When I am root - everything is OK.

Of course, root has read/write access to anything in the system.

How to fix it?

Set your permissions properly.

M. R.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20011112/c9bcfff5/attachment.pgp