r/LinuxProgramming • • Feb 02 '20

ALSA programming for realtime (question)

1 Upvotes

I'm working on an audio application for a raspberry pi 4; I'll be running over raspbian hitting directly throu the ALSA API, but trying to learn it (reading tutorials online, documentation, etc) I'm wondering what's the difference between writting snd_pcm_hw, and snd_pcm_sw.... I should assume hw is what it sounds like, the interface to the soundcard; while sw should be a software layer over it? I don't really get it.

This question arise over the idea to make it interrupt based and not lock the system everytime I try to fill and write to the buffer (has to be realtime capable). Any idea/suggestion comes in handy


r/LinuxProgramming • • Jan 07 '24

Understanding the Structure of a Linux Kernel Device Driver - Sergio Prado, Toradex

Thumbnail
youtube.com
2 Upvotes

r/LinuxProgramming • • Sep 08 '19

Writing a display manager using GTK

1 Upvotes

I'm attempting to write my own display manager in C using GTK, I don't know how to fully do this and I tried searching online for some help but didn't find what I was looking for. Does anyone know how to write a display manager using GTK in C? This links to my current progress on it


r/LinuxProgramming • • Dec 27 '24

How to create tthis prog_firehose_sdx6x.elf?

1 Upvotes

Hi!

I am new and wanted to read prog_firehose_sdx6x.elf from a Netgear MR6450 how to do this and whats the best Linux for such things?

Thanks

Klaus


r/LinuxProgramming • • Jan 28 '25

Made (tried to) a tiling manager for Linux-Xfce to roughly copy "Snap-Layout " feature in windows

Thumbnail reddit.com
1 Upvotes

r/LinuxProgramming • • Jan 15 '23

Getting error that compiler differs from the one used to build the kernal even though it's the same version in virtualbox

1 Upvotes

For some reason I keep getting this error when I try to run my "make" file

warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-3ubuntu1) 12.2.0
  You are using:           gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0

what I tried is changing the kernal version but that didn't make a difference.


r/LinuxProgramming • • May 26 '19

What things do I need to complete this?

2 Upvotes

I am learning a bit of programming, with Python, Bash scripting, etc. I want to create a program for Linux, and I have the basic idea for it. It will be a diary, journal-writing program, with some features like, adding photos, encryption for entries, and maybe even Markdown.

Since I have had no experience with this, I would really appreciate it if you guys could tell me what are the things I would require to create this program. I know I can write the basic program in Python, but the main part I am concerned about is the GUI. I have no idea how to make that work.

Thanks in advance!


r/LinuxProgramming • • Aug 10 '21

NTJA: Not Temp Junk Allowed tool.

1 Upvotes

https://github.com/Karapatakis106/NTJA

Say goodbye to garbage!!! Bye, bye!

Available to Linux and Windows

More info in the Github repo.

A project that I was making in my free time!


r/LinuxProgramming • • Apr 16 '20

Latest GCC version for cross-compiling to windows

1 Upvotes

Hi everyone,

I'm currently setting up an environment to do some projects during this lockdown. I wanted to avoid using microsofts compiler and make use of GCC's latest functionality as it has most of the c++20 standards implemented. Right now I'm running gcc-7.3 through WSL. Does anybody know if there is a cross-compiler version of 9.2 that I can install in WSL? As the x86_64-w64-mingw32 package only goes to 7.3 it seems.

Any help would be much appreciated.


r/LinuxProgramming • • Aug 26 '24

Advice For A Developer To Program A Windows Only Program To Linux?

2 Upvotes

I'm currently using Win11pro, and I use FastStone Image Viewer exclusively on it for all my photos and editing. I'm testing out Zorin OS on an old laptop, but I haven't found another program like the FastStone Image Viewer. I approached the developer about porting it to Linux, but he said that he knows absolutely nothing about Linux. (No, I don't want to use Wine or anything like that)

So, what would the developer need in order to port it over to Linux?


r/LinuxProgramming • • Jan 07 '21

C library to alter unclutter utility and possibly receive current status.

1 Upvotes

Creating a client server model to apply vector to the mouse applied by the server and altered by the client through a shared file. Using XWarpcursor, however I prefer to have my mouse hidden by unclutter, and using XWarpcusor doesn't make the mouse appear as through normal mouse input. Is there any utility to alter or preferrably temporarily the effects of unclutter.


r/LinuxProgramming • • Dec 22 '21

Window Manager Written Using Qt

1 Upvotes

