Skip to content
Advertisement

Tag: ubuntu

‘DT_REG Undeclared’ even when using header file in function

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

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

“/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

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

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

Advertisement