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

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



Very strange that 2 latest Martin’s replies sent 9th of July are not shown on the Google Groups site...

Sorry that I didn’t reply for a while. Thank you Martin for the link to StackExchange question about terminals! It took a while to read the question and replies and links mentioned there. It will require some time to understand everything, but at least I feel myself less confused when someone mentions “terminal”, “console”, “/dev/tty” or “/dev/pts/0” :)

Martin, in one of your previous messages you mentioned “client terminal” and “master terminal”. My knowledge of the subject and terminology is still not very good. What is the difference between them? Google didn’t give me anything useful on the “client terminal vs master terminal” query.

As of membership in the tty group, I checked that my limited user (pi) is member of this group.

I was wondering what is ioctl call with double “VIDIOC_QUERYCAP or VT_OPENQRY” request. It seems I found and answer. VIDIOC_QUERYCAP has a value of 0x80685600 on Raspbian and VT_OPENQRY is 0x5600. I read that in early Linux ioctl request values were 16-bit integers. Lowest 16 bits of VIDIOC_QUERYCAP and VT_OPENQRY match and it seems this why strace shows both constants. After some experiments I understood that actual constant passed to ioctl is VT_OPENQRY. Also my experiments revealed that ioctl VT_OPENQRY result is the same for both root and limited user: it’s the number 2 which I believe designates /dev/tty2. (I should note this result was obtained by running simple python program which just opens /dev/tty0 and performs ioctl on the file descriptor returned; but I think we can assume that behaviour during pygame execution is the same.). This means that the point of divergence between root and limited user resides later in the program execution. More specifically, the question is: why limited-user version of pygame doesn’t try to open /dev/tty2? Does anyone have any suggestion on how to investigate that? I will appreciate any suggestions...