Tuesday, July 28, 2015

Linux, not chmod, groups!

In english

I was reviewing my logs, and I was surprised to see that every week, hundreds of people were going to this page (even though it was posted well over 2 years ago):
http://raspberry-python.blogspot.com/2012/09/pas-chmod-groupes.html

This is great if you can read french, but if not... here's a translation.

Groups

The use of chmod to resolve permission issues appear on a regular basis on forums and in tutorials for Linux.

This is quite a risky proposition, particularly if you are very permissive (chmod 777 !!)

Or another option I've seen is to simply use sudo.

By simply mastering one thing, most of the time you can make this problem go away: using groups.

For example, if we have something like this:

fdion@raspberrypi ~ $ ls -al /dev/fb0
crw-rw---- 1 root video 29, 0 Dec 31 1969 /dev/fb0

Permissions on this file are defined as:
c, owner (root): read write, no exec, group (video): read write, no exec, and for everybody else, no access.

If I would like for my python script under my fdion account, or really any program that I run, to read and write the framebuffer (any program using the SDL would be a candidate), I only need to do:

usermod -a -G video fdion  and in this way I added fdion to the video group.

That is it. While on the topic of SDL, I would recommend doing at a minimum:

sudo usermod -a -G video fdion
sudo usermod -a -G audio fdion
sudo usermod -a -G input fdion

This way you'll be able to use the video, audio, mouse etc.

Francois Dion
@f_dion

Monday, July 20, 2015

RetroTech Tuesdays

“Saving history, one tech gadget at a time”


RetroTech is akin to computer clubs from the early days of computing, such as the one where Steve Wozniak drug Steve Jobs to see his computer kit, later known as the Apple I.

But we are interested in all aspects of retro technologies, not just computers. Handheld games, music gear,  arcade machines, calculators, media, hifi, consoles, cartridges, cameras etc sharing one thing in common: they are definitely out of warranty!

We want to exchange techniques to repair, restore, maintain and preserve these otherwise disposable items that have shaped our past, present, and will continue to shape our future. Feel free to bring something for a “show and tell”. We also talk about simulation and emulation of older technology.

Come and join us around the TV in the Innovation Lounge (1st floor, where the foosball tables are), Tuesday the 21st at noon. A freshly restored Apple //c will be there, along with a miniature functional model (based on a Raspberry Pi and some Python code).


Outside the walls


The above is a typical communication sent every other week internally at Inmar. But I'd like to open this to the community. Perhaps rotating the meet to local schools and businesses. At least in the WFIQ, but ideally around downtown Winston Salem.

Francois Dion
@f_dion

Sunday, July 19, 2015

Why I started PYPTUG

The mission page


So it would be easier for people to find it, I've made that blog post a separate page on PYPTUG.ORG:

http://www.pyptug.org/p/python-piedmont-triad-user-group.html

In short


Listed on that page is the goal. I like to go back and read it from time to time to make sure i'm still aligned with that goal:

Our goal is to promote and advance computing, electronics and science in general in North Carolina using the Python programming language, and through workshops and project nights where people can learn, get help and mentor others. A secondary goal is to make you, the artist, the engineer, the investor, the manager, the programmer, the scientist, the teacher, better at your job.

The above link also talks about why Python was chosen. It made a ton of sense some years ago, and it makes as much sense now. Good.

Francois Dion
@f_dion