linux

Where is the code for copy and paste functionality located in Linux?

Hi, I'm just wondering where in the source files of a linux kernel I would be able to find the code which takes care of copying and pasting? I'm interested in modifying it but don't know where to look to find it. Thanks ...

How can I record an rtsp video stream to a file from a linux command line?

I have a net cam which provides a rtsp stream via the default 554 port. I can view the stream perfectly using VLC (GUI mode) when I open rtsp://192.168.1.7/1234 (the "1234" is the [default] password the device requires to be in the url, for those who want to restrict access to the stream) What I need is to have a cli-only linux box re...

Can not insert UTF8 to Database MySQL in Linux

When create table, I have setted charset = utf8. I create 1 store procedure to insert data to database. When insert data UTF8 to Database on Window, it works OK.(Display data correctly) But it doesnot work in Linux.(Display data not correctly) The strange thing is insert UTF8 work fine in window, but when i deploy MySQL in linux, wh...

How to update document's metadata in Sharepoint? (Linux -> WebServices -> Sharepoint)

Hi I managed to upload a file (crud PUT khe khe :) from Linux to Sharepoint. The absolute path of the file is: http://myhost/mysite/reports/2010-04-13/file.txt Now, I'm trying to add some metadata to the file: from suds.transport.https import WindowsHttpAuthenticated url='http://myhost/mysite/_vti_bin/lists.asmx?WSDL' n=WindowsHttpA...

Difference in css-positioning in windows and linux

I have a problem with rendering my html page by the same browsers in different OS. There are 3 spans and position of each span is corrected through css(position:relative). But I have found out that the page that looks correct in firefox under Linux, shows not right at the same firefox(3.5.7) under Windows OS. Linux(Left - How it shoul...

Proper pidfile usage

I am unclear on the need and the usage of a pid-file and I wanted to know what is the correct usage of a pidfile and what are the best practices surrounding it. ...

get a list of function names in a shell script

I have a Bourne Shell script that has several functions in it, and allows to be called in the following way: my.sh <func_name> <param1> <param2> Inside func_name() will be called with param1 and param2. I want to create a "help" function that would just list all available functions, even without parameters. The question: how do I ge...

Extraneous Library Linkage

I have a question which may be somewhat silly because I'm pretty sure I may know the answer already. Suppose you have static library A, and dynamic shared object library B and your program C under linux. Suppose that library A calls functions from library B and your program calls functions from library A. Now suppose that all functions ...

Generate an image / thumbnail of a webpage using X/Gui-less linux

There exists numerous solutions on generating a thumbnail or an image preview of a webpage. Some of these solutions are webs-based like websnapshots, windows libraries such as PHP's imagegrabscreen (only works on windows), and KDE's wkhtml. Many more do exist. However, I'm looking for a GUI-less solution. Something I can create an API a...

what is the difference between "./somescript.sh" and ". ./somescript.sh"

This question may sounds silly to you. Today I was following some instructions to install a software in Linux. There was a script that needs to be run first. It set some environment variables. The instruction told me to execute . ./setup.sh, but I made a mistake by executing ./setup.sh. So the env was not set. Finally I noticed this an...

Ideal Multi-Developer Lamp Stack?

I would like to build an 'ideal' lamp development stack. Dual Server (Virtualised, ESX) Apache / PHP on one, Databases (MySQL, PgSQL, etc) on the other. User (Developer) Manageable mini environments, or instance. Each developer instance shares the top level config (available modules and default config etc) A developer should have c...

ssh-keygen accepting stdin

I am trying to call ssh-keygen using a variable through bash as an input instead of a file to get a fingerprint of a public key. I am aware that I could use a temp file to get around this issue, but for reasons out of scope of this question, I do not want to. This method does not work as it says the key file is invalid (it's correct fo...

Installing a Python program on Linux

I wrote a Python program. I would like to add to it an installation script that will set up everything necessary - like desktop icon, entry in the menu, home directory file, etc. I'm working on Linux (ubuntu). When a Python program is installed, what needs to happen in general? I know that it probably depends on the nature of the progr...

How to include clean target in makefile

I have a makefile that looks like this CXX = g++ -O2 -Wall all: code1 code2 code1: code1.cc utilities.cc $(CXX) $^ -o $@ code2: code2.cc utilities.cc $(CXX) $^ -o $@ What I want to do next is to include 'clean target' so that every time I run 'make' it will automatically delete the existing binary files of code1 and code2 bef...

[linux] flock locking order?

hi all im using a simple test script from http://www.tuxradar.com/practicalphp/8/11/0 like this <?php $fp = fopen("foo.txt", "w"); if (flock($fp, LOCK_EX)) { print "Got lock!\n"; sleep(10); flock($fp, LOCK_UN); } i opened 5 shell's and executed the script one after the other the scripts block until the lock is free'ed and...

Shell script to import mysql dump file.

Hi all, I'm new to mysql. My requirement is to create a shell script to import a sql dump file into mysql in linux and this script should be called by java program for the restoration to take on a button click. Please advice me on this. Regards, Chandu. ...

GUI Application on Windows and Linux

Hello, I would like to export the Bash Shell Automation Script Project to a GUI Project which can run in both Windows and Linux. Which Programming Language would be better suited for this ? Any suggestion would be really helpful. Thanks Kiran ...

How to enable 'wget' to download the whole content of HTML with Javascript

I have a site which I want to download using Unix wget. If you look at the source code and content of the file it contain section called SUMMARY. However after issuing a wget command like this: wget -O downdloadedtext.txt http://www.ncbi.nlm.nih.gov/IEB/Research/Acembly/av.cgi?db=mouse&amp;c=gene&amp;a=fiche&amp;l=2610008E11Rik ...

Can I user kernel-level thread in Linux kernel v2.6 and is there any way to know thread-level of my thread?

Can I create kernel-level thread using pthread_create() function with PTHREAD_SCOPE_PROCESS option in Linux kernel 2.6? And how can I know which thread-level is my thread on? Are there any function for that? ...

cross-platform scripting for windows, Linux, MacOS X

Hi. I'm looking for cross-platform scripting (language) for windows, Linux, MacOS X. I'm tired of .bat / bash . I would like to do things like for example ,,lock workstation'' at automatic login (I had this in X-Window but the solution was pretty ugly; now, I would like that on MS Windows and not that ugly :-) ). Generally: automate tas...