linux

where are the opengl libraries get stored on ubuntu : i need this to mention in my make file

where are the opengl libraries get stored on ubuntu9.10 : i need this to mention in my make file and what are all the link files i need to mention ...

How to capture screenshots from a video clip 50 minutes into the clip and do it fast?

Ok it seems that whenever I tell ffmpeg to take a screen cap half way though the clip (clip can be as long as 10 hours) it uses 100% of 1 cpu core and takes ages… whereas if I let it do a frame at the start it goes real quick, as if it scans though the video to get to the middle instead of just jumping to it! Here is the code im current...

Block anything with a particular file extension - SQUID ACL

Hello, I want to block a particular file extension acl mp3_ext url_regex s-i *.mp3 Where .mp3 is the file extension Thanks Jean ...

Boost::Python: Passing custom arguments to gcc when building python-extension

I need to pass -Wl,-rpath,\$$ORIGIN/lib/ to g++'s linker (reason). Is there a way to pass this argument in Jamroot file? ...

Writing a file quite quick, overwriting the file take much longer...

I have been seeing a few performance problems with a PHP script on a Linux Fedora Core 11 box, so I was running some commands to look for a bottleneck. One thing I noticed was that writing a file is pretty quick: [root@localhost ~]# dd if=/dev/zero of=/root/myGfile bs=1024K count=1000 1000+0 records in 1000+0 records out 1048576000 byte...

which one is recommended: using static lib vs dynamic lib (shared object)

hi, I am working with an application in Linux. It supports both static and dynamic (.so) versions From the performance standpoint, which version should a user use? The application performs computational tasks that require several hours of CPU time. Any other advantage of using one lib over the other? Thanks ...

Is it possible to remotely debug linux code from a non-linux system?

I know it is possible to remotely debug code using gdb's server mode and I know it is possible to debug code that has been cross-compiled for another architecture, but is it possible to go a step further and remotely debug Linux applications from OS X using gdbserver? ...

pid_t doesnt highlight by default in VIM

All datatypes like int,long,char are highlighted automatically as soon as i type them in VIM. But, there are few exceptions like pid_t,mode_t.. How do get them highlighted by default? ...

Maven learning curve & overhead for small/medium projects?

what would be (rough estimation, average, of course) the initial learning and setup curve and subsequent overhead for using Maven for C++/Eclipse/Linux project of small to medium size? We are 4 developers at the beginning of the way. We currently have ~20 native eclipse C++ (CDT) "projects", which we compile interactively. We would like...

What is the best embedded system board/chip combination for video pass through with a HTML overlay.

Hi, I am trying to build a proof of concept for a consumer electronic product that will have a video input & output, but will output with an HTML overlay on part of the screen. Does anyone know of the best board/chip combination that would be good for this application? Since it may become a real product, the lower the price the bett...

Initilisation of application in Linux

Hi all, I am desperately looking for a more or less detailed description of how an application is loaded into memory and then executed in Linux. Basically, I would like to know what information is read from the ELF file, which system calls are executed, such as exec() until this information is stored in the process descriptor. Does any...

Limiting resource usage for debugging an application on linux

I have a C/C++ application that crashes only under heavy loads. I normally use valgrind and gprof to debug memory leaks and profiling issues. Failure rate is like about 100 in a million runs. This is consistent. Rather than reproduce the traffic to my application, can I superficially limit the resources available to the debug build of th...

How do I re-bind a socket in MacOSX/Ubuntu? A second time

I have the following code: if ( ( m_mainSocket = ::socket( PF_INET, SOCK_STREAM, IPPROTO_TCP ) ) < 0 ) { throw Exception( __FILE__, __LINE__ ) << "Unable to create socket"; } int on( 0 ); if ( setsockopt( m_mainSocket, SOL_SOCKET, SO_REUSEADDR, &on, sizeof( on ) ) ) { throw Exception( __FILE__, __LINE__ ) << "Can't make server...

File can be opened only by root user..Wrong permisssions given, i guess....

My program basically runs a executable file with command line arguments. A child process is forked and the output of the child process is taken in the file "filename". The problem is that the file is made and the data is written but it can only be opened by the root user.. How can make it readable to the user who invoked the program? T...

How do I use cygwin to cross compile to linux, when I have an application that needs libX11.so, libGL.so, and libGLU.so?

Will I have to use the crosstool that cygwin provides to make the libX11.so, libGL.so, and libGLU.so libraries using their respective source code? Or do you know where I can find them compiled already for crosstool (I'm new to this cross compilation)? Just for clarification: I'm on a windows 7 machine trying to get my application also t...

linking <iostream.h> in linux using gcc

I'm trying to run my very first c++ program in linux (linux mint 8). I use either gcc or g++, both with the same problem: the compiler does not find the library I am trying to import. I suspect something like I should either copy the iostream.h file (which I don't know where to look for) in the working folder, move my file to compile ...

How can I get the username of the person executing my program?

How can I get the username of the process owner (the user who is executing my program) in C++? ...

Linux shell: poll the keyboard button's state

I have a script that is executed periodically in the background. I want to prevent its execution if the Shift key is pressed. The idea is to poll the keyboard's Shift button state, and if it's pressed — terminate the script immediately. Any ideas? X server is allowed to use: I guess it will help. UPD: I'm currently using this stupid ...

Please recommend a way to deploy into a Linux box in a LAN environment

Hi, have you struggled with Linux deployment before? I need to deploy an application into a dedicated Linux box with no outside network access. The configuration should be as simple as possible, robust for different configurations (missing libraries and build tools) and preferably automatic. Another difficulty I need to consider is that...

One-liner for Setting Global Default Options for Unix/Linux Commands - Best Practices

I consistently run the ruby sudo gem install mygem command with these two options on my production system: sudo gem install mygem --no-ri --no-rdoc I do that to save a little on space and on how long it takes to setup the documentation. Is there a way (other than hardcoding them into the bin/gem file) to say 'always run this command w...