Category "linux"

Cron job: how to run a script that requires to open display?

I want to set up a cron job to run a python script, but it gives me this error: RuntimeError: could not open display This is because I import a module that

Download a specific folder from on-prem GitLab

I have an on-prem GitLab with a huge repository with many folders. I'm trying to create a freestyle Jenkins job that would only retrieve the folder from the rep

Ubuntu 22.04 OpenVpn server error: write to TUN/TAP : Invalid argument (code=22)

I start openvpn server with openvpn --dev tun --ifconfig 172.16.0.1 172.16.0.2 --cipher AES-256-CBC on my Ubuntu 22.04 Linux Box I generate the certificates and

Ubuntu 22.04 OpenVpn server error: write to TUN/TAP : Invalid argument (code=22)

I start openvpn server with openvpn --dev tun --ifconfig 172.16.0.1 172.16.0.2 --cipher AES-256-CBC on my Ubuntu 22.04 Linux Box I generate the certificates and

While running build on Teamcity getting below error base dir does not exist

java.lang.IllegalStateException basedir does not exist. While packaging the application using maven

conky using a function call within an if statement

How do I call a function after loading it in conkyrc? For example: I'm trying to get the active interface name which is returning properly ${lua conky_findInte

Docker default-ulimit nofile setting

/etc/docker/daemon.json has the following contents { "live-restore": true, "default-ulimits": { "memlock": { "Hard": -1, "Name": "memlock",

docker copy and chown in bash script

I'm building a network with docker compose and some bash scripts and i'm having problems during the process. Basically i have a some containers and volumes. In

Converting .ova file to .vdi

I had installed mininet-wifi on virtual box via .ova file. Its operating system was lubuntu. As a result of moving and deleting, the .vdi file in the mininet-wi

What does "rc" mean in dot files

In my home folder in Linux I have several config files that have "rc" as a file name extension: $ ls -a ~/|pcregrep 'rc$' .bashrc .octaverc .perltidyrc .screen

Running executable CGI on NGINX (NOT PHP!)

I have an older web application that uses .cgi script files. These are compiled ELF binaries, directly executable on the system. I have been able to get these r

How can I add Linux source code global variable?

I face a situation where I need to declare a global variable so every file of Linux source code can reference it. As much as I know, Linux is a Monolithic kerne

How to download multiple files using wget in linux and save them with custom name for each downloaded file

How to download multiple files using wget. Lets say i have a urls.txt containing several urls and i want to save them automatically with a custom filename for e

perf mem doesn't records mem load on heap

I used perf mem on my test C program, because I want to get how many times the mem load(and store) on the same pages. a. My C program is here: "stest.c" #includ

Running a Python Flask server in closed Terminal session

I've made an Flask API Server that i want to run on a Server and close the Terminal session and still keep it running. (SSH) The API's makes a lot of Requests t

sqlplus query + loop on linux

I have pratically 0 experience on unix and few on mysql and I am finding hard where to start to complete this task, I have to write a .sh file to launch once a

Why does interrupting a simple C++ program under Valgrind results in segmentation fault?

Consider the following program: #include <iostream> int main() { std::cout << "Hello, World!\n"; } I compile it with on Ubuntu 20.04 (Focal F

cargo build-bpf fails on ubuntu

rustc --version = rustc 1.60.0 (7737e0b5c 2022-04-04) solana --version = solana-cli 1.10.8 (src:623ac656; feat:1122441720) npm --version = 8.5.1 node --version

Checking user info with multiple parameters

I have to print information about the user with the name given as a parameter. For example let's say ./script1.sh John should give me John Doe (username) -last

asdf fails node install with: permission denied error, how to grant it permission?

When i try to install a node version with asdf-vm i get the following error Trying to update node-build... ok mkdir: cannot set permissions '/tmp': Permission d