r/linux_programming • u/unixbhaskar • May 26 '23
r/linux_programming • u/unixbhaskar • May 22 '23
Announcing my first e-book – Awk One-Liners Explained
r/linux_programming • u/unixbhaskar • Apr 19 '23
Submitting patches: the essential guide to getting your code into the kernel
kernel.orgr/linux_programming • u/unixbhaskar • Jan 24 '23
myme.no - Git Commands You Probably Do Not Need
myme.nor/linux_programming • u/Impressive_Safety636 • Sep 06 '22
How do I find the MAC Address?
Hello everyone,
I have a pretty basic question for you guys. I have a Software defined radio connected to my Linux laptop, and I'm trying to find its MAC address. What can I type in the terminal to find it? It is connected by USB.
r/linux_programming • u/More-Information5621 • Jul 17 '22
Installing V4L2-driver for Sentech-Omron camera on RPi4B
I am quite new to programming, and I need to configure now an industrial camera made by Sentech-Omron (USB3 Vision) to provide video frames to an OpenCV-python application. The system is a Raspberry Pi 4B (8 GB). I tried it on Raspberry OS 10 (32 Bit), 11 (32 & 64 Bit) and Ubuntu (64 Bit). It should be mentioned that there is only one driver for all linux platforms available. It leads always to the same error output.
Problem: I cannot install the provided V4l2-driver from Sentech-Omron (unfortunately it is from 2017). It results in the following error messages in the bash:
pi@raspberrypi:~/Sentech-4.0.3/stcam_dd $ sudo make install
make -C /usr/src/linux-headers-5.15.32-v8+ M=/home/pi/Sentech-4.0.3/stcam_dd modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.32-v8+'
CC [M] /home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.o
/home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.c:103:3: error: ‘const struct v4l2_ioctl_ops’ has no member named ‘vidioc_cropcap’; did you mean ‘vidioc_querycap’?
103 | .vidioc_cropcap = stcam_dd_func_cropcap,
| ^~~~~~~~~~~~~~
| vidioc_querycap
/home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.c:103:23: error: initialization of ‘int (*)(struct file *, void *, v4l2_std_id *)’ {aka ‘int (*)(struct file *, void *, long long unsigned int *)’} from incompatible pointer type ‘int (*)(struct file *, void *, struct v4l2_cropcap *)’ [-Werror=incompatible-pointer-types]
103 | .vidioc_cropcap = stcam_dd_func_cropcap,
| ^~~~~~~~~~~~~~~~~~~~~
/home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.c:103:23: note: (near initialization for ‘stcam_ioctl_ops.vidioc_g_std’)
/home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.c:104:3: error: ‘const struct v4l2_ioctl_ops’ has no member named ‘vidioc_g_crop’; did you mean ‘vidioc_g_ctrl’?
104 | .vidioc_g_crop = stcam_dd_func_g_crop,
| ^~~~~~~~~~~~~
| vidioc_g_ctrl
/home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.c:104:22: error: initialization of ‘int (*)(struct file *, void *, v4l2_std_id)’ {aka ‘int (*)(struct file *, void *, long long unsigned int)’} from incompatible pointer type ‘int (*)(struct file *, void *, struct v4l2_crop *)’ [-Werror=incompatible-pointer-types]
104 | .vidioc_g_crop = stcam_dd_func_g_crop,
| ^~~~~~~~~~~~~~~~~~~~
/home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.c:104:22: note: (near initialization for ‘stcam_ioctl_ops.vidioc_s_std’)
/home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.c:105:3: error: ‘const struct v4l2_ioctl_ops’ has no member named ‘vidioc_s_crop’; did you mean ‘vidioc_s_ctrl’?
105 | .vidioc_s_crop = stcam_dd_func_s_crop,
| ^~~~~~~~~~~~~
| vidioc_s_ctrl
/home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.c:105:22: error: initialization of ‘int (*)(struct file *, void *, v4l2_std_id *)’ {aka ‘int (*)(struct file *, void *, long long unsigned int *)’} from incompatible pointer type ‘int (*)(struct file *, void *, const struct v4l2_crop *)’ [-Werror=incompatible-pointer-types]
105 | .vidioc_s_crop = stcam_dd_func_s_crop,
| ^~~~~~~~~~~~~~~~~~~~
/home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.c:105:22: note: (near initialization for ‘stcam_ioctl_ops.vidioc_querystd’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /home/pi/Sentech-4.0.3/stcam_dd/src/stcam_dd_api.o] Error 1
make[1]: *** [Makefile:1868: /home/pi/Sentech-4.0.3/stcam_dd] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.32-v8+'
make: *** [Makefile:12: default] Error 2
pi@raspberrypi:~/Sentech-4.0.3/stcam_dd $ I have been trying to understand the underlying problem and how to solve it, but I cannot find any solution... Especially as a beginner, it seems very tough.
Do you have any thoughts on this? Do I encounter a general issue when installing the driver?
Thanks in advance!
r/linux_programming • u/vlad20112 • Mar 17 '22
In trying to understand udev_monitor's working...
Hi everyone! I want to check a enable a usb device during connect/disconnect from computer in real time. For it I use udev's mechanisms (enumerate, monitor) and check PID's and VIM's values devices which are being in computer. But additionally I want to send message to my device and take results for more believe. Connect/disconnect monitoring without send packages works well and vise versa. Separately, it works well, but both - not so. When i take result, program is being freeze. What's can be wrong?
r/linux_programming • u/89luca89 • Dec 15 '21
Release 1.2.0 · 89luca89/distrobox
r/linux_programming • u/libertyraptor • Nov 23 '21
Is there any structured pattern for command/log outputs?
Is there any structured output pattern for commands? In addition to plain text :) , which can be extended to log outputs .
I found myself thinking about some pattern similar to what posix is, but aimed at logging and outputting commands. I think of something similar to a json, using standard terms (like in SQL) example timestamp, user, pwd, default structured output etc.
imaginary example, output ls command
{
"return_structured_output": {
"folders": [
"folder"
],
"links": [
"link"
],
"files": [
"file"
]
},
"timestamp": 1637680386,
"user": "root"
}Different commands could meet these standards by passing some parameter on the command line, thus keeping the text clean for compatibility.
I think some standard for log output and output other than plain text would make it much easier to integrate between tools, commands without our wonderful obscure AWK :)
r/linux_programming • u/smores56 • Feb 24 '21
How to Convert Mouse Movement to Scrolling?
I'm gonna be getting a trackball soon that is missing a scroll wheel, and I think I'd be able to deal with it if I was able to system-wide convert mouse movement events into mouse scroll events by toggling something (a.k.a. run a script to switch between them with a macro on my keyboard). Does anyone have any ideas on how to convert these events system-wide or a different subreddit I should be asking in?
r/linux_programming • u/coldfire334 • Feb 11 '21
Is it okay to use nano for C?
Hello, I am new to bash scripting and C programming. I am taking a course in school where I have to program in C and also do shell scripting. I like using nano over anything else for bash scripting because of how easy it is. Vim is just too confusing for me right now. My question is, can I just use nano for C as well? Would it give me any problems once the code starts to get large and complicated?
Thanks
r/linux_programming • u/robbo2020a • Feb 02 '21
Cronjob Confusion?
Hi,
I'm looking for some assistance. I have a shell script that I can run perfectly fine in the directory but when I configure it as a cronjob I seem to get an issue with the opening variable that I've created. Can anyone explain why this would occur?
The error I get is as follows..
/var/www/html/test.sh: 14: /var/www/html/test.sh: n: not found
/var/www/html/test.sh: 15: /var/www/html/test.sh: n++: not found
/var/www/html/test.sh: 14: /var/www/html/test.sh: n: not found
/var/www/html/test.sh: 15: /var/www/html/test.sh: n++: not found
/var/www/html/test.sh: 14: /var/www/html/test.sh: n: not found
/var/www/html/test.sh: 15: /var/www/html/test.sh: n++: not found
the code I'm running is as follows:
i=1 n=0
while read -r line; do
`((n >=i)) && http --ignore-stdin --form POST` `https://www.x.com/profile/` `user_no="$line" job=3 >> data/"$line".csv`
`((n++))`done <getIDs/idReport.csv
Now I think the problem stems from the i=1 variable because I get a weird i= inside the directory the file is in, once a cronjob tries to run it. However as I said this fully works, no errors when I run this myself.
r/linux_programming • u/amenard • Apr 14 '19
Setting up an Angular/Node.js programing environment on Manjaro
Hi,
I'm trying to "upcycle" myself by learning both Angular and Node.js. I'm also a recent convert to Manjaro linux and I'm still finding my way around things. I would like to have some suggestions from those presently making a living using those tools on linux for the following step:
IDE: This I'm already ok with since I'm used to VSCode and have the main plugins installed for JS, Angular and Nodejs
Webserver: I have a XAMPP setup running on a second machine that I use as a server (windows 10 based)
Install Angular and Nodejs: How and on which machine, my workstation or my server?
Better yet, if someone knows of a tutorial that could help me set this up I would be grateful.
r/linux_programming • u/thekozmo • Feb 15 '18
Adventures with Memory Barriers and Seastar on Linux - ScyllaDB
r/linux_programming • u/peddleio • Jul 20 '17
A marketplace for system utilities
r/linux_programming • u/JurisPuchin • Dec 19 '16
I wrote a Utility to fix the tilt wheel for the Patriot Viper V560 mouse
r/linux_programming • u/alexdovzhanyn • Oct 09 '16
This Tool Uses GitHub to Make Music
r/linux_programming • u/cineradar • Dec 30 '15
talk video lecture (fefe): Check your privileges! [32C3] 2015-12-29
r/linux_programming • u/danKunderscore • Dec 16 '15