linux

Accessing the proc_dir_entry from proc_fops.open?

I writing a linux kernel module that does some work with /proc... I'm trying to use the new seq methods for returning the data for /proc... Anyhow, after I call proc_create_data() I have a proc_dir_entry (whose ->data member is pointing at my supplied context)... Anyhow, the file_operations structure is also passed and I really need to k...

How do i compile this code to work with LD_PRELOAD on linux?

How do I compile the following code for make it work with LD_PRELOAD?. I managed to compile it w/o errors with 'gcc -m32 -shared code.c' but when I open the program that I'm trying to 'inject' the code into, it says this: 'symbol lookup error: ./fps.so: undefined symbol: clock_gettime' #include<unistd.h> #include<time.h> #define BUSY_WA...

Capturing Keystrokes in GNU/Linux in C

If I am working in an application and I press key from keyboard, how can I capture that key (or string), including the source application's name, in C, under GNU/LINUX, in userland, without X11 :) Thanks. ...

Best compiled language for Mac OS X and Linux compatibility

We need to write some software that will compile and run on both an Mac OS X server and Ubuntu. We would love to use Objective-C with all of its Cocoa goodness, however the GNUstep implementations of the parts we are using are broken (in the latest Ubuntu package anyway.) In light of this should we use C++ (I would really rather not), C...

Is there any 2D renderer library with complete fixed point support for embedded linux?

Hi SO Friends, I am working on embedded linux, Is there any open source 2D renderer available which can draw on memory, scanline based, complete fixed-point support. I work in c or cpp programming language. I know one with which satisfy my all needs that is, Google Skia which google uses in android and chrome, But I found it without...

How to make ARM9 custom device emulator?

Hi SO Friends, I am working on ARM 9 processor with 266 Mhz with fpu support and 32 MB RAM, I run linux on it.I want to emulate it on pc ( I have both linux and windows availabe on pc ). I want to profile my cycle counts, run my cross-compiled executables directly in emulator. Is there any opensource project available to create emulator...

what are active linux / embedded linux forums available online ?

Hi friends, what are other active linux / embedded linux forums available online ? Thanks and regards, Sunny. ...

How do I reattach and close multiple screen sessions from a list

I am an Ubuntu 9.04 user. Given a list of screen sessions such as the following: 9076.pts-30.moe (09/27/2009 11:30:08 PM) (Attached) 8778.pts-24.moe (09/27/2009 11:29:46 PM) (Detached) 8674.pts-0.moe (09/27/2009 11:29:25 PM) (Attached) 22649.pts-28.moe (09/27/2009 11:51:46 AM) (Detached) 22543.pts-24.moe (09/27/2009 11:50:56 AM) (Detac...

What are some Linux-compatible MATLAB substitutes?

It seems you need a license to use MATLAB. I do not have one so I was wondering if there was some highly-compatible substitute for it in Linux. ...

submitting multiple files from shell script through standard input

I have a program which reads from standard input when invoked from the command line. Normally the user would enter some information, press C-d on a new line to signal end of file, and the program would process the file. Then the user would again be prompted, would enter some more text, and again press C-d to signal the end of the second ...

How do I find the size of mounted USB flash drive in C?

I have a flash drive device (/dev/sda1) mounted to /mnt on an embedded linux system (kernel 2.6.23). Using C how do I work out the size of the drive? ...

How to find the culprit module or script on huge Apache/PHP resident memory usage ?

System: Centos 5.3 x86_64, with Apache 2.2 and PHP 5.2 as module (with mysql and oracle connectors) How to debug memory usage / leaks ? dmalloc ? Valgrind ? auto_prepend_file ? We're looking at 500+ MB VSZ and 50+ MB RSS for example, but it can be somewhat higher. And as the instances add up, we end up needing much more memory than wit...

Run a process on Linux remotely from a Windows machine

I would like to be able to run a process that exists on a Linux machine remotely from a JAVA application running on a Windows machine. What is the best way to do this? Or an online resource that might be of help to me? Thanks very much. ...

Hierarchical ldd(1)

Due to using Gentoo, it often happens that after an update programs are linked against old versions of libraries. Normally, revdep-rebuild helps resolving that, but this time it's a dependency of a python library and python-updater won't pick it up. Is there a "hierarchical" variant of ldd which shows me what shared library depends on w...

Remote Java development with Eclipse (or something else)?

I'm fairly new to Java development, and people have been suggesting I use Eclipse as an IDE for the work I'm doing. My code lives on a linux box (running Ubuntu of some fairly recent version), but I use a MacBook as my main computer. I've been ssh'ing into the linux box to work on the non-Java code, simply using vim and have done the sam...

linux id and setuid/setgid

Is there a simple way to see the real,effective and saved UID and GID for a running process? ...

linux id no_squash_root

The linux 'id' command reports on groups= that process belongs to. When and how does this get filled in? I'm writing an suid/sgid program and it seems that the groups never get filled in for my process and perhaps just coincidentially, but the permissions inregards to an nfs mounted file system don't work correctly for it either (by th...

Hacking USB devices: Any programs out there?

I would like to (A) run something under windows to eavesdrop on the communication between a USB device and windows, so I can then (B) write something to communicate with the USB device, under Linux. Can anybody recommend a program to do (A)? ...

shell script to compare files and print formatted output

I'm trying to write a shell script which will compare two files, and if there are no differences between then, it will indicate that there was a success, and if there are differences, it will indicate that there was a failure, and print the results. Here's what I have so far: result = $(diff -u file1 file2) if [ $result = "" ]; then ...

How do I specify environment variables when making a system call in PHP?

I'd like to call system("foo") in PHP but also specify environment variables that "foo" will have access to when it runs. This is under Linux. Any simple trick for that? ...