r/linux_programming • • Oct 20 '17

How Task Familiarity Affects Software Estimates

Thumbnail
chrismm.com
6 Upvotes

r/linux_programming • • May 23 '17

Java Tutorial on Linux

Thumbnail
youtube.com
6 Upvotes

r/linux_programming • • Mar 14 '17

I want to learn to code in linux, any advice?

Thumbnail
google.com
6 Upvotes

r/linux_programming • • Feb 01 '17

Learn LCD and LXC Linux Containers

Thumbnail
youtu.be
6 Upvotes

r/linux_programming • • Oct 31 '16

Finding bugs in the code of LLVM project with the help of PVS-Studio

Thumbnail
viva64.com
6 Upvotes

r/linux_programming • • Oct 10 '16

Working with Firewalld

Thumbnail
hostpresto.com
6 Upvotes

r/linux_programming • • Jul 08 '16

Decoding and playing audio file in Linux

Thumbnail enise.org
6 Upvotes

r/linux_programming • • Oct 25 '15

The kernel connection multiplexer

Thumbnail
lwn.net
6 Upvotes

r/linux_programming • • Aug 30 '15

release GDB 7.10 released! Improvements for scripting, shared libraries on remote targets. Reverse debugging support on ARM64. Support for dtrace probes.

Thumbnail sourceware.org
6 Upvotes

r/linux_programming • • Aug 15 '15

release The GNU C Library version 2.22 is now available

Thumbnail sourceware.org
6 Upvotes

r/linux_programming • • Feb 07 '15

release The GNU C Library version 2.21 is now available

Thumbnail sourceware.org
6 Upvotes

r/linux_programming • • Oct 28 '14

Why Are My Page_faults So High in Perf?

Thumbnail sdf.org
6 Upvotes

r/linux_programming • • Aug 21 '14

Ftrace: The hidden light switch

Thumbnail
lwn.net
6 Upvotes

r/linux_programming • • Feb 21 '14

Systemd programming part 2: activation and language issues

Thumbnail
lwn.net
6 Upvotes

r/linux_programming • • Mar 02 '26

How many options for building an IME?

5 Upvotes

IME (Input Method Editor) in Linux is built on ibus framework if I recall correctly. However, my IME got few troubles with Wayland. So I plan to build one for my own and wondering if there are any alternative option that is more friendly to Wayland?


r/linux_programming • • Feb 04 '26

Any project ideas using ESP32, Arduino, or Raspberry Pi 5?

5 Upvotes

At my school, they're asking me to do a project about systems and technology-related things.

We actually had one about a light that turns on and off with a clap. We did it just to get it over with.

(Nothing advanced).

But now we need something that's really amazing but "simple." We don't have that advanced knowledge. We know programming, but very basic programming.

We know how to use basic-to-intermediate Linux and we know basic technology and networking fundamentals.


r/linux_programming • • Nov 24 '25

I wrote a kernel memory allocator in the userspace based on the original slab allocator paper

Thumbnail
github.com
5 Upvotes

objcache is an object caching slab memory allocator that is based on the original paper by Jeff Bonwick. I have tried to implement some of the interesting ideas shared in the paper. This is my learning project and would really appreciate your feedback and review. Thanks!


r/linux_programming • • May 26 '25

Want to write a webcam driver: no background with kernel, some C / C++, no deadline

Thumbnail reddit.com
5 Upvotes

r/linux_programming • • Apr 17 '25

How would someone go about creating a clipboard manager

5 Upvotes

I am trying to make a clipboard manager in C. It is for an OS course project. I have used C language, but this is the first time I would be making this kind of thing. Can anyone maybe point to the relevant information as to where I should get started with this and like give me a sort of roadmap?


r/linux_programming • • Feb 24 '25

LD_PRELOAD Hook only logging a few commands on Ubuntu 20.04.3 LTS

5 Upvotes

I have written this following code:

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <dlfcn.h>
#include <time.h>

// Log file location
#define LOG_FILE "/home/maifee/cmd-log.log"

// Function to get the process name
void get_process_name(pid_t pid, char *name, size_t len) {
    char path[256];
    snprintf(path, sizeof(path), "/proc/%d/comm", pid);
    FILE *file = fopen(path, "r");
    if (file) {
        fgets(name, len, file);
        name[strcspn(name, "\n")] = 0; // Remove newline character
        fclose(file);
    } else {
        strncpy(name, "unknown", len);
    }
}

