linux

"Echo" device for Unit Testing

I'm currently writing up some CPPunit tests for a program that tests a hardware communication port (yes, I'm writing unit tests for a tester app ;-) ). One of the classes I'm testing is basically a wrapper around the device's file descriptor; I make read() and write() calls on the file descriptor. Is there a device file/driver on Linux...

Print fifo content and exit

I need to print the content of a fifo (named pipe) to standard output. I could use the command: cat fifo The problem is that cat doesn't return. It stays running, waiting for more content coming from the fifo. But I know there wont be any more content coming for a while so I just want to print what's available. Is there a command tha...

File Security Authentication in Glassfish

How do I secure http files in Glassfish on Linux so before someone can see it they have to enter password. I know it is possible in Apache Server. ...

Samba Error: "Incorrect Function"

I've been setting up a samba share on a Redhat box, and am able to connect to it from the local machine. From an XP machine however, I'm only able to successfully connect to the root of the share (e.g. "\machine"). Connecting to the actual shared folders (e.g. "\machine\share") generates an error. The full error message is: \machi...

Precompiled headers supported on gcc 3.3.3 ?

Are precompiled headers supported on gcc 3.3.3 ? If yes what is the syntax to generate and use precompiled headers on Linux with gcc 3.3.3. We crosscompile our projects on Windows and Linux, on Windows we precompile stdafx.h and I'm investigating how to set it up so that it is precompiled on Linux as well. I'm aware of the gcc doc , I'...

JSON viewer for Linux

Can anyone recommend a good JSON viewer (or even editor) for Linux? ...

Are there any command line TMX editing tools (multilanguage support) for Linux ?

I'm building an application with multilanguage support in TMX. I've found some editors for windows, but since I'm developing on a remote server, I'm looking for a command line tool for linux to translate strings and write them to a TMX file. Does anyone know of such tools ? ...

is there any replacement of Access?

I am a programmer, and my father uses Access to collect the patients information (my father is a doctor), He wants me to teach him how to use it. I don't like Access (I'm a linux guy), and I cannot find any replacement of it. Do you guys know of any? (it must be easy enough for my father to use) ...

Installing RPM Dependencies

Hi, I am trying to install dbus-1.1.2-12.el5.i386 but I get the error " dbus-libs = 1.1.2-12.el5 is needed by dbus-1.1.2-12.el5.i386" :-( So I downloaded "dbus-libs-1.1.2-12.el5.i386.rpm" in the same directory and ran the command rpm -ivh dbus-1.1.2-12.el5.i386 again, but I still got the same error. On searching on Forums I found t...

[Linux command] How to move a directory

Hi. my old and new directory have same folders and files inside. I try "mv -if old/* new/" and get error mv: cannot move `./xxxxxx' to a subdirectory of itself How can I move it ? (Centos 5) thanks. ...

Central Clickable MSDN like Linux System/C/C++ Standard Library Documentation

Hi all, If you are windows programmer and you want to program something new where you are going to use some new API with which you are not that familiar then you can type MSDN on your web browser and you get immediately what you need. Nicely grouped API functions where you can see what to include and what to link. I am looking for som...

Redirect barcode scanner input to specific widget in linux

Hi: I have a Symbol LS2208 barcode scanner and works OK in my linux box (Kubuntu 8.10 Intrepid Ibex). Whenever you scan a barcode the scanner (connected to an USB port) sends the reading to wherever the text caret is. I would like to redirect all the readings from the scanner to an specific widget in my application (i.e. a text edit con...

Linux directory permissions read write but not delete

Is it possible to setup directory permissions such that a group is able to read and write files and subdirectories but not delete anything? ...

How do I use ffmpeg on a remote machine via ssh

I have three computers on my LAN, one running ubuntu, one running openSuse and my server running Archlinux. I've only managed to get ffmpeg to work properly on my server. I would like to write a script that would pretend to be an ffmpeg installation on the local machine, but would actually just be using the server's ffmpeg. Example...

A good place to read & write data used by a cron script?

Hi, I'm writing a script which is to be executed hourly. It basically works as: Read the datafile if it exists. Perform an action if the datafile has certain contents. Write over or create the datafile. I will put the script in /etc/cron.hourly/ on Ubuntu which will make it execute once each hour. What would a good place to store t...

Cross-Platform way to get CPU/Memory utilization

Looking for a library or a fairly cross platform method to get CPU utilization, memory utilization, etc in C/C++. Something OTHER than getrusage(), I need for entire system, not one process. I've checked around, but haven't found much. I really need it on Linux, Mac Os X, and Windows, but if there's a solution for *nix systems (includ...

GCC build problem (#include_next limits.h)

When i try to $ make depend -f gcc.mak a middleware on my Ubuntu machine I get this /usr/include/../include/limits.h:125:26: error: no include path in which to search for limits.h This is the contents around limits.h:125: /* Get the compiler's limits.h, which defines almost all the ISO constants. We put this #include_next outs...

accept socket from local client on ALL interfaces; rejcct remote client

I need to write a small socket server proxy application that accepts connections from local applications on ALL interfaces (socket should bind to 0.0.0.0). I'm not aware of way to achieve this (I have additional requirements that prevent binding to the 127.0.0.1). A first attempt at this does the following: bind(0.0.0.0) ... s = accep...

How does system() exactly work in linux?

I've been reading its man page but haven't yet been successful in figuring out how it works. On calling system(), is a new child process forked and the shell binary exec()-ed in it? That may be a stupid guess though. ...

Compiling C++ using -pthreads for Openwrt Linux-Get segmentation fault

Hi. I´m pretty new to programming in C++ and I´m using pthreads. I´m cross compiling my code for OpenWRT but for some reason I get segmentation fault when I run the program on my board but it runs fine on my PC. I suspect that the error occurs in the linking stage of the compilation because I tried a small C program and that worked fine...