What is recommended way to keep a user configuration data in Unix/Linux? My programming language is C++. Configuration data will be kept in XML/text/binary format, I have no problem with handling such files. I want to know where can I keep them. For example, in the Windows OS configuration data may be kept in the Registry (old way) or in
Error compiling BASIC “libnotify” code
Compiling the code gives me “undefined reference to” error: I took the code from this blog. Answer Sounds like you forgot to pass -lnotify to actually link against libnotify.
Installing programs in different Linux machines with very limited access
I have to log into Linux servers from different customers and use there essential tools like SVN, etc. Most of the times I get no root access, and usually the administrator is on holidays 🙂 so I have to get the way to use this tools there. Sometimes this is very straightforward process, just compile the code. But in some
Facing an error “*** glibc detected *** free(): invalid next size (fast)”
Please see MSO question A long list of possible duplicates — C memory allocation and overrunning bounds for information about closely related questions. Developer environment: CentOS 4.7, Kdevelop 3.1.1, gcc 3.4.6 I run a Java test client that loads a C++ shared library using JNI. There are three components in my application, Java client C++ shared library which acts as a
Capturing high-quality(300dpi) screenshots of QT-based app in Linux
I need to make a screenshot of my form created in QT designer. There are numerous approaches to do screenshots(gimp, import, etc..) but alt of them deal with same dpi as on my monitor(about 100dpi). This is quite enough to publish on web site, but 300dpi images are required for paper publications. Are there any ways to create 300dpi screenshots?
Code Signing for Linux
Are there any providers offering code signing certificates for (Red Hat Enterprise) Linux? I see a lot of buzz for Microsoft-land, but not much for Linux. I know how to generate my own certificates and embed a public certificate into my executable. I’m specifically looking for ways to get the certificate signed by a trusted CA. The target system is
Get IP address of an interface on Linux
How can I get the IPv4 address of an interface on Linux from C code? For example, I’d like to get the IP address (if any) assigned to eth0. Answer Try this: The code sample is taken from here.
Get notified about network interface change on Linux
I need a way to notify my user space app when a network interface is enabled or disabled. I’m hoping to do this without resorting to polling. Does the kernel offer some sort of hook for triggering callback functions when network-related events occur? Answer I believe the netlink (man 7 netlink) facility provides information about network interfaces via the NETLINK_ROUTE
Postgres pg_dump dumps database in a different order every time
I am writing a PHP script (which also uses linux bash commands) which will run through test cases by doing the following: I am using a PostgreSQL database (8.4.2)… 1.) Create a DB 2.) Modify the DB 3.) Store a database dump of the DB (pg_dump) 4.) Do regression testing by doing steps 1.) and 2.), and then take another
How can I have a post-commit hook that is only called when commits are made to TRUNK?
I have a repository that has the following directories: branches tags trunk The trunk directory contains the main line of development. I have created a post-commit hook script for the repository that updates a working copy (of trunk) when a user commits back to repository. It looks something like this: I’ve just created a branch of the code as I’m