// Override execve
int execve(const char *filename, char *const argv[], char *const envp[]) {
    // Get the original execve function
    int (*original_execve)(const char *, char *const[], char *const[]) = dlsym(RTLD_NEXT, "execve");

    // Log the command to a file
    FILE *log_file = fopen(LOG_FILE, "a");
    if (log_file) {
        pid_t pid = getpid();
        pid_t ppid = getppid();
        char pname[256], ppname[256];
        get_process_name(pid, pname, sizeof(pname));
        get_process_name(ppid, ppname, sizeof(ppname));
        // print time [2025.12.30 23:59:59]
        time_t t = time(NULL);
        struct tm tm = *localtime(&t);
        fprintf(log_file, "[%d.%d.%d %d:%d:%d] ", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
        fprintf(log_file, "PID: %d (%s), PPID: %d (%s), Command: ", pid, pname, ppid, ppname);
        for (int i = 0; argv[i]; i++) {
            fprintf(log_file, "%s ", argv[i]);
        }
        fprintf(log_file, "\n");
        fclose(log_file);
    }

    // NEVER call execve directly, it will cause an infinite loop
    // NEVER remove this line
    return original_execve(filename, argv, envp);
}

And I compile it using the following command:

gcc -shared -fPIC -o ld_preload_hook.so ld_preload_hook.c -ldl

And then I set the LD_PRELOAD environment variable to the path of the shared object file:

export LD_PRELOAD=$PWD/ld_preload_hook.so

And then I reload the shell:

source ~/.zshrc
source ~/.bashrc

And it generates the log file, which is great. But the issue is it just generate these few specific commands:

[2025.2.25 1:30:43] PID: 8062 (lesspipe), PPID: 8061 (lesspipe), Command: basename /usr/bin/lesspipe 
[2025.2.25 1:30:43] PID: 8064 (lesspipe), PPID: 8063 (lesspipe), Command: dirname /usr/bin/lesspipe 
[2025.2.25 1:32:39] PID: 9658 (lesspipe), PPID: 9657 (lesspipe), Command: basename /usr/bin/lesspipe 
[2025.2.25 1:32:39] PID: 9660 (lesspipe), PPID: 9659 (lesspipe), Command: dirname /usr/bin/lesspipe 

That's all I tried restarting my device, restarting the shell again. Nothing works. Tried ls, dir and many other commands.

But the result stays the same. I am using Ubuntu 20.04.3 LTS. I am not sure what I am doing wrong. Can anyone help me with this? I am just learning hooks by implementing, right now.


r/linux_programming • • Jul 23 '24

IRS GMF app experience or Unisys OS 2200?

5 Upvotes

We're looking for a GMF application developer and are having a difficult time filling the role. If anyone has this experience and is interested, please let me know.

*mods, if this isn't allowed please delete. I looked for sub rules and didn't find any.


r/linux_programming • • Apr 07 '24

Storing Key value pairs in POSIX shared memory

5 Upvotes

Is there any well known library (preferably free/opensource) for linux that supports storing KV pairs in shared memory?

I came across sysrepo but that seems tightly coupled with yang data models and a bit of an overkill for my usecase.I have a bunch of processes generating some (operational) data which I want to store in shared memory and also make it available to clients (other processes internal to the system) via an api.I could code this up myself ( atleast a trivial version ) but wondering if there is some library that can be leveraged.


r/linux_programming • • Dec 18 '23

driver build does not find orc_types.h from arch/x86/include

5 Upvotes

This is a cross post from stack overflow; I didn't get any nibbles there, so thought I'd try here.

The short version is the kernel build portion of building a driver for special hardware fails when trying to find orc_types.h. The file does exist, but in /usr/src/kernels/5.8blah/arch/x86/include... (btw, I'm not typing out the full directory name; 5.8blah (and whatever I type below) really refers to 5.8.18-100.fc31.x86_64)

I'm looking for reasons why the build won't complete / what I'm doing wrong.

The longer version is: I need to build the driver for an older version of Fedora and the manufacturer stopped linux support at kernel 2.6. It builds fine in Fedora 23 as is. I successfully ported it to F28 which was kernel ver 4, and now need to get it on to kernel ver 5 in Fedora 31.

I have F31 installed on new hardware (Intel i7) and started the driver port after installing the kernel souce and some other utilities ( yum install's of kernel-devel, elfutils-libelf-devel, and gcc). Once I started the build I found that I also needed make, flex and bison which I did just by making calls to the program and the OS magically asked then installed those funcitons. All this to say I'm not really a Linux guy and could well have messed any of these up or not configured them properly.

The manufacture's makefiles have required some modification and I may have messed that up as well. But assuming I did it mostly correct, the build starts with compiling a bunch of kernel source in /usr/src/kernels/5.8xxx. Some files were compiled (in 5.8blah/arch/x86/tools and 5.8blah/scripts/kconfig) but it gagged at ./scripts/sorttable.c trying to include <asm/orc_types.h>. I found that file in /usr/src/kernels/5.8blah/arch/x86/include/asm.

But why does the compiler not find it? Am I missing an environment variable? Do I need a link to that directory? Do I need to modify the makefile with something like an ARCH argument? Am I missing a confguration step with the compiler set up? What?


r/linux_programming • • Sep 30 '23

Hello, I would like to make sure that this Laptop supports Fedora.

5 Upvotes

Hello, I would like to make sure that this Laptop supports Fedora.  I found out that it only had RHEL and Ubuntu Certification (https://ubuntu.com/certified/202309-32038), but not Fedora. So my question is will Fedora 100% work on it without any problems? https://psref.lenovo.com/Product/ThinkPad/ThinkPad_P16v_Gen_1_AMD  I plan to use Fedora Onyx or Fedora Kinoite. Product id: 21FE000VCK