I want to write a program that changes the behavior of mouse when certain key is pressed. But I am not quite familiar with event mechanisms in linux. My guess is that I need to filter through the “event queue” looking for “key press” and “mouse press” events, and somehow mo…
Tag: linux
linux grep match a subset of files from a previous match
I am needing pipe this result: to another grep: ie. “files that extend Some_Critical_Class that also have function init()” If there is a way to do it in one operation in grep, that would be great, but I’d also like to see the how the piping is done to improve my programming in *nix (which is…
How to generate an exectutable file with netbeans 8.2 in linux
I installed NetBeans 8.2 (but the same is for any version of NetBeans C/C++) in a linux OS (Linux Mint Ulyssa, which based to what i know is ubuntu core. I can run successfully with the expected result a project (simple “hello world”) but can’t in the build folder of the project i can’…
Why cannot I read data from a serial port?
I have faced the following problem: I wish to read data comming to my serial port on linux. Data are send from an external device with standard serial settings. I’m sure that the external device sends them, that has been already checked. However, on linux all i can read is an empty byte. What am I setti…
Is it possible for someone log into MongoDB without the correct password if authentication is enabled?
I recently setup my first MongoDB database in an production environment. I looked up some guides for deployment and followed them. I had the following in my config: And I created an admin user (the only user) that looks like this: I also switched the outward facing port for the database (through nginx) to a n…
Calling gimp_image_convert_indexed with a custom palette, palette cant be found
I am making a script to limit any image into 3 colors (to be used in a program to display to an e-ink display). I want to do this using GIMP’s gimp_image_convert_indexed function bc Wand and PIP’s .quantize don’t work how I want them to and don’t look as good. This is on a headless ras…
How to resume interrupted download of specific part of file automatically in curl?
I’m working with curl in Linux. I’m downloading a part of a file from Media-fire using bad internet connection , the download always stops after few minutes and when i use the parameter -C – instead of continue downloading only the part of a file i mentioned from where the download stopped ,…
Can not achieve real time SCHED_FIFO thread within process
Good day everyone ! I am trying to get a 2nd thread (the serial thread) to run as near real time as possible. Within my 2nd spawned serial thread I select() with timeout of 3 mS on a serial port. I also get real time before select() … and then after to get select() delta time. Problem is that sometimes
Invoke-WebRequest Always Fails For HTTPS. The remote certificate is invalid according to the validation procedure
I’m trying to use Invoke-WebRequest inside of pwsh (on Linux), but it’s always failing. Here’s an example: The site/URL doesn’t matter, if it’s using HTTPS I’ll get the error. The exact same script on a Windows machine works without issue. $PSVersionTable dotnet –vers…
test case to make os.getuid() and os.geteuid() return different results
I got the same uid and euid even though the file belongs to root and has the suid bit set. Does anybody know how to make a test case to let getuid() and geteuid() return different results? Thanks. EDIT: I tried a C program. uid and euid are still the same. Answer Typo! should read Then the C program will