linux

GUI Using Shell Batch File

I'm now going to develop a program that will generate Shell Batch Files(*.sh), but I want to know some things: It's possible to show GUIs using they? How to do this? ...

Building a Window Manager

One of my new home projects will be a simple Window Manager, but before start I need to know some things: Which is the best language to do this? Where to get some resources to learn? ...

C stdlib .h's on C++ and malloc/realloc

I was really bothered by the inclusion of C stdlib functions on the global namespace and ended up writing things like ::snprintf or ::errno or struct ::stat, etc, to differentiate from some of my own functions in the enclosing namespace where those c stdlib functions were used. Then I discovered that there is a way to declare every C st...

How can I remove responses from LiveHTTPHeaders output using awk, perl or sed?

Let's say I have something like this (this is only an example, actual request will be different: I loaded StackOverflow with LiveHTTPHeaders enabled to have some samples to work on): http://stackoverflow.com/ GET / HTTP/1.1 Host: stackoverflow.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070220 Firefox/2...

Windows Mobile Emulator For Linux

I was developing Windows Mobile applications on a Windows machine using C#, just to test the platform, but now I'm back to Linux and now developing for Windows CE on it(CeGCC and FPC), but it's very boring to compile and send the executable to the device everytime just to do a simple test, then I want to know where can I find a good emul...

Global disk resource becomes unavailable

Hi all, If I've got a global disk resource (mount point on an isilon file server) that multiple servers use to access a lock file. What is a good way to handle the situation if that global disk becomes unavailable and the servers can't access the global lock file? Thanks, Doug ...

What LD stand for on LD_LIBRARY_PATH variable on *unix?

I know that LD_LIBRARY_PATH is a environment variable where the linker will look for the shared library (which contains shared objects) to link with the executable code. But what does the LD Stands for, is it for Load? or List Directory? ...

Linux\BSD Network Programming

Looking to write an SNMP and Netflow tool for Linux\BSD and seeking advice on language selection, C or Java. The tool will collect Netflows, send and recieve SNMP queries, connect to a Postgresql Databases and will be fronted by a web interface (PHP), in the future it will interface with devices using web services. Normally I would hav...

Running fork(2) from Windows with Cygwin. Possible?

Hi, I am trying to use a Ruby gem called shotgun that requires fork(2) command which I discovered is aa Linux command, and might be available in Cygwin. Is it possible to make it available through Windows command shell? ...

Portable way to get file size (in bytes) in shell?

On Linux, I use stat --format="%s" FILE, but Solaris I have access to doesn't have stat command. What should I use then? I'm writing Bash scripts, and can't really install any new software on the system. I've considered already using: perl -e '@x=stat(shift);print $x[7]' FILE or even: ls -nl FILE | awk '{print $5}' But neither of...

Reading/Writing Magnetic Striped ID Cards in Linux

How would I accomplish this? Is there a specific brand of card reader/writer that works easily with linux and windows (linux being more important as I need to deploy these to cheap kiosks). ...

How to create a super-huge file with pure c or linux-shell or dos-commands?

My os and drive is OS: Windows XP sp2 or Linux SUSE 9 or Cygwin Compiler: Visual C++ 2003 or Gcc or Cygwin PC and os are both 32 bits So, How can I create a super-huge file in secs I was told to use MappingFile functions. I failed to create files over 2G So... Your warm responses will be all appreciated thanks ...

python readline license horror. How to really be free ?

I love the GPL as much as the next guy, but it should help to share code, not prevent to do it. I am currently in a situation where I have to provide a python free from GNU readline, which is GPL, otherwise it would turn all my python GPL, something I don't want (I'm going BSD here). I tried to look around for both mac and linux. On mac...

What is the proper way of including linux kernel config?

I'm porting an old version of a software that is partly a linux kernel module to EL5, after doing the relevant hacks, the horrible GNU autotools mess that is used to compile the thing (no, it does not compile the kernel module via kbuild :( ) I keep getting lots of warnings 'Including config.h is deprecated' - I am told by google search...

Using Sparse to check C code

Does anyone have experience with Sparse? I seem unable to find any documentation, so the warnings and errors it produces are unclear to me. I tried checking the mailing list and man page but there really isn't much in either. For instance, I use INT_MAX in one of my files. This generates an error (undefined identifier) even though I #in...

Linux & C++: Easy way to exchange objects between two processes

Hello, I would like to know what is the easiest way (amongst various alternatives) to exchange objects (or some data) between two linux-based systems. It appears socket-programming could be a choice, but I have not done it earlier so I am not sure if it is the best way. Could anyone point me to a reference please? TIA, Sviiya ...

SetHandleInformation() Linux equivalent

Hi, for a TCP Server Class I need a Linux function, which does what SetHandleInformation(, HANDLE_FLAG_INHERIT, 0) do under Windows. I've already searched the web after a Linux equivalent, but I didn't find anything useful. The only reason I need that function is to make the socket handle inheritable to child processes. So in case there...

How to know when users login linux machine?

Hi, I am pretty much new to linux programming. I want to create a log file with some info when a user just logs in. so where can I find an event or something when a user logs in? is there any structure that has some flag when user logs in? Thanks ...

getting safe mode on although i turned it off

did a phpinfo to check which php.ini is being loaded. then i put safe mode off saved and restarted apache. i also put php.ini in the directory and used htaccess safemode off. htaccess safe mode off throws me a 500. in any case i am not able to disable safemode?! ...

Dealing with system time changes

I want to know the time that has passed between the occurrence of two events. Now, the simple way would be to use something like: time_t x, y; x = time(NULL); /* Some other stuff happens */ y = time(NULL); printf("Time passed: %i", y-x); However, it is possible that the system time is changed between these two events. Is there an...