linux

How to import bookmarks from users web browsers using python?

I am working on an RSS Reader type program and I would like it to be able to automatically import RSS feeds from the users browser bookmarks. I assume different browsers use different methods to store bookmarks. Is there any library out there just for this purpose? I only need it to work on Linux so I don't care about Windows or Mac o...

Linux assembler error "impossible constraint in ‘asm’"

I'm starting with assembler under Linux. I have saved the following code as testasm.c and compiled it with: gcc testasm.c -otestasm The compiler replies: "impossible constraint in ‘asm’". #include <stdio.h> int main(void) { int foo=10,bar=15; __asm__ __volatile__ ("addl %%ebx,%%eax" : "=eax"(foo) : "eax"(foo), "ebx"(...

erlang: UNIX domain socket support?

Is there a way to access UNIX domain sockets (e.g. /var/run/dbus/system_bus_socket ) directly from Erlang without resorting to a third-party driver? ...

UNIX domain socket: is there such a thing as a "busy" signal?

Can a Client pushing data through a UNIX domain socket ( AF_UNIX type ) be signaled busy if the receiving end cannot cope with the load? OR Must there be a Client-Server protocol on top of the socket to handle flow control? ...

How to learn about building tools in linux ?

Hi SO Friends, I am writing code in embedded linux since last couple of years, I use make utility to build my code and I am not at all an advance user of it. But now, It is necessary to have better compilation, cross-compilation knowledge, so that I can easily port my code to newer processors. So I want to learn that which different to...

Setting thread priority in Linux with Boost

The Boost Libraries don't seem to have a device for setting a thread's priority. Would this be the best code to use on Linux or is there a better method? boost::thread myThread( MyFunction() ); struct sched_param param; param.sched_priority = 90; pthread_attr_setschedparam( myThread.native_handle(), SCHED_RR, &param); I don't have al...

Linux runtime linker error

Hi All - I'm working though the First Steps tutorial on the POCO Project site, and I've successfully built the library (Debian Linux, 2.6.26, gcc 4.3.2) under my home directory ~/Development/POCO with the shared libraries located in ~/Development/POCO/lib/Linux/x86_64/lib My problem is that any application I build that depends on t...

Linux: how much data can be passed as command line arguments?

How many bytes can be sent as command-line argument when spawning a process under Linux? ...

Is there a way to determine the amount of free video RAM in Linux?

We believe that we are running out of video RAM in a Linux based system that we are working on. We are seeing video & graphic drivers segment faulting with allocation related errors. Are they any tools or techniques that we can use to determine how much video ram is free at any given point in time? Either an external application or so...

TCP flags present in the header

Hi, on my ubuntu 9.04 the /usr/include/netinet/tcp.h defines the tcp header as follows struct tcphdr { u_int16_t source; u_int16_t dest; u_int32_t seq; u_int32_t ack_seq; # if __BYTE_ORDER == __LITTLE_ENDIAN u_int16_t res1:4; u_int16_t doff:4; u_int16_t fin:1; u_int16_t syn:1; u_int16_t rst:1; ...

How i can, on some global keystroke, paste some text to current active application in linux with Python or C++

I want to write app, which will work like a daemon and on some global keystroke paste some text to current active application (text editor, browser, jabber client) I think i will need to use some low level xserver api. How i can do this with Python or C++ ? ...

How to make programs like nano/pico in linux

I was wondering how to make a program that can output to every line of the console and not just output a line to be tacked on to the bottom. How can I get control of the whole console like that so I could write console based apps? ...

How to analyse a crash dump file using GDB

I have a server application running under Cent OS. The server answers many requests per second but it repeatedly crashes after each hour or so and creates a crash dump file. The situation is really bad and I need to find out the crash cause as soon as possible. I suspect that the problem is a concurrency problem but I'm not sure. I have...

How to make python window run as "Always On Top"?

I am running a little program in python that launches a small window that needs to stay on top of all the other windows. I believe this is OS specific, how is it done in GNU-Linux with GNOME? [Update - Solution for Windows] Lovely, I think I got it working. I am using Python 2.5.4 with Pygame 1.9.1 in Eclipse on Vista 64-bit. Thus, thi...

Loop SQlite3 database continuously, when query found run script for first 3

I have a SQlite database gets populated when ever someone adds a filename and dir to it, then I want the script to read the newest 3 entries (done with the "LIMIT 3") then I want this script to take those 3 entries and start the "script1.sh" for each of them, then once the script1 has finished one of the 3, I want it to look back into th...

Is there an easy way to install RMagick?

I am trying to install RMagick on my slicehost(Linux Hardy) instead of compile from source, here is what I did: $ sudo aptitude install -y imagemagick $ sudo aptitude install -y libmagick9-dev $ sudo gem install rmagick After installed, it reads GIF with no problem, however for JPEG and PNG, I keep getting this error: Magick::ImageMa...

How to run Valgrind in parallel with our process so its performance doesn't decrease too much?

Hi, I need to use Valgrind to detect any memory access violations made in a server application. The server creates many threads. I suspect that there is a racing condition that causes the server to crash every 1 hour or so. We used Valgrind to analyze its memory usage but the server process' speed decreased dramatically. The server's sp...

shell script printing contents of variable containing output of a command removes newline characters

I'm writing a shell script which will store the output of a command in a variable, process the output, and later echo the results. Here's what I've got: stuff=$(diff -u pens tape) # process the output echo $stuff The problem is, the output I get from running the script is this: --- pens 2009-09-27 10:29:06.000000000 -0400 +++ tape 20...

ImageMagick convert error (Wrong JPEG library version: library is 62, caller expects 70)

Looks like it is reading the wrong jpeg ibrary, but I have jpeg 7 installed. How do i tell ImageMagick to look up the right JPEG library version(I don't care 62 or 70 as long as it works). here is the instruction i am following ...

how to read from and write to a serial port (ttys0) from another pc via ethernet (eth0) on Ubuntu/Debian???

Well, there are two pc's connected via Wi-Fi and one of those (let's call it A) has a serial port printer (in ttys0) and a measure serial port device (in ttys1) connected too. So B needs to read some values from the mesure device connected on A and then write to the printer connected on A using a network connection. ...