25 February, 2010
Hiding a folder in your Mobile phone (java based phones only)
23 February, 2010
How to change login screen picture in Ubuntu
Bored with seeing the same theme always when you start your system….
Here is a simple way to hack the gdm theme in your Ubuntu..
The Ubuntu themes data are stored in the folder :
/usr/share/gdm/themes
go to this folder and select any of the theme, here say ‘human vista’ enter that folder.
U can see the picture file that u see while logging on to your system. Delete the file that is shown as the background image and note down its name as if along with the extension. Copy the image file that you like, to the same location and rename it as the name of the previously deleted file… Thats all …
If you want to change the login window theme in Ubuntu.. look the picture
Configuring your lamp server (post installation)
This post is all about configuring the lamp server for doing your php coding, for running mysql queries…I’m not going to talk anything about installing the lamp server (Linux Apache MySql PHP) … just about some post installation activities… While using a lamp server you are using apache server to service for the php scripts.
First we have to set the localhost address to a convinient folder for placing your web based projects or programs…To set a common directory for all the users using the same linux system follow the steps here
- 1. Take the gnome terminal
Applications -> Accessories -> Terminal
- 2. Type in $sudo a2enmod userdir
Then the terminal prompts for the password… type in and kick on the enter key…
- . To make this change to be take into effect you have to restart the apache server…that’s what we do in this step. Type in the terminal as follows..
$ /etc/init.d/apache2 restart
- 4. The above step enables the user directory called public_html as the default location (home page of the apache server) of the localhost. We have enabled it in the previous step… then who will create that folder….let’s do it now. Type in the terminal
$ cd ~
$ mkdir public_html
- 5. That’s all about configuring. Now you have to check everything done so far was right Letz write a sample php program and save it in that folder.. here is how i did it using the terminal
$ gedit (It will open a the gedit text editor)
- write the following php script in it and save it as x.php in the /home/your_username/public_html directory as in figure
- 6. That’s all … it’s the time to see the output of that phpscript. . . Take the web browser say mozilla forefox, Then type in the address bar as follows.
127.0.0.1/~your_username/ or localhost/~your_username
- 7. You can see their recently created x.php … Click on it and check wheather it loads the php information page
Itz all over. For veiwing the web pages or phpscripts you have save it to the public_html folder and call the same address in the address bar of the browser….
Comment if you find any difficulties or problems …
Computer Graphics : Bucket overflowing with water
#include"conio.h"
#include"dos.h"
#include"graphics.h"
void main()
{
int gd=DETECT,gm=DETECT,i,j;
initgraph(&gd,&gm,”c:\tc\bgi”);
ellipse(300,200,0,360,50,25);
ellipse(300,300,0,360,50,25);
line(250,200,250,300);
line(350,200,350,300);
ellipse(300,100,180,360,5,2);
line(295,100,295,80);
line(305,100,305,86);
arc(300,80,90,180,5);
putpixel(306,85,15);
putpixel(307,84,15);
line(308,84,630,84);
line(300,75,303,75);
line(314,75,630,75);
putpixel(304,74,15);
putpixel(305,73,15);
line(306,72,306,65);
line(311,72,311,65);
putpixel(312,73,15);
putpixel(313,74,15);
pieslice(309,62,0,360,5);
line(0,300,600,300);
for(i=0;i<4;i++)
{ line(297+i,103,297+i,300);
}
for(i=1;i<100;i++)
{
//
setcolor(1);
ellipse(300,300-i,180,360,4,2);
delay(50);
setcolor(1);
fillellipse(300,300-i,49,25);
delay(50);
}
for(i=0;i<101;i++)
{
setcolor(9);
ellipse(300,198+i,0,360,53,25);
setcolor(15);
ellipse(300,200,0,360,50,25);
ellipse(300,300,0,360,50,25);
line(250,200,250,300);
line(350,200,350,300);
delay(50);
}
for(i=0;i<50;i++)
{
setcolor(9);
ellipse(300,301,180,360,50+i,25+i);
delay(50) ;
}
getch();
}
How to format a USB pen drive in linux
The command line procedure for formating the pendrive follows…
1. $ fdisk -l
this command shows the available partitions along with the mounted drives as a list. Identify your pendrive from the list with care. Any change in drive will make your smile little tough.
2. $ mkfs.ext3 /dev/sda or $ mkfs.vfat /dev/sda1
The second command can be used when u need to partition your USB pen as VFAT/FAT32 file system
Restore Ubuntu After Windows Installation
Do you have a Live cd with you…? Pick one and read the post…
While installing windows after the linux it will overwrite the grub boot loader , So You cannot access Linux partition after Windows Installation.
What u need to recover your system from this problem is Ubuntu LiveCD
First you have to boot your system with a ubuntu LIVECD
Then Open a terminal ( Applications –> Accessories –> Terminal)
Now you can start typing
$ sudo grub
this will give you a new prompt to edit the grub.
Type the command
> find /boot/grub/stage1
This will give you a output like (hd0,2). This will vary depends on your system
> root(hd0,2)
( use your hd number and there is no space between root and (hd0,2)
now type
> setup (hd0,2)
then
> quit
Now you can restart your system…. Ur grub will be ready…. to load ur Ubuntu and windows chain loader
Google SMS Channels: Send SMS Text Messages to your Group for Free
Google smsGoogle India has just introduced a free SMS service called Google SMS Channels that lets you subscribe to news alerts, blog updates and other kinds of information like horoscopes, jokes, stocks or even cricket scores via SMS text messages. You don’t pay anything to send or receive SMS messages using Google SMS Channels.
Google SMS Channels, which seems to have lot in common with SMS Gupshup, is free both for content publishers as well as mobile phone users who subscribe to text updates via SMS.
Families or friends can create private SMS groups on Google SMS channels and stay in touch via SMS without paying any fees to their mobile carrier.
Other than receiving blog RSS feeds via SMS, you may also use the Google SMS service to get news alerts and weather information on your phone.
Another interesting part – you don’t really need a mobile phone to send an SMS to your group as there’s an option in Google SMS channels that lets you can compose and send SMS messages via the web itself. It supports English, Hindi, Telugu, Tamil, Malayalam and Kannada.
Google SMS channels currently works only with with phone numbers of India but they are “working towards making this service available to international numbers.” Thanks Amit Somani.
To search for an SMS channel from the mobile phone, just SMS ‘SEARCH ‘ to 9870807070.
To unsubscribe to an SMS channel from the phone, SMS ‘OFF ‘, to 9870807070 where is the name of the channel.
Intel’s 8085 : some facts
- Introduced in March 1976
- Clock rate 5 MHz
- 0.37 MIPS
- Bus Width 8 bits data, 16 bits address
- Depletion load NMOS logic
- Number of Transistors 6,500 at 3 µm
- Binary compatible downwards with the 8080.
- Used in Toledo scale. Also was used as a computer peripheral controller – modems, harddisks, printers, etc…
- CMOS 80C85 in Mars Sojourner, Radio Shack Model 100 portable.
- High level of integration, operating for the first time on a single 5 volt power supply, from 12 volts previously. Also featured serial I/O,3 maskable interrupts,1 Non-maskable interrupt,1 externally expandable interrupt w/[8259],status,DMA.
Bressenham’s Line Drawing Algorithm
computer graphics program using C to implement Bressenham's line drawing algorithm
#include"stdio.h"
#include"conio.h"
#include"graphics.h"
#include"math.h"
void swap(int &x,int &y)
{
int k=x;
x=y;
y=k;
}
void main()
{
int gd=DETECT,gm=DETECT,x1,x2,y1,y2,dx,dy,p,k;
float m=0;
clrscr();
printf(“Enter the sarting point x1 & y1n”);
scanf(“%d%d”,&x1,&y1);
printf(“Enter the end point x2 & y2n”);
scanf(“%d%d”,&x2,&y2);
dx=abs(x2-x1);
dy=abs(y2-y1);
m=(float)(y2-y1)/(x2-x1);
initgraph(&gd,&gm,”");
cleardevice();
if(fabs(m)>1)
{
swap(x1,y1);
swap(x2,y2);
swap(dx,dy);
}
if((x1>x2))
{
x1=x2;
y1=y2;
}
p=2*dy-dx;
for(k=0;k
getch();
}
Hacking the password of Ubuntu
All it takes is adjusting the boot parameters slightly and typing a command or two, but we'll walk you through it.
Resetting your Ubuntu Password
Reboot your computer, and then as soon as you see the GRUB Loading screen,
make sure to hit the ESC key so that you can get to the menu.
Root Shell Method
Here we are going to manually edit the grub options to allow for a root shell. First you want to make sure to choose the regular boot kernel that you use (typically just the default one), and then use the "e" key to choose to edit that boot option.
Now just hit the down arrow key over to the "kernel" option, and then use the "e" key to switch to edit mode for the kernel option.
You'll be presented with a screen that looks very similar to this one:
Remove the "ro quiet splash" part with the backspace key, and then add
this onto the end:
rw init=/bin/bash
Once you hit enter after adjusting the kernel line, you'll need to use the B key to choose to boot with that option.
At this point the system should boot up very quickly to a command prompt.
Changing the Actual Password
You can use the following command to reset your password:
passwd
For example my username being user I used this command:
passwd user