[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] How to prevent mouse initialization in Pygame



What I want to do with my Raspberry Pi: my application will run as a service and I will interact with it via web interface. There will be multimedia projector connected to RPi. Using web interface and pygame-based backend of my application I want to output to the projector some test patterns like grids, colour fillings etc.


суббота, 1 июля 2017 г., 21:26:53 UTC+3 пользователь Jake b написал:
The best SE to post this would probably be stack overflow. There's quite a few pygame questions.

Do you always require sudo to run, or only if using ssh?

 

I attached keyboard (and mouse) and logged in using this keyboard. This was very surprising to me but running my application from this real console doesn’t require sudo to use pygame! Why do I need sudo when running from SSH console?!

The good point is that using framebuffer on Raspbian without root access is possible. Though this point can be not so good after taking into account Ian’s words about random user hijacking already running graphical session, because this random user could be attacker that managed to get limited user access.

There is the second observation. If I run my pygame-using script as a service via systemd under limited user, I get the usual “unable to open a console terminal” exception (tried with and without mouse and keyboard attached). If I run my pygame-using script as a service via systemd under root, the service just exits unexpectedly! In /var/log/syslog there is no exception or any other useful information about cause of service exiting, it seems like some sort of crash. Very mysterious...