I’ve working on this problem where I need to assign a character to a become the delete key in Linux with termios. I’ve looked up resources and it seems like everyone is doing it this way but for some reason I cannot get it to work. So I am trying to bind the ‘q’ character to become the…
global hotkeys using xlib
I’m trying to get my C application to execute certain tasks when the ctrl+k button is pressed(OR CTRL SHIFT K not sure yet), documentation is a bit sccarce but I was able to find a cpp example and tried to mimic that code: I understand the keypresses are captured by the XGrabKey function, the xnext even…
What exactly do these arguments mean in linux?
I have a program written in C and the command I am supposed to run it with on linux looks like this: What exactly does that mean? I think X Y will be the arguments so argc[2] will be X and argc[3] will be Y? But what about –something? Thanks a lot! Answer The C runtime does not discriminate any
Shebang option ‘ #!/bin/csh -f ‘
What does the Shebang option -f do? How do I find, or man, detailed explanations on all Shebang options? Answer There aren’t any “shebang options”. Any options there are options to the binary in the shebang. So that’s a csh option. Specifically (from the man page): -f The shell will st…
Bad File Descriptor on recv from TCP socket
I’ve got a trouble and can’t google out solution, so I hope you’ll be able to help me. There is a client-server application, something like text chat. Server accepts client’s connection, makes new socket for client and sends socket descriptor to it’s child process, that broadcast…
Linux shell change directory,file not found
I have written my convert.sh shell This is my working directory All executables and libraries are here, including tsmp. But when I run my script It seems that I do not understand alias. Following chepner’s comments,I have tried this But Why? Answer tsmp is not in your PATH environment variable, so you h…
can’t extract tar.gz file
I used backup.sh : in /home/sebastien/save i have: i’m trying to extract this file with : but Nothing is happening /home/sebastien/tmp is empty! Answer Try removing that other command which blocks the process.
Allow MongoDB remote access for specific IP
I have an application server with some PHP code on it which needs to access a distant MongoDB server. In order to do this I want to allow remote access on my MongoDB server, but only for the application server IP. I understand that I need to change the bind_ip value located in /etc/mongodb.conf in order to do…
How to not emit local symbols in NASM so that GDB disas won’t stop at them?
I’m trying to write some assembly programs using nasm on linux. Everything is good, but I make heavy use of local symbols (.loop, .else, etc.), which is a pain when debugging, because these symbols are emitted to the symbol table, e.g.: will produce a disassembly that looks like: which is a bit annoying…
linux cmp utility output: what is a “line”?
Could someone tell me what the “line” number represents in the output of a cmp command? I ask this because, first, I can’t find it explained anywhere. Second, I am getting results comparing a set of files where the “char” outputs are identical (as expected) but the “line…