Reputation
2,136
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
6 13
Impact
~84k people reached

  • 0 posts edited
  • 0 helpful flags
  • 309 votes cast
Jul
11
comment Why are UNIX/POSIX system call namings so illegible?
@JohnWHSmith: Don't worry, your kernel will never switch from time to anything. That's because the kernel doesn't take identifiers, it takes function call numbers (in the case of time, it's 13). The names are in the corresponding header files/userland libraries (and also in the kernel source, I guess), but not in the actual kernel calling code; to call a kernel function you load a specific register (on x86: eax) with the function number, set up the other arguments (often also in registers) and do a syscall (on systems without syscall instruction, a software interrupt is usually used).
Apr
30
awarded  Self-Learner
Apr
2
comment Difference between nohup, disown and &
I couldn't reproduce it until looking at this answer (which actually is a comment) to a related question. Given that Alt+F4 is a window manager key combination completely unrelated to the shell, I guess it is something the window manager does. However it doesn't seem to go via X events, as xev doesn't show something that I can recognize as causing a close.
Apr
2
comment Difference between nohup, disown and &
If you use all three together, the process is running in the background, is removed from the shell's job control and is effectively disconnected from the terminal.
Mar
26
comment How to remotely send a keypress to an X11 application?
@Gilles: OK, done.
Mar
26
answered How to remotely send a keypress to an X11 application?
Mar
26
comment How to remotely send a keypress to an X11 application?
@Gilles: Copying the xdotool binary worked! Actually, another problem turned out that the screensaver (in lock mode) "stole" the keys; after additionally unlocking the screen, I could save my data using xdotool. A million thanks!
Mar
26
awarded  Curious
Mar
26
comment How to remotely send a keypress to an X11 application?
@Gilles: A slight modification of the code linked by Ernest A. Thanks for the information that xdotool consists only of a single binary; I'll try to locally install it and then copy to the remote machine.
Mar
25
comment How to remotely send a keypress to an X11 application?
OK, I've found it out: The value to store there is the window id. I've got the code to work (xev tells me it receives the artificial Ctrl-S). So my question is effectively answered, thanks for that. Unfortunately Mathematica doesn't react to the simulated keypress, so my actual problem remains unsolved ... I guess I'll have to either think of another way, or to accept that the data is lost.
Mar
25
comment How to remotely send a keypress to an X11 application?
@ErnestA: Thank you; that looks like a good start, however I don't see a way to focus the window (I'm not even sure if this would be possible while the screen is locked) and can't find out how to get the window (i.e. whatever is stored in a Window variable for use in the program; in the linked code, it's filled by XGetInputFocus) from the window ID.
Mar
25
asked How to remotely send a keypress to an X11 application?
Feb
14
awarded  Civic Duty
Feb
14
comment count lines in a file
@SopalajodeArrierez: Of course it is possible: grep -v '^ *+' matlab.git.diff | wc -l (I'm assuming the quote signs were not actually meant to be part of the line; I also assume that both lines with and without spaces in front of the + are meant to be comments; if at least one space is mandatory, either replace the star * with \+, or just add another space in front of the star). Probably instead of matching only spaces, you'd want to match arbitrary whitespace; for this replace the space with [[:space:]]. Note that I've also removed matching the % since it's not in your example.
Jan
22
awarded  Guru
Nov
16
awarded  Good Answer
Nov
11
awarded  Nice Answer
Oct
16
comment How to find file/device given the resource ID on Linux?
@Alex: If it is a PHP specific number, then your question is actually a PHP question, and probably better asked on Stack Overflow, since I'd expect more PHP experts there.
Oct
16
answered How to find file/device given the resource ID on Linux?
Oct
11
comment Unexpected result when using command line arguments to look for file with symbol
You forgot quotes around $1 and $2.