linux

Porting Unix ada app to Linux: Seg fault before program begins.

I am an intern who was offered the task of porting a test application from Solaris to Red Hat. The application is written in Ada. It works just fine on the Unix side. I compiled it on the linux side, but now it is giving me a seg fault. I ran the debugger to see where the fault was and got this: Warning: In non-Ada task, selecting an A...

Determining the HID Path for USB HID device using libhid on Linux

I’m interested in using libhid to access a custom HID device that we are developing on a PIC microcontroller. I have been able to successfully get the test_libhid code to run. The instructions for reading and writing to devices using this library are provided as comments in the test_libhid code. I have attempted to follow the document...

Compiling C++ program on Fedora

Hi there I'm having problems compiling an open source C++ project on Fedora. When I download and run the ./configure I eventually end up with.... . . . checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate ./configure: line 15513: AX_CFLAGS_WARN_ALL: command not fou...

Linux Firefox Spaces Things Differently

I am having trouble with Linux spacing of things, in multiple APIs. Thoughts? On the linked page below, there is a button with a magnifying glass on the map - in the upper left corner - directly to the right of the Home Map button. In Firefox 3 on Linux, this button appears to be on top of the Home Map button. On a Mac or Windows machi...

Detect in C if outputting to a terminal

I'm writing a C program for OS X and Linux, and I want to tweak the output based on whether or not it's going to a terminal. I know we've covered how to do this in a shell script, e.g. here: http://stackoverflow.com/questions/911816/detecting-the-output-stream-type-of-a-shell-script But how do I do it in a C program? ...

Running a webserver on a virtual machine (VirtualBox) - Pros/Cons in terms of security

I want to sharpen my skills in terms of gnu/linux and get a better understanding of how servers work. So I thought I'd set up an apache webserver with ftp, ssh, svn etc. Since I use Adobe products everyday in my line of work installing a linux dist. straight on my machine isn't an option. Yes, I could probably do a dualboot with linux an...

ios::nocreate error while compiling a C++ code

While, compiling a package, written in C++ on RHEL 5.0. I am getting the following error. > error: nocreate is not a member of std::ios The source-code corresponds to: ifstream tempStr(argv[4],ios::in|ios::nocreate); I have tried #g++ -O -Wno-deprecated <file.cpp> -o <file> as well as: #g++ -O -o <file> Please sugg...

Linux Tool To Parse CSV files

Is anyone aware of a standalone command line program that can be used to parse CSV files? To do things like: csvparse -c 2,5,6 filename to extract fields from columns 2 5 and 6 from all rows. It should be able to handle the csv file format: http://tools.ietf.org/html/rfc4180 which means quoting fields and escaping inner quotes as app...

how to get group score in Linux HA?

I can get resource score with something like this: ptest -L -s -VV 2>&1 | grep "_color: resource.node" but for groups this seems to get me "0" even if a resource in a group has failed enough times to get the group move to another node. How can I get score for groups? Thanks! ...

unlocked_ioctl vs normal ioctl

In my driver's file_operations structure, I have: struct file_operations Fops = { read: device_read, write: device_write, unlocked_ioctl: device_ioctl, ... }; I.e. there is no ioctl field used. Is this sufficient to avoid Big Kernel Lock and enter into device_ioctl() without any synchronization? Or do I have to change i...

__udivdi3 undefined. Howto find code?

Compiling a kernel module on 32-Bit Linux kernel results in "__udivdi3" [mymodule.ko] undefined! "__umoddi3" [mymodule.ko] undefined! Everything is fine on 64-bit systems. As far as I know, the reason for this is that 64-bit integer division and modulo are not supported inside a 32-bit Linux kernel. How to I find the code issueing th...

linq to entity Contains() and nested queries

Hello ! i've a trouble with linq, i'll explain on example : i have a database table called Employee which got FirstName and LastName columns, and a method to search employees which gets a nameList list as argument, the elements in this list are names formatted like this one "Fred Burn", or this1 "Grim Reaper", already tryed these appro...

[BASH] start gFTP with specific size/maximized

I'm trying to build a closed loop ftp client, currently using slax. The idea is that the user follows a menu to choose a site and then the system starts gFTP full screen (1024x768 or 1280x1024) and when this exits it closes X windows and logs off. Now all I need is making gFTP start with a prescribed size and its done. I've tried to c...

Do I have to pthread_join each thread I create?

From pthread_join() man page: When a joinable thread terminates, its memory resources (thread descriptor and stack) are not deallocated until thread performs pthread_join on it. Therefore, pthread_join must be called once for each joinable thread created to avoid memory leaks. Does it mean I need to join each thread I create to pre...

Automated deployment of files to multiple Macs

We have a set of Mac machines (mostly PPC) that are used for running Java applications for experiments. The applications consist of folders with a bunch of jar files, some documentation, and some shell scripts. I'd like to be able to push out new version of our experiments to a directory on one Linux server, and then instruct the Macs t...

How to use a linux command for set of files

Hi all, I'm looking for a solution to convert a set of files using the terminal and the command "convert" under linux. I can use "convert" for each file: convert -quality 85 file.jpg file.jpg But i'm looking for something like: for each jpg do convert -quality 85 $file $file end Can someone tell me, which command i can use? ...

Postfix alias for all user names?

Is there something you can put in /etc/aliases that will make postfix send all mail to one user, no matter what the username? ...

GUI Development in Linux

Hi, Wondering what are tools out there and which is better to use in GUI development that supports ARM and X86 arch applications. thanks in advance, T3nG ...

linux taking a screenshot of a workspace

Hi, Is it possible in linux to take a screenshot of a workspace while being in another one ? Thanks in advance Blizz ...

Which linux server distro to use for tomcat?

ubuntu 9.04, fedora 11, redhat... what are the differences from a web server/development standpoint? ...