linux

how to send signal from one program to another?

i am using message queue as an ipc between 2 programs. Now i want to send data from one program to another using message queue and then intimate it through a signal SIGINT. I dont know how to send a signal from one program to another . Can anybody pls provide a sample code if they have the solution. ...

How to migrate a .NET Windows Service application to Linux using mono?

What would be the best approach to migrate a .NET Windows Service to Linux using mono? I've been trying to avoid executing the application as a scheduled command. Is it possible to obtain a service/system daemon(in linux) like behavior? ...

Encoding Keyboard Command Onto Bash Script

Dear all, I have the following way to submit a job with cluster using qsub: Submitting jobs from standard input To submit a PBS job by typing job specifications at the command line, the user types qsub [options] <return> then types any directives, then any tasks, followed by (in UNIX) C...

Best languages/frameworks for imaging Linux app

Hello all. I'm looking for the best tool/language/library/framework to develop a document scanning/imaging/indexing application that must run on KDE/Linux. The application must provide the following functionality: 1) Document scanning (simple and multipage) in B/W, save the scanned images in TIFF format with CCITT Group 4 compression. ...

How do I get Java to use the serial port in Linux?

We make use of a java application that manages a pinpad via the serial port. This works perfectly on windows with the Sun Comm.jar, the supplied dll and the properties file. Now we are attempting to use this solution on Linux (actually it does run on various other flavours of linux out in the field) - with Ubuntu server mode. After muc...

How do I tell if a file does not exist in bash?

I've used the following script to see if a file exists: #!/bin/bash FILE=$1 if [ -f $FILE ]; then echo "File $FILE exists." else echo "File $FILE does not exist." fi What's the correct syntax to use if I only want to check if the file does not exist? #!/bin/bash FILE=$1 if [ $FILE does not exist ]; then echo "File $FILE do...

Long running java process

Hello. I have inherited a java system which should be run in the background on a Linux server. The directions call for it to be started java -jar start.jar. This seems a little too fragile for my liking. I'd like it to actually run in the background, ideally starting up automatically at boot time. What is the best way to achieve this? ...

Another Hosting Question: Linux, Apache2, PHP5, PostGreSQL 8.3

Hello SO, I'm hoping that someone will be able to recommend a good hosting company that provides the following environment. I know that I could just google for one, but I'm asking here first because I'm looking for someone that has previous experience working with such a company. Linux Box. Apache 2.0. PHP5 (5.2.6 to be exact). PostG...

Is there any linux distribution that comes with python 2.6 yet?

I've heard ubuntu 9.4 will but it's still in alpha. Are there any stable distros that come with python 2.6 or at least don't depend on it so much so reinstalling python won't break anything? ...

Can you prevent a command from going into the bash shell command history?

Is there a way to prevent a command from being added to the bash shell's command history? I would like to be able to prevent certain "dangerous" commands from being added to the history, such as "rm -rf ~/some/dir", so that it is not accessible to me by pressing the up-arrow to reach previous commands. In this way, it would not be poss...

How to join first n lines in a file

I am trying to clean up some data, and I would eventually like to put it in CSV form. I have used some regular expressions to clean it up, but I'm stuck on one step. I would like to replace all but every third newline (\n) with a comma. The data looks like this. field1 field2 field3 field1 field2 field3 etc.. I need it in field1,...

redirect the stdin to come from a different terminal using Bash

Hello. I'm wondering how one would go about redirecting the stdin of a script from the current xterm session i.e. /dev/pts/0 to one that is also running i.e /dev/pts/1 using bash? I have a bash script that opens 3 xterm windows and I want to get input from only one of those windows and I cannot figure out how to do it. Any help is apprec...

How to figure out where to load program data from?

I've got a project written in C++ (with glibmm helping), and I'm using autotools to manage it. The question I have to ask is "HOW ON EARTH DO I FIGURE OUT WHERE TO LOAD STUFF FROM?". While I can find all the guides I want to on autotools, none answer this question. For example, maps go in $DATADIR/maps (usually /usr/[local/]share/myprog...

Create a MySQL table from a list of terms in a text file

Hi, I have a text file with a long list of terms (approx 800) sorted alphabetically in the format: aword bword cword ... I would like to use this file to create a new MySQL table where each term is a field, all with the property VARCHAR(5). Would be best if the fields were inserted in the order in which they appear in the file as I ...

Capturing kill signal in Eclipse RCP application

I've got a command line version of an Eclipse RCP GUI application that can makes use of a lot of the same plugins (this is handy for integration testing). One thing it does is connects to a server, requests stuff and starts an interactive loop. To exit, the user of the GUI app can stop the loop and close the application. In my command l...

How can I get the files stored in host machine?

Hi,I installed a Linux systems on a VMWare which is a guest of Windows XP operating systems. How can I get files stored in XP file systems directly when working in Linux environment? Thanks. ...

dedicated server backup solutions?

Duplicate: http://stackoverflow.com/questions/15208/whats-the-best-linux-backup-solution I am about to purchase a dedicated linux server that has 160GB hard disk and will be used primarily for website hosting. The server doesn't come with backup/restore facilities and wondered if anyone knows how / what is the best (and cheapest)...

How to debug a remote linux binary ?

Here is the situation: I've got a linux binary that is crashing. No log files, trace files, etc. I need to be able to attach a debugger to it (I have the source locally) and track down the error. Whats the easiest, best way to approach this problem? ...

Where to find example source code for a very simple linux shell

This would be great for educational purposes. Also a tutorial on subject would be nice. ...

What is the actual path of actions happening when I press a key on keyboard and it shows on a shell?

I am using a generic usb keyboard, Linux 2.6.27 with gnome desktop, gnome-terminal and bash shell. I am interested to know what happens in the software. How are special characters from my keyboard interpreted with some encoding to characters and where do the character pictures come from? ...