Background: I am getting a temperature float from an arduino via a serial connection. I need to be able to cache this temperature data every 30 seconds for other applications (e.g. web, thermostat controller) to access and not overload the serial connection. Currently I cache this data to RAM as a file in /ru…
Eclipse 3.8 won’t see gtkmm.h
I’m quite new to C++ and I aspire to learn gtkmm. I’m using linux mint 17.2 and Eclipse 3.8. When I enter:#include <gtkmm.h> the compiler will complain and give this error: I’ve used synaptic and installed libgtkmm-3.0-dev and when I search for the header file locate gtkmm.h I get back…
Get struct socket*, struct sock * from socket descriptor in a C program on Linux
I’m working on a C program on Linux (unprivileged). Is it possible to get a reference to struct socket or struct sock from the socket descriptor? Thank you. Answer If you’re working in user mode (eg. not kernel mode), you cannot directly manipulate kernel structures (including struct sock). If you…
How do you use wget to download most up to date file on a site?
Hello I am trying to use wget to download the most update to day McAfee patch and I am having issues singling out the .tar file. This is what I have: However when I run the above command it gives me: When I need it to just be the most recent.tar file in between the <a> </a> which in this
What happened to USB MTP gadget driver in mainline Linux kernel?
I’m trying to make a embedded device work as a MTP device, using USB gadget driver. I know have Android switched from mass storage gadget to MTP gadget for quite a while, and found the source code for MTP gadget driver in a few Android repositories. However in the mainline kernel code I didn’t fin…
bash loop with GNU less that refreshes every 2 minutes
I have a linux machine with a data folder and a script that produces a report xlsx spreadsheet file on the ever changing content of the folder where it is being run. I use a xlsx2tsv script to convert it to tsv text which takes less than one second. The script takes about 1 minute to produce the spreadsheet f…
Security updates pending even with unattended-upgrades on Debian
I installed a few days ago the unattended-upgrades package to install automatically the security updates on my debian 8 system. I notice when I run : That I have a few security updates pending. What’s wrong with my configuration? Answer You need either /etc/apt/apt.conf.d/20auto-upgrades or /etc/apt/apt…
How to catch new thread in gdb console mode?
I am running my Qt app from gdb, and i want to stop when new threads creates. (when gdb prints message [New Thread address (LPW number)]. I have set breakpoint b __pthread_create_2_1. That allows me to catch most of new threads prints. but i still got few new threads that are not catched. What else can i do t…
SSH into AWS EC2 instance gives Permission denied (publickey)
I created a new EC2 Instance form my AWS Console and tried to ssh using my keyfile I was able to login into the server and did these things : installed httpd. isntalled php. installed mysql. created a new group “web” and added user apache and ec2-user to this group.Changed my default home director…
Difference in behaviour between code executed by a pthread and the main thread in x64-assembly
When writing some x64 assembly, I stumbled upon something weird. A function call works fine when executed on a main thread, but causes a segmentation fault when executed as a pthread. At first I thought I was invalidating the stack, as it only segfaults on the second call, but this does not match with the fac…