linux

Capturing Audio through Linux in J2ME WTK Emulator

Is it possible to capture audio in the J2ME WTK emulator on a Linux platform? Has anyone on this forum succeeded in doing so? ...

Camera output, while performing functions, SLOW converting from linux to windows (C++)

I know this is probably general, please bear with me! We've got a program that uses a web camera and, based on what the camera is seeing, runs certain functions. The program runs excellently on MacOS and Linux, and it compiles and it does run on Windows, but a couple of the functions, (including one that iterates pixel by pixel, 640x480...

Getting Expect to interact until the program terminates

I am using the linux too Expect and I have to interact with the shell. However, it's not a true interact, I just want to see what's going on. How can I get Expect to exit after the interacting program exits? ...

ubuntu and Virtual PC

Is there a way to install ubuntu 7.04-8.04 in VPC 2007? I can't do it because it just goes black. :-( ...

stdout thread-safe in C on Linux?

Is writing to stdout using printf thread-safe on Linux? What about using the lower-level write command? ...

Detecting changes to an open file

Suppose I have an open file. How can I detect when the file is changed by another program in the background. Some text editors can detect and update the open file if it is changed by another process. I'm specifically asking for this with C under Linux(this seems to be OS dependent). ...

an htop-like tool to display disk activity in linux

I am looking for a linux command-line tool that would report the disk IO activity. Something similar to htop would be really cool.Has someone heard of something like that? Thanks! EDIT: for the vote down:about not being programming -related. I happen to need to check if my code is actually behaving as I expect which involves looking at...

How can I listen for 'usb device inserted' events in Linux, in Python?

I'd like to write a Python script for Amarok in Linux to automatically copy the stackoverflow podcast to my player. When I plug in the player, it would mount the drive, copy any pending podcasts, and eject the player. How can I listen for the "plugged in" event? I have looked through hald but couldn't find a good example. ...

Ghostscript: Spliting large PDF causes a "pdfmark destination page" error

I am trying to split a PDF into 2 smaller PDF's using gs (Ghostscript version 8.62 on Debian Lenny). I only have Debian Linux on hand, so please don't offer Windows or Mac solutions. When specifying -dLastPage=740, I receive the error: GPL Ghostscript 8.62: ERROR: A pdfmark destination page 1203 points beyond the last page 740. I ha...

How do I make cron run something every "N"th minute, where n % 5 == 1?

I know that I can have something run every five minutes in cron with a line like: */5 * * * * /my/script What if I don't want it running at 12:00, 12:05, 12:10, but rather at 12:01, 12:06, 12:11, etc? I guess I can do this: 1,6,11,16,21,26,31,36,41,46,51,56 * * * * /my/script ...but that's ugly. Is there a more elegant way to do ...

Linux command line global search and replace

I'm trying to search and replace a string in all files matched by grep on a linux machine. I've got some pieces of what I want to do, but I'm unsure how best to string them all together. grep -n 'foo' * will give me output in the form: [filename]:[line number]:[text] For each file returned by grep, I'd like replace "foo" with "bar" ...

What is ultimately a time_t typedef to?

I searched in linux box and saw it being typedef to typedef __time_t time_t; But could not find the __time_t definition. ...

PostgreSQL recompile needed after upgrading to a quad-core CPU?

I recently upgraded my server running CentOS 5.0 to a quad-core CPU from a dual-core CPU. Do I need a recompile to make use of the added cores? PostgreSQL was installed by compiling from source. EDIT: The upgrade was from an Intel Xeon 5130 to an Intel Xeon 5345. ...

Use Bundle-NativeCode on Linux does not work

Hi, i creat a plugin wich includes the folder structure src native/so/libsystemcommand.so META-INF/MANIFEST.MF The manifest include the command Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Commands Plug-in Bundle-SymbolicName: de.system.commands;singleton:=true Bundle-Version: 1.0.0 Bundle-Activator: de.system.comm...

Help me make my windows cmd.exe console work more like a Linux terminal

The windows terminal (the user-interface around text-applications like cmd.exe) really sucks. There is so much that the Unix-style terminals do that the windows terminal apparently cannot do, for example what if you want to re-size the window in both dimensions by dragging the border. The Windows terminal only allows you to change it's ...

Ffmpeg and Xing header - iTunes issue and Duration issue

Hello all, I extract the audio from a bunch of flv files as an MP3. This works great: ffmpeg -i video.flv -vn -acodec copy audio.mp3 However, some audio that I extract have durations that are longer than they should be and some MP3 files keep looping the audio! Also in some audio players like WMP, the seekbar gets stuck at one point....

Can I recover a file in linux which i accidentally did an "rm" on?

Do you know of any tools/commands by which I recover files which I accidentally removed? ...

Qt Toolbar button icons show in Windows after MinGW build, but disappear after being built with g++

I'm developing a PHP IDE similar to Eclipse, but much more light weight. For the interface I'm using Qt 4.4.3 which seems to be working great. I've primarily been using my Windows machine to do most of the coding in Eclipse CDT and using MinGW as the compiler. A couple of days ago I took the code an put it on my Eee PC with Linux just ...

ACL for a network device

Hi, I need to implement ACL based authentication mechanism for a device. This device can be accessed through various interfaces like web pages, TL1 (basically through some command prompt) etc. I need to keep ACL logic centralized so that request from any interface can be authenticated. ACL logic would basically check whether the logg...

How do *nix pseudo-terminals work ? What's the master/slave channel ?

I want to write a simple, dumb, X terminal emulator in C on a Linux system. At first, I just thought I would have to popen a shell and display its output. I checked xterm and rxvt code, and it looks a bit more complicated. First, I have to open a pseudo-terminal with openpty. So I look at the man page and see that openpty fills 2 file...