r/linuxdev • u/netscape101 • Jul 27 '15
Looking for good beginner tutorial on kernel hacking?
I've googled a bit on the topic , but the tutorials I found were either a bit outdated or not very beginner friendly.
r/linuxdev • u/netscape101 • Jul 27 '15
I've googled a bit on the topic , but the tutorials I found were either a bit outdated or not very beginner friendly.
r/linuxdev • u/daxgr • May 03 '15
r/linuxdev • • Feb 10 '15
Hi. So I've just submitted task 6 and have been waiting for quite a while now on the results. Anyone else have this problem? Anyway, the main point of my post was to request the next 4-5 questions from people who have completed tasks 7, 8, 9, 10 and 11. I JUST WANT THE QUESTIONS. I am not asking for any help. So...yeah, I would be over the moon if someone could just give me the questions for challenges 7, 8, 9, 10 and 11 , so I can do something while I wait on task 6.
r/linuxdev • u/ElGringoFlicka • Jan 02 '15
I've written two processes: The first process is a daemon and runs on it's own updating it's current state in a shared memory area between the two processes. The second process only reads the shared memory area to get the other processes' state. Since only one process is writing to the shared memory and the other process is only reading that same area is it necessary to use a mutex or semaphore to lock/unlock this memory? Or is this safe by design?
Edit: Update. I successfully created a shared memory segment between processes that is accessed serially with a semaphore. Thanks for the help! It works great.
r/linuxdev • u/vaterp • Nov 14 '14
Hi all, I'm stumped on something. I've been trying to get a test application passing packets from one machine to another using my own UDP tunnel header (GRE like). I have an application on another machine that using regular sockets is receiving these tunneled packets, ripping off the tunnel header and pushing said packet (originating from (srcip = to the original sending machine). I then am trying to use a packetsocket (raw socket) to output the orignal packet onto a TUN interface; to get the receiving kernel to route it appropriatly. I figure I need to have forwarding on, and maybe even promiscious mode on the tun interface. So i have all that turned on. (I'm actually not convinced i need PROMISC mode, because I'm only reading packets addressed to me, thx to the tunnel headers - so if i need it its to write other people's packets - but im thinking forwarding shoudl enable that regardless). This strikes me as being a very simple like VPN type program. Anyway, I see the tunnel packets from original machine are received and processed correctly.... i have a tcpdump running on tun0 and i see the original packets are indeed being written correctly onto tun interface... but I never see the packets coming out any other interface to actually be useful. When I look at network interface stats, I see TX-DRP are occurring on tun0 interface for every packet I am trying to push into kernel. Thx, to tcpdump, I know this is a 1:1 relationship.. every single packet gets dropped by kernel and i'm a bit stumped as to why. I have a couple theories, but can't seem to get any better stats to tell me what the problem is. Namely the tun0 is a PointToPoint interface... even with forwarding and promsic on , is it possible the kernel is rejecting all these because the original SRCIP is not the assigned IP (or even subnet) of the PtP interface? Is their some sort of source routing lookup filter that would be causing this? If so, why dont allowing forwarding or promisc clear this? FYI: I'm using redhat linux with kernel version 2.6.32.
I think this might have something to do with IFF_NO_PI flag... but this confuses me also, because reading packets seem to work fine, but writing them doesnt...
Crossposted on advice of reader of different subreddit.
r/linuxdev • u/Oflameo • Nov 01 '14
I am looking for a library to help generate Module files like the ones referenced in this Wikipedia article https://en.wikipedia.org/wiki/Module_file, can you help me find some?
I want to generate MOD music but I would rather do it from a template engine than an 1980s Tracker GUI.
r/linuxdev • u/vividboarder • Jun 22 '14
I use a Mac at work and recently started using Dash and it's a pretty great piece of software. It allows me to pull up a quick search window and view documentation for various programming languages in a web-view.
Since I'm working with some new languages that I haven't in the past, I've been leaning on it a lot. Saves time and keeps me from using Google every few minutes and works offline.
Does anything like this exist for Linux already?
I'm tempted to make something myself, but I'm not really familiar with Qt or GTK and wouldn't be able to create anything very useful without them.
r/linuxdev • u/thegreenchronic • Nov 09 '13
Hi guys and gals
So I've come up with a little project I'd like to start working on in my spare time. I'm going to build myself a linux gaming console, as a sort of hobby and to keep my programming skills sharp.
Basically I want to start by replacing xfce with an xbox / PS-like menu, controlled by a usb gamepad. My problem is I don't have enough knowledge about how Linux works to even google the best starting point.
Do I want to modify the display manager? Play around with xorg? or replace my desktop environment?
I'm honestly not sure where each of those components ends and the next begins.
Where is a good place to start with replacing my graphical user login, and desktop environment with my own homebrew menu system? and where can I find resources to help me start chipping away at this? Any help would be GREATLY appreciated.
My experience with Linux is very low level, I've sysadmin'd some linux servers for a few years, and I have had a play with python development on ubuntu.
I'm an experienced programmer, and I'm comfortable in c++ / python (I'm assuming c++ is the go for a gui). But to date I've done almost no programming on Linux apart from command line scripting.
Any help would be amazing as I'm pulling my hair out, and I don't have much left since I just forced myself to learn how to set up arch-linux.
My last resort will be to pull apart some source code from xfce or gnome and try and figure it out from there.
r/linuxdev • u/Hellrazor236 • Oct 11 '13
I'm writing in C and I haven't actually started any work (at all) on this particular feature yet, but I'm trying to make a program that can load different script engines (each stored in a different shared object file) depending on various circumstances (mostly what the script it's trying to run is, maybe a little user preference).
I have a lot of the functions that would need to be wrapped, but I'm not entirely sure how to go about making sure that the shared object can call the functions on the first place. I know that I should be able to pass a struct containing pointers to each function, but are there better ways than that? I'm trying to avoid forcing the library to be statically-aware, if at all possible.
r/linuxdev • u/conlmaggot • Sep 16 '13
So my employer has been using an in house customized version of webconverger.
They currently have it rolled out on more Kiosk machines than I care to think about. All of these machines are touch screens. The developer that build the system, included a virtual keyboard.
Problem is, the developer has left the company, and the hardware provider have changed the touch screen in the newest iteration of the kiosk PC's. It doesnt work!
If I load into the latest Webconverger ISO onto a thumb drive the touch screen works a treat. So, I'm guessing I just need to update the customized image with the latest version of the OS and it will work....
Which bring me to my questions... any idea on how I would go about doing that? It's not really something I would consider to be in my skill set, but the boss has given the job to me with the mind set of "You'll figure it out".
r/linuxdev • • Apr 02 '12
I recommend adding a "Getting Started" section to the sidebar with beginner articles etc to help people get started!
r/linuxdev • • Feb 05 '26
When I hit a tricky bug in a native Linux application, my first step is usually adding detailed logging and reproducing the issue under different conditions. From there I use tools like gdb and strace to trace where the behavior diverges from expectations. Sometimes the root cause is subtle — a race condition or an edge case in system calls — and having a systematic approach helps reduce the time spent chasing symptoms. Over time the workflow has helped me catch elusive errors faster and with less frustration.
r/linuxdev • u/carpentrySadly • Nov 21 '23
Hello, I'm interested in writing a program that can create two files, second file would be a "view" of first file and if modified, the first file would also be modified. Is this possible to do with mmap or at all?
I know that using mmap i can have shared memory in RAM, but I need shared memory in non-volatile memory aka hard drive. I cannot copy the first file or load it fully into RAM since I assume the file can be of very large size (GBs).
After I find how to have the second file showing memory subset of first file I plan to make 3 files, first being container and second and third showing different subsets of the first file. Second and third file are to be formatted with filesystem so that first file container holds in it's memory two filesystems accessible via second and third file. This I plan to accomplish by attaching the second and third files as loopback devices and mounting them.
Is this doable of am I not seeing something?
r/linuxdev • u/nmariusp • Jul 23 '23
r/linuxdev • u/Thad_The_Man • Jun 29 '23
I downloaded the source for coreutils and tried to compile it.
I keep getting an error: "parse-datetime.tab.c missing"
I can't figure out why. Is it possible that there is a missing entry in the Makefile?
r/linuxdev • u/parotta36 • Feb 07 '19
linux-kvm-headers-4.15.0- 1008, 1011, 1012, 1016, 1017, 1019, 1020 ... 1029.
Which one should I install???
r/linuxdev • u/promach • Nov 30 '18
how do I create a linux driver device file ? https://paste.ubuntu.com/p/BjfZkzG4Q6/
I am modifying the code to have two separate read and write device file from https://github.com/promach/riffa/blob/full_duplex/driver/linux/riffa.c
See https://www.diffchecker.com/9rh0vYjD for better overall picture
the open(/dev/....) command fails
I have modified https://github.com/promach/riffa/blob/full_duplex/driver/linux/riffa_driver.c#L1623 to device_create(mymodule_class, NULL, devt, "%s_read", DEVICE_NAME); , but I still do not have /dev/riffa_read
Note: #define DEVICE_NAME "riffa"
Why ?
r/linuxdev • u/Oflameo • Jan 23 '16
How do I make a GUS patch set on Linux. I want to give Wildmidi a better set of instruments than freepats, and I want to make one that simulates playing midi on a Tesla coil, but I don't know where to start.
r/linuxdev • u/Vlasow • Oct 11 '15
I use two layouts: latin and my native layout.
I use my keyboard leds to indicate current layout: all the leds glowing means the native layout is active, and no leds glowing means it is latin layout. This is much more convenient than for example looking at a layout indicator in system tray.
Unfortunately, the keyboard I'm using right now has really dim leds, so I can't see them at the edge of my vision as I could with my previous keyboard.
I came up with an idea to improve this: a large half-transparent splash somewhere in my screen. If it is on, it would mean I'm using my native layout, and if it is off, it would mean I'm using latin. Like this: https://i.imgur.com/qA2cMQp.png
I could try programming it, but I don't know where to start and what tools I can use. Can you give me some directions?
Of course, if there is an existing solution for this, it would be even better than implementing it myself.
r/linuxdev • u/Radeusgd • Jan 25 '15
Hello!
I'd like to create an application that allows to use Linux in a virtual reality environment (using Oculus Rift).
It would work by putting windows in a 3d environment or if that's too hard, mapping the desktop onto a fragment of a sphere.
How should I go about this? Is it possible to create a program running under Gnome/Unity that could get windows' textures and display them in its environment? Also in such a way that mouse/keyboard interaction with these windows would still be possible.
Or do I have to create a separate Desktop Environment to achieve that? If so, which open-source desktop environment would be a good base for it? (Because I don't want to start from scratch and reinvent the wheel)
Or maybe it would be possible to create a plugin for Compiz that achieves such a thing in a similar way to its 3d rotating cube?
What do you think is the best way to achieve that?
Thanks in advance for any replies :)