If you are working in the internet with ubuntu, you may need some software to be installed before it is being used actually.
If you install ubuntu with a live CD, you will not have VLC Media player, etc.
Proxy setup needed to install/update software in ubuntu
1. proxy support for Synaptic package manager
Go to Settings-> preferences –> [...]
Continue reading http_proxy in ubuntu
I have Logitech C120 Webcam and the driver for windows is quite good and it is perfectly working fine.
However, if you are trying to find out the driver for the webcam for ubuntu (most of the recent distros), you can execute the following command..
in the shell prompt
# sudo apt-get update
# sudo apt-get install luvcview
once it [...]
Continue reading Logitech Webcam Device driver for Ubuntu 8.04,8.10,9.04,9.10,10.04
To print the environmental variables of Linux using C. To print the system uptime and system idle time.
Requirements:
GCC compiler
Suse Linux (Sun V20Z Linux Server)
Theory:
Linux provides each running program with an environment. The environment is a collection of variable/value pairs. Both environment variable names and their values are character strings. By convention, environment variable names are [...]
Continue reading Printing Environmental Variables and CPU Time using C
File handling using Shell Scripts
to prepend a line to a file
to develop a temporary file name generator
to compare two files
Requirements:
Suse Linux, BASH Scripting
Program
(a) Prepending a line to a file
#!/bin/bash
# prepend.sh: Add text at beginning of file.
E_NOSUCHFILE=65
read -p “File: ” file # -p arg to ‘read’ displays prompt.
if [ ! -e "$file" ]
then [...]
Continue reading File Handling using Shell Scripts
A look at the proc_dir_entry structure
struct proc_dir_entry { unsigned int low_ino; unsigned short namelen; const char *name; // name of our module mode_t mode; // permissions ,who can read and write to it [...]
Continue reading Linux kernel module to add a proc file entry
A Character device driver needs a major number and a minor number. The devices are registered in the Kernel and it lies either in the /dev/ or in the /proc folder.
The following example uses a char device driver with major number 222 and a minor number 0. The name of the device driver namely “new_device”
It [...]
Continue reading Writing a Simple Character Device driver in Linux
Assume there are more number of source files to be compiled using a set of commands everytime is a tedious process. So there is a facility to compile everything at a stretch is by the use of a Makefile.
The makefile can be named as either “Makefile” or “makefile”.
Let me define four files for my simple [...]
Continue reading How to write a Makefile
A system call is used by application or user programs to request service from the operating systems. Since the user programs does not have direct access to the kernel whereas the OS has the direct access. OS can access the hardware through system calls only.
The following files has to be modified for implementing a system [...]
Continue reading Implementing a new system call in Kernel version 2.6.32
To demonstrate, let us goto a simple “Hello World” as a module and inserted in to the kernelStep 1Open any editor like vi or gedit in a shell prompt and the type the following/* Name of the file is hello.c */#include <linux/module.h>#include <linux/kernel.h>int init_module(void){printk(KERN_INFO “Hello world.n”);return 0;}void cleanup_module(void){printk(KERN_INFO “Goodbye worldn”);}The above is a simple [...]
Continue reading How to add a new Linux Kernel Module (LKM)