linux

backlog value in listen system call

Hi I have a doubt regarding the backlog value in listen system call. From man page of listen system call. If the backlog argument is greater than the value in /proc/sys/net/core/somaxconn, then it is silently truncated to that value; the default value in this file is 128. It means my server can accept only <128 connections at once...

Are there any secure alternatives to XDMCP?

The title says it all: Are there any secure alternatives to XDMCP (A Linux remote desktop protocol)? I'd like to set up some thin clients -- UI heads (old computer + mouse + keyboard) connected to VMs on a fast server. ssh -Y doesn't quite cut it, since this would be for non-savvy computer users. I'd like it integrated with kdm/gdm if p...

How does one override an existing zsh keyboard completion?

I would like to enable zsh to autocomplete modules for yast2 (an OpenSuSE control panel), but it seems to already have some things defined. I can run compctl -k "(hello world)" nonexistantprogram just fine, but compctl -k "(hello world)" yast2 doesn't work at all. Some things for yast2 seem to be already defined, namely the "-" opt...

how to unpacks and rebuild rpm package on fedora?

Hi how to unpacks and rebuild rpm package on fedora? Could any one help me on this! ...

How can including GDB debugging symbols 'break packages' ?

When I am building packages, (on Gentoo, but that's not too important to this question) I get this warning that '-ggdb3' flag can 'break packages. I have yet to find an instance of when that is true. Although I once found some code which broke under different optimisation settings, that's different from including debugging symbols. ...

Using regular expressions in shell script

What is the correct way to parse a string using regular expressions in a linux shell script? I wrote the following script to print my SO rep on the console using curl and sed (not solely because I'm rep-crazy - I'm trying to learn some shell scripting and regex before switching to linux). json=$(curl -s http://stackoverflow.com/users/fl...

Getting current path in variable and using it

I would like to extract the current path in a variable and use it later on in the script Something like: myvar = pwd Later on: cd myvar But my bash skills have rusted over the years. How would i go on about doing that? ...

Post your Vim config.

Please share and vote for the best! Please do not close this. This is a subjective question, but is programming related and can be beneficial to people. ...

Can Linux apps be run in Android?

Android is based on Linux; can native Linux applications be run on Android? ...

flushing datacache on linux

What is the standard way to manipulate the data-cache on linux from a user-mode program? I'd like to writeback and invalidate the data-cache of a memory region that that is shared between my user-mode program and a peripheral device. Linux has no driver for it, and writing one myself would be overkill for the simple things I want to ...

System.UnauthorizedAccessException on RHEL4/Mono x86_64

Hi, I am using mod_mono 2.4.2.3 and Apache 2 to host a web application. This application tries to generate a temp image on its temp folder, but it gives me this error: System.UnauthorizedAccessException: Access to the path "/opt/franquia/hlrgw/Frontend/tmp/ctl00_ContentPlaceHolder1_ZedGraphWeb1f3c01ca1-bb4f-4b5b-9063-eebf0bb3281b.png" i...

Bash command to open largest file

I feel like this should be simple, but can't figure it out: What's the bash command(s) to look through a folder and open the largest file using VIM? ...

ubuntu when core dump is not happening when program ran as root(sudo)

when I ran a program which will cause the segmentation fault as root user , the core is not dumped.. I checked the ulimit -c and it is unlimited...But if I ran as a normal user the program is dumping the core.. suresh@suresh-desktop:~$ ulimit -c unlimited suresh@suresh-desktop:~$ ./main Segmentation fault (core dumped)...

Exit from polling on avahi?

I've read the example code but I can't seem to find the exit condition(s) for the threaded poll. Any clues? ...

Makefile.am ... what are those?

I've stumbled on a make file "Makefile.am" and I tried to use "make -f Makefile.am" on it to no avail. What am I doing wrong? ...

Packet Sniffing using Raw Sockets in Linux in C

I need to write packet sniffer in Linux that detect http packet that send and save the url that request . I see code in security-freak and run related code . This code run and only sniff received packet but I need send packet to sniff . In this code how to detect sent packet ? I can't use any library like libcap or ... (forbidden) the...

Missing QtCore...

I am trying to build a package from source and ./configure tells me I am missing package QtCore. Been googling & trying apt-get without success. Help please. ...

Best location for html files to be served up by custom web server

I have written a mini web-server which needs to serve up a few static html files in addition to performing its own custom processing. Could you suggest a reasonable location on the file system where I should store these files, for both Linux and Mac OSX (they need a dedicated directory that I can chroot to). ...

NOT sharing all classes with shared library

As ugly as win32 Microsoft compiler is by using the __declspec macro, it does have the advantage of being explicit about what you want to export or not. Moving the same code onto a Linux gnu/gcc system now means all classes are exported!(?) Is this really true? Is there a way to NOT export a class within a shared library under gcc? #...

How to store a version number in a static library?

How can I store a version number in a static library (file.a) and later check for its version in Linux? P.S. I need possibility to check version of file any time without any special executable using only by shell utilities. ...