linux

where do i add a systemcall to the linux Kernel source

Hello Guys i am tryin to add a new helloworld system call to a new version of the linux ubuntu kernel, i have been looking through the web but i cannot find a consistent example to show me what files i will have to modify to enable a helloworld system call to be added to the kernel. i have tried many and compile error have occured s...

How to create a simple desktop environment?

Hello, I want to know how to create a simple desktop environment, such as KDE, Gnome and LXDE, for Linux, or specifically, Ubuntu/Kubuntu, but I do not know how to begin and how complex it is. I want to create a simple, efficient and lightweight desktop and to reproduce some good features from KDE, Gnome and Windows XP. I do not want to...

Can I make an alias with a parameter?

So i want to run a script that requires me to input the name of a file. For example: /userthatisnotme/bin/move filename So I want to make it easier for me to remember, so I can just type move filename instead of that whole path. How can I do this? ...

Obtain a old linux distribution

Is it possible to download load distribution of linux,even the old distributions have kernel 2.6.x.x...i needed a distribution with 2.4 kernel or is it possible to recompile the kernel 2.4 on a distribution with 2.6 kernel..?? ...

Install Ruby 1.9.2 on Ubuntu not using RVM?

Hi, Is it possible to install Ruby 1.9.2 on Ubuntu not using RVM? ...

C/Linux Programming: Pseudo-Terminals: how to redirect from current stdio to pty and redirect back after usage

Hi! I'm trying to create a simple remote management program where a user can connect to my little device and "take over" the current stdio of the system. For example: System boots with console=serial port --> client connects, redirect input/output to the socket I have already accomplished the redirection to network part (by reading th...

linux python - can a program call itself?

I have a python program that runs a cell model continuously. when I press "A" or "B" certain functions are called - cell divide, etc. when the "esc" key is pressed the simulation exits. Is there a way for the program to exit and then restart itself when "esc" is pressed? ...

How to abort a active download of a package in Ubuntu?

I was downloading a package from a terminal. Actually i want to install some package 'A'. But,by mistake installing some other package 'B'. So, i wanted to stop the download of that package 'B' and start downloading 'A'. But, i couldnt able to do that. I reset my network connnection. I could stop downloading the package B. But, the admin...

How to enable large file support under Darwin?

I have a C application I am trying to compile for Mac OS X 10.6.4: $ uname -v Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 My gcc is as follows: $ gcc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664) My Makefile is as follows: CC=gcc CFLAGS=-D_FILE_OFFSET_B...

How to read multiple file descriptors using epoll_select with EPOLLET?

man epoll: The suggested way to use epoll as an edge-triggered (EPOLLET) interface is as follows: i with nonblocking file descriptors; and ii by waiting for an event only after read(2) or write(2) return EAGAIN. Imagine we have two fds: the first is passive, data available only sometimes, the second is active, data only som...

200,000 images in single folder in linux, perfomance issue or not?

Hi, I have a php/mysql website with over 200,00 images in single folder (linux server). I don't think, that I will never need to see them in file explorer, instead they will be viewed on website on their individual pages. They are just displayed in product page on website. File system is ext3. so is it wise to save them in single fold...

A C program compiled under 32-bit Debian Squeeze causes a segfault on my friend's 64-bit one

Not so long ago I've installed Debian and configured it with my friend's help. Yesterday I have downloaded GCC 4.4 and I created a simple program to test it out. This is the code: #include <stdio.h> int main () { int result; printf ("Hello Wor... Linux! This is my %dst program compiled in Debian.\nHow many is 2+2?\n", 1); s...

Crazy idea: Identify if system is idle when it's a black box

I need to be able to tell if a series of servers have anyone active on them, and if not then to automatically shut them down (turn off the VM). It's not a trivial task, because I have 1000+ server instances that include an assortment of OSes (Win, Unix, Linux) and many different type of configurations. This makes installing an uptime age...

How to merge two seperate - yet similar - codebases into one SVN rep?

Hi guys, I have /var/www/cool_codebase on www.example.com AND I have /var/www/cool_codebase on www.example.net The codebases are for the same web app running on different servers. There is some specialisation between the codebases (client-specific bits and bobs etc) - but not too much. One codebase has files that the other doesn't an...

Octal Escape in Java result in wrong byte value, Encoding problem?

According to this documentation ( http://java.sun.com/docs/books/jls/third_edition/html/lexical.html , 3.10.6) an OctalEscape will be converted to an unicode character. Now I have the problem, that the following code will result in a 2 byte Unicode character with wrong informations. for (byte b : "\222".getBytes()) { System.out.for...

regarding netem

when ever i try to execute the command for introducing the command to increase the packet drop rate the terminal shows an error RTNETLINK answers: No such file or directory though the command for introducing the latency in the network works perfectly fine.. ...

What does it mean for the file name to be shown with red background

I'm trying to install Cisco VPN client on Linux Ubuntu 10.04. The installer creates the directory, places all the necessary files in it, and then fails to launch the binary. I tried to launch it myself, the system rebukes me too. Closer inspection yields the following: eugene@eugene-desktop:/opt/cisco/vpn/bin$ sudo chmod u+x vpnagentd ...

How can I install a newer Perl without damaging the system install?

I have seen plenty of people mention some of the cool new features in Perl >= 5.12 but my preferred flavor of Linux Ubuntu only comes with 5.10.1. I have no fear of PPAs and I know how to google (unless someone finds me something, then I'll feel sheepish). I cannot find someone that provides a Perl PPA; I thought there was a PPA for ev...

How to setup tomcat on fedora?

Hi All I am new to linux I want to setup tomcat 6 on fedora 64 bit. i some how managed to install tomcat by using following command yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps but i don't at which directory tomcat installed. also i want to know how i can configure JAVA_HOME and CATALINA_HOME environment variables. ...

Mix OpenCL with OpenGL

Hello! Is it ok to use both OpenGL an OpenCL in one program? Both operate on GPU and I'm afraid how switching between OpenCL and OpenGL is handled in "background" (e.g. registers are overwritten). I'm using Linux working on computer with some nVidia graphic 8k, so i can use OpenCL implemented on top of the CUDA. ...