linux

Need Linux cmd-line app to compare binary files and exit on 1st mis-match...

Is there a Linux command-line app which will compare two binary files and exit on the first mis-match? cmp doesn't seem to have the quit opition. ...

How to setup personal build in CDT eclipse over linux?

Hi, I started using eclipse CDT over Linux for some college exercises. I want the build function to compile without linking? Can i have the build to be as simple as: gcc -c -Wall ? Thanks ...

Is there a way to programatically control harddrive activity lights on linux?

Hey all, Just like in the main question, is there a way to do this? (Other than inducing a high io load) Maybe some facility deep down in the kernel that controls this? I'm looking to write a little script to identify failed drives in my software raid array. (Blinking the activity light in a certain repeating pattern, etc.) I read abo...

html to image using PHP

Hi, I am looking for best solution to convert HTML to Image using PHP (on LINUX), please post your suggestions .... ...

How do I interpret X-program backtrace report?

I'm playing with X-development. I've got a basic proto-WM going that works for a while and then produces these errors after a fairly random time. [edit] Locking assertion failure. Backtrace: #0 /usr/lib/libxcb-xlib.so.0 [0x7f71dcf9a9ac] #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x24) [0x7f71dcf9aa54] #2 /usr/lib/libX11.so.6 [0x7f71...

How to setup an open toolchain for iphone 4.x development on ubuntu?

It would be great to develop iphone software on ubuntu. ...

logical time versus physical time in ubuntu linux

Hi, i am measuring physical time between two events like this: #include <time.h> #include <sys/time.h> timeval wall_time0; timeval wall_time1; // start of period measurement gettimeofday( &wall_time0 , 0); ...stuff happening // end of period measurement gettimeofday( &wall_time1 , 0); return ( ( wall_time1.tv_sec - wall_time0.tv_...

Python and Postgres on Red Hat

I've been having trouble installing psycopg2 on linux. I receive the following error when I try to import psycopg2. Python 2.6.4 (r264:75706, Nov 19 2009, 14:52:22) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import psycopg2 Traceback (most recent call last...

Design for remote debugging and status checking

I have an application that runs on a headless linux box (a SheevaPlug, to be precise). (It collects data from a weather station and sends it to a database, in case you're wondering.) I'm having a hard time debugging problems with the application because I can only SSH into the box or view it on the network (thanks to Samba). I could log...

Shortcut with meta-shift key doesn't work in emacs

Hi,I can't use any shortcut that has meta-shift (alt and shift) in it because ubuntu will treat it as "change keyboard layout" shortcut (I map it to alt-shift since I use the same shortcut in windows) as soon as I press m-s. In windows change keyboard layout shortcut doesn't register until you release the key so any shortcut with m-s is ...

Know more about shared libraries of a executable file.

Is there a way to know what shared libraries are used from a executable file ? From DivFix++ for example: $ file DivFix++ DivFix++: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped ...

tkFileDialog.askopenfilename How to specify a different drive?

I'm using "tkFileDialog.askopenfilename" to get a file name variable. I know that I can set the "initialdir" option, but not everyone who uses the program will have the target file on the same drive. For example: the file could be located on the C:, D:, E: etc... I don't see a way to view available drives with the dialog box they have op...

Is anyone doing professional flash / flex / actionscript development on a linux platform? Please share setups if you are.

I've used axdt ( http://new.axdt.org/ ) with Eclipse. I've read about fdt on on linux ( http://www.brighthub.com/hubfolio/matthew-casperson/articles/73648.aspx ). FDT is a commercial package that I wouldn't mind paying for if it officially supported linux. Right now I'm using vim with the command line tools, and I'm not really satisfied ...

Is there a date/time format that does not have spaces?

I have a CGI script that will convert a given string to a date/time using the unix date command. I'm looking for a format that can easily be embedded to a URL without the need for escaping with a %20. The client that is building the date/time into the URL does not have a conversion to unix time (seconds since epoch) and does not have a...

tcp message incomplete

hi, I'm using html5 websockets, dev.w3.org/html5/websockets/, and php socket functions, php.net/manual/en/ref.sockets.php. My problem is that messages sent from the client using websockets to the server are being truncated to a maximum of 1449 bytes. When I set net.ipv4.tcp_timestamps to 0, a couple extra bytes are received. I am using ...

Giving a unix process exclusive RW access to a directory

Is there a way to sandbox a linux process into a certain directory, and give this process exclusive rw access to this dir? For example, create a temporary working directory, and start e.g. python or another scripting tool in such a way that it can only write in this directory, without limiting too much of its functionality. And also that...

Getting actual keycode for ibus settings

Hi, I am able to read the ibus keys configuration to know the keys that trigger an engine ON/OFF (accessible via the property "general/hotkey" and "trigger"). that is all good but that returns lists of strings (gchar*) which combination switches ON/OFF the IME (ex: ["SHIFT+CTRL+F9", "SHIFT+UNDERSCORE",...]). How can I get the correspon...

posting data with curl_exec on background returns 0's

I'm executing a curl command from php in background, that uses curl_exec to retrieve some data and something is wrong... when i try to pass post data to curl_exec script: exec('curl --data "'.$post_string.'" '.$post_url); all fine, i get a 200 response, script finishes successfully same command, but with "> /dev/null &": exec('cur...

Why isn't this .htaccess file working?

Recently, my website was hammered with thousands of POST requests from various bots. Instead of taking the approach of blocking these bots based on their user agent, I've decided to find a way to block all POST requests sent to my website and allow all POST requests from within my website. I came up with the following: RewriteEngine ...

Is there a better mplayer command line interface?

I generally prefer to do things on the command line when I can. Mplayer is a great tool for playing all sorts of media, but the command line interface sucks. Some things I'd like to see in a CLI wrapper would include: Clean output - easy to understand, not cluttered by a bunch of stuff that's irrelevant in day-to-day use ID3 informatio...