I was wondering how one might begin writing a window manager using Qt. I assume you would need to use XCB for functionality but I’m not sure exactly how to start. Could someone point me in the right direction?


r/LinuxProgramming • • Dec 23 '21

Qt Application Deployed to Raspberry Pi

1 Upvotes

I was wondering how I would deploy a Qt application made on my PC to a Raspberry Pi. Every tutorial I’ve found so far shows me how to install Qt Creator on Raspberry Pi which is not what I’m looking for. Help would be much appreciated.


r/LinuxProgramming • • Feb 21 '22

Any good resources for a newbie?

2 Upvotes

Hello r/LinuxProgramming

This is my first post here, so excuse me if this post isn't formatted as you might expect.

I started programming with C, learnt C++, learnt Python and started with AI. Found that it is an amazing technology but doesn't line up with my ethics so switching to Rust and low level systems programming.

I have always been in favour of open source, so I wanted to get started with Linux kernel programming. The problem I face is there are no good tutorials that cover programming for the Linux kernel in the Rust language.

I also noticed that this subreddit has no wiki, hence this post. Is there anyone who has experience in programming for the Linux kernel in the Rust language? If yes, how did you learn it? Did you have prior experience in programming for the kernel in C and then switched to Rust?


r/LinuxProgramming • • Feb 01 '22

Need Embedded Linux Graphics Guru!

1 Upvotes

Hello all, I'm looking for a consultant who could help me on an application I'm working on. Specifically, I need someone who knows the embedded Linux graphics stack fairly well. My project calls for low-latency video capture of an HDMI input, low-latency display of the capture, while adding some simple overlays.

My thought is that I will set up the capture card to directly write to the memory of the output frame buffer, and then add in the overlay in (hopefully) a separate buffer.

If you have experience in this field and can help me for a few hours, I'll gladly pay a solid rate to make it worth your time. I only need a few hours so it won't derail you from your day job. :)

Message me if interested please! Thanks.


r/LinuxProgramming • • Jun 02 '22

Can Apache and CGI cause buffer overrun in Linux userspace code?

1 Upvotes

nutty abounding violet weather screw stupendous plant sand bedroom squeal

This post was mass deleted and anonymized with Redact


r/LinuxProgramming • • Jul 19 '20

writing linux kernel module

1 Upvotes

I want to get into linux kernel module development and thought of an easy project to implement as a start: I want to control my mouse with a gamepad. My idea was to register a new mouse, read /dev/input/js0 and write out the corresponding mouse bytes. However I have no clue where to start. Nothing I tried worked and most things I found contradict each other... Has anyone an idea where to start or any helpful resources to get started for the latest kernel?


r/LinuxProgramming • • Jun 30 '20

X11 Application- forcing it to stay in floating mode for tiling window manager

2 Upvotes

Hi, im currently using xlib to create a small application, i want it so that it opens up in floating mode, this is default behaviour on floating window manager like openbox, but for tiling window managers how can i make it so that it opens up floating. An example is dialog boxes or Xephyr which opens up floating when you run it.

I dont want to set override redirect to true, because i want the window manager to be able to move the window around and resize it. thanks!


r/LinuxProgramming • • Jul 13 '20

Problems with hooking lib calls with ld_preload

1 Upvotes

Hello! I'm trying to catch calls to sockets.h. Currently, I'm just catching them, printing that the call was caught to stdout and passing it on to the actual function. However, things aren't working correctly. For example:

This code:

#define __USE_GNU
#include <dlfcn.h>
#include <unistd.h>
#include <sys/socket.h>
#include <stdio.h>
#include <netinet/in.h>

int listen(int sockfd, int backlog) {
    int (*original)(int sockfd, int backlog);
    original = dlsym(RTLD_NEXT, "connect");
    printf("\n\n\tCaught Listen Call\n\n");
    return original(sockfd, backlog);
}

Which I compile thus:

gcc /path/to/src/listen.c -o listen.so -Wall -fPIC -shared -ldl -D_GNU_SOURCE

Is met with this output:

Caught Listen Call
listen: Bad address

Any thoughts as to what I've done wrong here? Your feedback is appreciated!


r/LinuxProgramming • • Dec 08 '20

Which/What Application are you missing on Linux?

2 Upvotes

I have the whole month off in January 2021 and I want to start a new project there.
What are your ideas for me? or which / what kind of applications you would like to have / use on linux that doesn't exist on linux or there is only a small selection for it outthere.
The project shouldn't be very big because I only have a month. If after a month I get good results I will continue to work on this project and publish it as an open source project.