I’m using the <dirent.h> header file in the function I’m referencing DT_REG, however, I’m getting error an saying ” ‘DT_REG’ undeclared (first use in this function) ” The snippet of the code is: In my makefile I’m using “cc -std=c11 -Wall -Werror -pedantic”. Any ideas for the reason? Answer DT_REG is not part of ISO C11 extensions. Setting -std=c11 strictly
Tag: ubuntu
Restart Opencanary from Crontab
I have a programm called opencanary running at a virtual environment at my Raspberry Pi with Ubuntu 18.04 installed. I want to restart it every 30 Minutes using crontab. For testing I set the script to run every 3 Minutes as you can see below. When I execute the script manually it’s working fine. When using crontab to run it
Backslash inside an alias not being stored as part of its definition
I’ve got a screen sessions named BedrockServer. I’ve entered the alias like this: But when I type alias, it lists it as and the alias doesn’t work. I’ve tried messing around with the quotes and using backslashes before the quotes and before the dollar sign, but nothing fixes it. Any ideas what I’m doing wrong? Answer Inside single quotes all
“/usr/bin/ld: cannot find -llibopencv_calib3d” when compiling an opencv project in Ubuntu 20.04
I have installed opencv in Ubuntu 20.04 following the instructions in OpenCV Installation in Linux. As per the instructions, sudo make install copies all the .so files to /usr/local/lib. However, when compiling a program, using the command g++ –std c++17 -g opencv/Basic.cpp -o output -I/usr/local/include/opencv4 -L/usr/local/lib/ -llibopencv_calib3d -llibopencv_core -llibopencv_dnn -llibopencv_features2d -llibopencv_flann -llibopencv_highgui -llibopencv_imgcodecs -llibopencv_imgproc -llibopencv_ml -llibopencv_objdetect -llibopencv_photo -llibopencv_stitching -llibopencv_video -llibopencv_videoio
xsetwacom unable to find output
Xrandr shows two monitors. I want to use xsetwacom to move all devices to HDMI-0 however the xsetwacom command towards the bottom does not recognize HDMI-0 Outputs: So I try to xsetwacom to HDMI-0 After I get this to work I can make a script to do it on startup but I can’t find any resources on how to fix
Error executing hook: executable file not found in $PATH
I try to deploy service into minikube cluster via DevSpace tool. I have the following hook in my devspace.yaml But at the time it executes it I got the error: I am able to execute pip install -r requirements.txt from regular terminal in Ubuntu. But when it does it via hook it throws the error. Could somebody help me to
Run a command on a list of files
The command shred in ubuntu does not shreds files recursively. Hence, I wanted to list all the files in a directory by doing find -L and then shred these files using shred. However, find -L | shred does not works. Can someone please help me do so? Thanks in advance. Answer find | shred works as if you ran just
How can I run an argparse python program without the .py extension?
Currently, I have to type /xkcdpwgen.py -h in order to get the following usage: xkcdpwgen [-h] [-w WORDS] [-c CAPS] [-n NUMBERS] [-s SYMBOLS] Generate a secure, memorable password using the XKCD method optional arguments: -h, –help show this help message and exit -w WORDS, –words WORDS include WORDS words in the password (default=4) -c CAPS, –caps CAPS capitalize the
Can’t change git default branch to main on the command line
I’ve read on several sites that you can use git config –global init.defaultBranch main to change the default branch (from master) to main. But it doesn’t work for me. Here it’s from my terminal (my os is ubuntu): Answer The option init.defaultBranch was introduced in Git version 2.28. You must be running an older version which does not honor this
Bash/xargs: How to mass assign user privileges?
I have created a new user. My current user obviously has the following rights: Where max is the name of the current user account. I tried paramer expansion but the output of ${groups} is empty, so I just piped groups to xargs I get the error message that there is no folder max adm cdrom sudo dip plugdev lpadmin lxd