linux

Developing drivers with no info

How does the open-source/free software community develop drivers for products that offer no documentation? ...

Visibility of template specialization of C++ function

Suppose I have fileA.h which declares a class classA with template function SomeFunc<T>(). This function is implemented directly in the header file (as is usual for template functions). Now I add a specialized implementation of SomeFunc() (like for SomeFunc<int>()) in fileA.C (ie. not in the header file). If I now call SomeFunc<int>() f...

How do I find if my particular computer is going to have problems when I install linux?

The IT lady just gave me a laptop to keep! I've always wanted to have Linux install to play with so the first thing I did is search stackoverflow for Linux Distro suggestions and found it here. However they also mention that you should search around to see if anyone's had any problems with your drivers and that distro. Now all I k...

How to check if a directory exists in a bash shell script

What command can be used to check if a directory does or does not exist, within a bash shell script? ...

Automate firefox with python?

Been scouring the net for something like firewatir but for python. I'm trying to automate firefox on linux. Any suggestions? ...

cross platform IPC

Hi, I'm looking for suggestions on possible IPC mechanisms that are: cross platform (WIN32 and Linux at least) Simple to implement in C++ as well as the most common scripting languages (perl, ruby python etc). Finally, simple to use from a programming point of view! What are my options? I'm programming under Linux, but I'd like what...

How to setup a Subversion (SVN) server on GNU/Linux - Ubuntu

I have a laptop running Ubuntu that I would like to act as a Subversion server. Both for myself to commit to locally, and for others remotely. What are the steps required to get this working? Please include steps to: get and configure Apache, and necessary modules (I know there are other ways to create a SVN server, but I would like it...

Learning kernel hacking and embedded development at home?

I was always attracted to the world of kernel hacking and embedded systems. Has anyone got good tutorials (+easily available hardware) on starting to mess with such stuff? Something like kits for writing drivers etc, which come with good documentation and are affordable? Thanks! ...

jtds No Suitable Driver Exception when running a maven built project

We have a simple spring-hibernate application(console app) where in we have set the classpath in manifest file of the executable jar file. And the app connects to the database using jtds driver, Everything works as expected on windows machine and jdk1.6. But on Linux, the app is unable to find the driver, We are running the program usin...

Is .NET/Mono or Java the better choice for cross-platform development?

How much less libraries are there for Mono than for Java? I lack the overview over both alternatives but I have pretty much freedom of choice for my next project. I'm looking for hard technical facts in the areas of performance (for example, I'm told Java is good for threading, and I hear the runtime code optimization has become very ...

'bad address' error from copy_to_user

I am attempting to copy a custom struct from kernel space to user space. inside user space errno returns 'bad address'. What is the usual cause of a bad address error? if(copy_to_user(info, &kernel_info, sizeof(struct prinfo))) ...

Does every Linux distro ship with gcc/g++ 4.* these days?

I'm considering dumping boost as a dependency... atm the only thing that I really need is shared_ptr<>, and I can get that from std::tr1, available in gcc suite 4.* ...

Difference between binary semaphore and mutex.

Is there any difference between binary semaphore and mutex or they are essentialy same? ...

What does the number in brackets shown after unix command names mean ?

E.g man(1), find(3), updatedb(2) ? what do these numbers mean ? ...

How do you reliably get an IP address via DHCP?

I work with embedded Linux systems that sometimes want to get their IP address from a DHCP server. The DHCP Client client we use (dhcpcd) has limited retry logic. If our device starts up without any DHCP server available and times out, dhcpcd will exit and the device will never get an IP address until it's rebooted with a DHCP server v...

Splitting a file and its lines under Linux/bash

I have a rather large file (150 million lines of 10 chars). I need to split it in 150 files of 2 million lines, with each output line being alternatively the first 5 characters or the last 5 characters of the source line. I could do this in Perl rather quickly, but I was wondering if there was an easy solution using bash. Any ideas? ...

What's the purpose of the GtkWidget.events property for (like) GtkTreeView widgets?

I have a Glade GUI description file with a GtkTreeView in a GtkHBox in a window; and there's a handler for the row_activated signal. Now, Glade has automatically set the "events" property (inherited from GtkWidget) of that treeview to some value (GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_...

What package includes AB the Apache Server Benchmarking Tool in Ubuntu

I'm trying to find ab - Apache HTTP server benchmarking tool for Ubuntu, I'm hoping there's a package I can install for it. I decided I need to do some simple load testing on my applications. ...

How do I run a program as nobody?

I want a user-privileged (not root) process to launch new processes as user "nobody". I've tried a straight call to setuid that fails with -1 EPERM on Ubuntu 8.04: #include <sys/types.h> #include <unistd.h> int main() { setuid(65534); while (1); return 0; } How should I do this instead? ...

Why does sed fail with International characters and how to fix?

GNU sed version 4.1.5 seems to fail with International chars. Here is my input file: Gras Och Stenar Trad - From Moja to Minneapolis DVD [G2007DVD] 7812 | X Gras Och Stenar Trad - From Möja to Minneapolis DVD [G2007DVD] 7812 | Y (Note the umlaut in second line.) And when I do sed 's/.*| //' < in I would expect to see only the X and...