User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: SDL only usable by root?

Sun Apr 22, 2012 2:22 pm

An interesting thing I've noticed is that only root (sudo) can run anything that needs to access sdl on the debian distro.  Does anyone know what that is?
Dear forum: Play nice ;-)

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: SDL only usable by root?

Sun Apr 22, 2012 2:40 pm

Abishur said:


An interesting thing I've noticed is that only root (sudo) can run anything that needs to access sdl on the debian distro.  Does anyone know what that is?



Did you add a new user? If so, then add it into the video group in /etc/group.

(or sudo chmod 666 /dev/fb0 but that'll only work until the next reboot)

Gordon
--
Gordons projects: https://projects.drogon.net/

shirro
Posts: 248
Joined: Tue Jan 24, 2012 4:54 am

Re: SDL only usable by root?

Sun Apr 22, 2012 2:43 pm

Check the permissions on /dev/fb0

I don't know if it has been changed but if group is rw and the group is video you just need to add yourself to the video group with sudo adduser yourusername video

shirro
Posts: 248
Joined: Tue Jan 24, 2012 4:54 am

Re: SDL only usable by root?

Sun Apr 22, 2012 2:45 pm

And you might want to add yourself to the audio group as well.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: SDL only usable by root?

Mon Apr 23, 2012 4:58 am

ah, no I was just trying to run it as the user pi without elevated privileges I'll try to remember to check and see if they're in the video group
Dear forum: Play nice ;-)

jmacey
Posts: 135
Joined: Thu May 31, 2012 1:05 pm

Re: SDL only usable by root?

Tue Sep 25, 2012 7:20 am

I just came across this thread when I ran into the same error, you need to add the user to the video and input groups to run without x (and audio if you later need that).

I've added a section on my blog as I'm doing an introduction to SDL http://jonmacey.blogspot.co.uk/2012/09/ ... art-1.html

Return to “Troubleshooting”