linux

How do i connect to a remote mysql server in .NET?

I am using ubuntu in VMWare. I installed mysql and have it running. I can login with the user root and a password. I have the IP of the VM box. In my code i wrote using MySql.Data; return new MySql.Data.MySqlClient.MySqlConnection("username=root;data source=192.168.100.129,password=xyz"); instead of data source i also tried server. I g...

Bash script and cron anomaly

Hi all, I have a bash script that I am run to check to see if one of my programs has hung, and if it has kill it. The script works fine if ran from the command line, but if I schedule it with cron it does something very strange. Basically the script (below) gets the PID of my program and gets its created date/time from its entry in the ...

Python/Linux - A function callback every time a key is pressed (regardless of which window has focus)?

I want to write a programme (in python) on Linux (Ubuntu Linux 9.10) that will keep track of how many key presses per second/minute I make. This includes normal letter keys, and control/shift/space/etc. Is there some way to hook into X so that I can say "when a key is pressed call this function?". Since I want to have this running in th...

How to build a server that accepts many thousands of persistent network connections?

I am about build a server on linux (I get to pick programming language) that accepts many TCP/IP socket persistent connections from a desktop software. How can this be done cheaply and efficiently? A machine cannot have more than 60000 ports, so if I have to support 600k connections then I will need 10 linux boxes? Since the computatio...

What does this mean in SVN?

svn up svn: Error writing to '.' svn: Can't write to file '.svn/tmp/entries': No space left on device If my box is out of hard drive space, that is impossible, becauase it has 620GB of HD. ...

Borderless windows on Linux...

Is their a standard way to make a particular window borderless on Linux? I believe that the window border is drawn by your window manager, so it may be that I just need to use a particular window manager (that would be find, I'd just need to know which one)... My hope is that all the window managers might follow some standard that allows...

Running genhtml using cygwin Perl.exe in Windows

Hi all: I'm trying to run genhtml using perl.exe from Cygwin in Windows. I have installed cygwin and placed genhtml in the bin directory of cygwin. I went to that directory and used the command line in Windows: perl genhtml abc.dat where abc.dat is the name of the lcov file for genhtml. However I got an error saying: Reading data...

What is the difference between LD_LIBRARY_PATH and -L at link time?

I'm having problems with LD_LIBRARY_PATH at link time (this question has nothing to do with run time). The link line looks like this when I run make (this is a Linux system using g++ version 4.1.x): g++ a.o b.o c.o -o myapp \ -L/long/path/to/libs/ \ -L/another/long/path/ \ -labc -ldef -lghi The -l options reference shared librarie...

Inter-Process Communication Recommendation

I'm searching for a light-weight, fast and easy way to handle Inter Process Communication between some programs on a Linux machine. Currently, I'm thinking Named Pipe, because it's provided by the OS itself. Are there any caveats about the performance or usability? Would Shared Memory be better? I don't think I need a super-complex F...

Linux/Unix: Non-ascii characters in home directory?

I am using getenv("HOME") in C to get the user's home directory in order to read/write a settings file. But is it possible that the home directory filename could contain characters that cannot be represented as an 8 bit char? (for example, unicode or UTF-8 encoded) Does this differ for various varieties of Linux and *BSD? Thanks in adv...

Linux - Any way to get global KeyPresses without xlib's RECORD? (DBus/HAL/etc?)

I was looking at how to capture global kepresses on Ubuntu Linux regardless of what window has focus. And people suggested some programmes to look at. But they all use the RECORD thing in XLib, which is broken in Ubuntu. Is there some other way to capture all the keypresses on Ubuntu? How about using HAL? DBus? ...

Minicom not capturing data correctly

Hi all, I have an issue where i have connected my linux server to a serial port. There is a continous flow of data from serial port which comes through epabx. In Minicom i get first call's data and from second call it goes offline. I dont see any data. Can some one help me on this. ...

Why does ant ignore task jars in $HOME/.ant/lib/

Configuration: I'm running stock Fedora 12 with the ant that Fedora ships: ant-1.7.1-12.fc12 java-1.6.0-openjdk-1.6.0.0-33.b16.fc12 I have svnant.jar and svnClientAdapter.jar in my $HOME/.ant/lib/ I'm using the following build.xml: <project name="antlibtest" default="doEcho"> <taskdef resource="svntask.properties"/> <targ...

How to apply git diff --binary patches without git installed?

I use to git diff to generate patches that can be applied to remote server to update a project. Locally, I run: git diff --no-prefix HEAD~1 HEAD > example.patch Upload example.patch to remote server and run: patch --dry-run -p0 < example.patch If dry-run is successful, I run: patch -p0 < example.patch This works well, except wh...

automate: finding non-used servers from a list of servers

i have access to a few linux clusters at school. sometimes they are busy and sometimes they are not. i usually log into each machine manually, use the "top" command to see if the server is busy (to see if both cores are used). from there, i execute my program to use some servers that are free to run my computations. what i'd like to ...

Force Linux to use only memory over 4G?

I have a Linux device driver that interfaces to a device that, in theory, can perform DMA using 64-bit addresses. I'd like to test to see that this actually works. Is there a simple way that I can force a Linux machine not to use any memory below physical address 4G? It's OK if the kernel image is in low memory; I just want to be able...

Java's 'tnameserv' takes 3+ minutes to be "Ready", why?

I'm trying to help a dev of an app I'd like to use trouble shoot a problem utilizing Corba Server on Linux. I narrowed down the problem to tnameserv taking over 3 minutes to become ready after invocation. What exactly is tnameserv trying to do in those 3 minutes and is there anyway I can speed it up? The app failed because it tried ...

segfault when copying an array to a vector in Linux

Hi, I'm trying to debug a legacy code written for Linux. Sometimes the application gets a segfault when it reaches the memcpy call in the following method: std::vector<uint8> _storage; size_t _wpos; void append(const uint8 *src, size_t cnt) { if (!cnt) return; if (_storage.size() < _wpos + cnt) _storage.resize(_wpos + cnt); ...

JavaFx on Linux 2.4.26/ARM9 Processor/200MHz/32MB RAM

Hi, I am new to JavaFx technology, I would like to know whether I can have JavaFx on a Linux kernel 2.4.26 (no other commercial distribution), it is a touch screen based navigation system runs on a ARM9 processor (200MHz, 32MB RAM). While searching, I found that JavaFx is supported on Linux platforms, but I couldn't find any reference ...

Tcp connections hang on CLOSE_WAIT status.

Client close the socket first, when there is not much data from server, tcp connection shutdown is okay like: FIN --> <-- ACK <-- FIN, ACK ACK --> When the server is busying sending data: FIN --> <-- ACK,PSH RST --> And the server connection comes to CLOSE_WAIT state and hang on there for a long time. What's the problem ...