227,598 questions
Best practices
2
votes
0
replies
26
views
How to properly obtain info on current user session lock using PAM
I have a C application that uses pam to reauthenticate a user on a system with faillocks configured. Imagine something that would work similar to login on the outside.
However, it only does basic ...
0
votes
0
answers
21
views
How do I configure idmapd properly? [closed]
I have a nfs4 server where the uids of two users are flipped against the client.
(Both machines are running debian trixie)
server name=jupiter
karl 1000
alice 2001
bob 3001
client name=saturn
...
-1
votes
0
answers
23
views
Kali linux Faild to fetch mirror [closed]
Im trieng to install "VIEL" but at the end of installing it outputs this
Error: Failed to fetch http://mirror1.sox.rs/kali/kali/pool/main/g/gcc-mingw-w64/gcc-mingw-w64-x86-64_15.2.0-7+28_all....
-2
votes
0
answers
21
views
Fedora loses connectivity to intranet VPN domain after connection expires [closed]
Fedora 42.
I use the following script to connect to my work VPN using Cisco AnyConnect Secure Mobility Client 4.10.08029
echo -e "$USER\n$(pass company/domain)\n$(pass otp company/mfa)\ny" &...
0
votes
0
answers
25
views
Cannot modify swap memory using zram-generator [closed]
I have a Rasperri Pi 5 and I need to increase swap memory to 4GB.
I made sure that zram generator is installed by running:
sudo apt install systemd-zram-generator
and I have ONLY one config file in ...
-3
votes
0
answers
33
views
How to use MIP SDK Java Wrapper on Amazon Linux 2 [closed]
I have downloaded 1.16 version of MIP SDK Java Wrapper for windows and able to successfully decrypt .rpmsg from Outlook.
But now I have an Amazon Linux 2 (AL2) environment which is similar to RHEL.
...
8
votes
1
answer
174
views
If I start two strictly CPU bound threads bound to the same CPU, and one is SCHED_IDLE, why does it ever schedule?
If I start two threads bound to CPU 0, where one is SCHED_IDLE, then why is it ever scheduled when the other thread is CPU bound at either normal priority, or at SCHED_FIFO?
For SCHED_FIFO I get it, ...
-2
votes
0
answers
37
views
Linux kernel build error: No rule to make target 'debian/canonical-certs.pem' [closed]
I have compiled the Linux kernel many times, and I always find that it needs a certificate. In my build process, I always encountered "No rule to make target 'debian/canonical-certs.pem" and ...
Advice
0
votes
1
replies
47
views
Swap full but all process terminated : does Linux free "orphans" pages when needed?
this is the first time I encounter a swap issue, I'm lost about how Linux is supposed to behave. I have a RHEL virtual machine running a batch processing RAM intensive application (100+GB RAM, 1GB ...
1
vote
1
answer
41
views
terminals don't open in the new workspace, instead open in current workspace | i3 window tiling [closed]
i create a script that is supposed to create a new workspace and that workspace launch four terminal each in given position with a command ran in it.
this is the script.sh
#!/usr/bin/env bash
WS='9:...
0
votes
0
answers
38
views
Linux - Reinstalling GCC with subroutine failing error status 2 [closed]
I've been trying to get a project on my Windows device to run through WSL, and I've been getting stonewalled by C++ compilation errors. I don't understand anything OS-level very well and ended up ...
0
votes
0
answers
46
views
No app icon on Linux app with electron-builder, but shown when electron is used directly
i am programming an app with vite, svelte@4, electron and electron-builder. if i run electron ./start-electron.js the logo is shown, but after many days of trial and error i still don't get it in the ...
3
votes
1
answer
111
views
Deleted function compiler errors using thrust::remove in C++
I am currently attempting to use the thrust::remove function on a thrust::device_vector of structs in my main function as shown bellow:
#include <iostream>
#include <thrust/device_vector.h>...
1
vote
0
answers
36
views
How do I disable blink-and-insert upon entering closing bracket in mg editor c-mode?
I use the mg MicroGNUEmacs editor, a small emacs clone, and encountered a problem upon using c-mode. Whenever I type "}", ")", or "]", the cursor is taken to the matching ...
-2
votes
1
answer
68
views
CMake configure_file() permissions issue when run by multiple users
When trying to rebuild a CMake project as a different Linux user, it generates Operation not permitted despite having read and write access through group permissions. The only way to solve it is to ...
2
votes
2
answers
117
views
How do I operate on continuous piped output from a bash command?
I'm trying to write a small bash script that will take values from my mouse's horizontal scroll wheel to change my system's volume.
Using this guide, I've come up with the following command to ...
1
vote
0
answers
78
views
cuda & cpp - compilation and linking using cmake
I want to create a skeleton for a project in which there are multiple cuda and cpp files. They will be compiled individually and then linked together to form a single executable.
Currently I have the ...
1
vote
0
answers
136
views
Bash script returning whole array instead of single element
I wanted to make a CLI tool that will display a random quote (from a list of .sh scripts which show ANSI art along with said quote) and also let you filter by author.
It works fine when I pick an ...
Best practices
0
votes
5
replies
69
views
Is there a maximum value permitted in the struct timeval tv_usec field?
struct timeval contains two fields: tv_sec and tv_usec, which hold a count of seconds and microseconds respectively.
1000000 microseconds is a whole second. Is it permitted to populate the tv_usec ...
4
votes
2
answers
155
views
how to check if pid has rolled over?
I am writing a program that will periodically scan all processes on a machine. I want to cache as much as possible to avoid any system load.
I can list all available pids on a machine with ls /proc/[0-...
0
votes
1
answer
111
views
How to call inline functions by using dl library?
I have to use dl library for calling libapt-pkg functions. The method I need to call is pkgCacheFile::GetPkgCache() that is declared as inline. The problem is that dlsym returns error while trying to ...
2
votes
0
answers
75
views
Python when sounddevice.PortAudioError: Error opening InputStream: Invalid sample rate [PaErrorCode -9997]
I am currently building a voice AI agent using LiveKit. My current code base is from LiveKit.
from dotenv import load_dotenv
from livekit import agents
from livekit.agents import AgentSession, Agent, ...
1
vote
1
answer
57
views
Yocto SDK portable with relative links
We have a Yocto project (mickledore) to create a custom Linux for an ARM A7 system. To be able to write code for this target, we also created the SDK. Inside local.conf we have:
SDKMACHINE = "...
2
votes
0
answers
57
views
Mason.nvim works on Windows but not on my WSL [closed]
I’m running Neovim 0.10.0 with mason.nvim inside WSL (Ubuntu).
I have 2 Neovim configurations: one on Windows (pwsh) and the other on WSL (ubuntu). On Windows, everything works fine — I can install ...
3
votes
1
answer
138
views
Scan for changes to linux dbus properties for bluetooth using sdbus-c++
I want to scan for changes of bluetooth devices under linux. I'm trying to implement this with the sdbus-c++ library version 1.40 and wrote following code:
// save to sdbus-example.cpp and compile ...