Friday, March 27, 2009

Ubuntu Mobile

Ubuntu MID works on two devices at present, the Samsung Q1U and the Intel Crown Beach development station for building devices using the company's Atom processor. It also can be run on ordinary computers through the KVM virtualisation software. A MID — a concept Intel is aggressively promoting — is a mobile device larger and more like a regular computer than, say an Apple iPhone, but smaller than an ultraportable PC.

"This release marks the start of a way for new users to experience Ubuntu and Open Source software and as the hardware becomes commonplace it will become a very exciting place to get users experiencing applications from our communities," said David Mandala, project manager of the Ubuntu Mobile and Embedded Group, in a blog posting.

Canonical will release new versions of the software on the same six-month cycle as it uses for the desktop version of the open-source operating system, the company said.

"Ubuntu MID Edition, a fully open-source project, gives the full internet, with no compromise," according to the project description. "All unnecessary complexity in the user experience is eliminated."


Ubuntu MID can be used with a touchscreen and has a specially designed Web browser.


Tuesday, March 17, 2009

FTP auto login and Backup scripts

Hi

There is some method for auto login ftp like .netrc,macros but here I have written simple scripts for ftp auto login.

Steps

Following steps are required to write shell script:

(1) Use any editor like vim or mcedit to write shell script.

(2) After writing shell script set execute permission for your script as follows
syntax:
chmod permission your-script-name

Examples:
$ chmod +x your-script-name
$ chmod 755 your-script-name


#!/bin/bash
ftp_site="192.168.2.130"
username=user
passwd=password
ftp -in << (Put the EOF here)
open $ftp_site
user $username $passwd
bin
put test >> For testing I have put the test file into ftp server
close
bye
EOF

Backup

#!/bin/bash

ftp_site=ftp://ftpyoursite.com
username=user
passwd=password
backupdir=$HOME
filename="backup-$(date '+%F-%H%M').tar.gz"

echo "Creating a backup file $filename of $backupdir."

# Make a tar gzipped backup file
tar -cvzf "$filename" "$backupdir"

ftp -in << eof
open $ftp_site
user $username $passwd
bin
put $filename
close
bye
EOF

Thursday, March 12, 2009

MonodRescue tool - Harddisk backup

MonodRescue tool - Harddisk backup

Use monodRescue tool for backup our system.

Mondo is reliable. It backs up your Debian GNU/Linux server or workstation to

tape, CD-R, CD-RW, NFS or hard disk partition. In the event of catastrophic

data loss, you will be able to restore all of your data

Procedure:

1)Install the mondorescue package.

2)Execute the command #mondoarchive as root

3)Choose from the list of supported backup media types. The media you will use most often are CD/DVD-+R, CD/DVD-+RW, tape, NFS and hard disk.

4)If we backing up to CD/DVD-+R[W] then Mondo will ask if our CD burner has BurnProof technology click yes to continue.

5)In the next step select the compression size.

6)If we want to backup the whole computer (excluding /sys and /proc, naturally) then leave this as / which is the default. Otherwise, specify subsets, (e.g. /usr/local /home ) being sure to put a space in between each path.

7)If we are backing up your whole computer then you might want to exclude certain directories, e.g. /shared/MP3. Please specify them in the 'exclude directories' dialog box. Please put a space in between each path, e.g. /shared/private /scratch /nfs /windows

8)Is your kernel sane? Red Hat, Mandrake, SuSE, Debian and Slackware users should in general say 'yes' because these vendors are good at producing reliable kernels. If you are using Gentoo or LFS then your kernel might be non-standard, in which case say 'no' to use Mondo's failsafe kernel (provided separately).

8)If we want to verify the archives after writing them to media, say 'yes' here. If you have absolute faith in your hardware and your Linux distribution, say 'no'...

9)Finally, Mondo begins backing up our computer. This process may take a few minutes or a few hours, depending on how much data we are archiving, how fast our CPU is, how much RAM we have, and so on. It will backup your regular files and then your large files (files larger than approximately 32MB).

10)Mondorestore command is used to resore the backup files.

Tuesday, March 3, 2009

Scanner Installation - Ubuntu

Hi

I have try lot for working with scanner on ubuntu. Here I am writing the documentation for easy implementation for ubuntu lovers.
I have set-up hp2400 scanjet. First you have to install build essential for compiling the sane-back end package. And Check libusb-dev installed.

For installing

#sudo apt-get install build-essential
#sudo apt-get install libusb-dev

Download the driver for hp2400, below url
========================================
http://www.4shared.com/file/90471364/8cc9bdfb/hp2400.html
http://www.4shared.com/file/90471428/e45c2251/libsane.html
=======================================

Installation:

Here I have downloaded the driver packages in user Desktop.

Unpack the hp2400 driver (libsane-hp2400.so) to /usr/lib/sane:

# cd /usr/lib/sane
# sudo tar -xvzf /home/user/Desktop/hp2400.tgz
Note: README_hp2400.txt file left in root directory

Unpack the modified SANE library (libsane.so) to /usr/lib:
# cd /usr/lib
# tar -xvzf /home/user/Desktop/libsane.tgz

libsane.so SANE Library Modification:


The hp2400 driver contains only HP authored code and depends on
the SANE library for some functions. Unfortunately, libsane.so
lacks the sanei_usb module. To add this module,
1) Obtain the SANE distribution from www.sane-project.org.
2) add "sanei_usb.lo" to the "EXTRA" line in backend/Makefile.in:

EXTRA = sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_config.lo ../sanei/sanei_usb.lo

3) follow the SANE README build and instructions. This sequence of
instructions appears to install in /etc/sane.d and /usr/lib:
cd sane-backends-1.0.??
configure --prefix=/usr --sysconfdir=/etc
make
su
make install


hp2400 SANE DLL Configuration:
The hp2400 driver will be loaded by SANE by adding "hp2400" to
/etc/sane.d/dll.conf. SANE initializaion is much faster if unneeded
backend modules in dll.conf are commented out.

See Also: man sane-dll


USB Configuration / Troubleshooting:
After you have connected the scanner, run:

# sane-find-scanner

If successful, you should see a line similar to this:

found USB scanner (vendor=0x03f0, product=0x2905) at libusb:001:003

The scanner is mapped to a file in /proc/bus/usb. In the example
above, it maps to this file:

/proc/bus/usb/001/003 (your file will probably be different)

By default, only super-user has permission to access the scanner.
If you would like all users to access the scanner, give everyone
read/write permissions on the file:

# chmod 666 /proc/bus/usb/001/003

sane-find-scanner only verifies that the scanner is connected to
your system. To verify that the HP driver is loaded, run:

# scanimage -L

If successful, you should see a line similar to this:

device `hp2400:libusb:001:003' is a Hewlett-Packard hp2400 flatbed
scanner

If the HP driver is loaded, you should be ready to start scanning
using SANE applications like scanimage or xsane.

If the HP driver isn't loaded, run "man sane" and "man sane-usb"
to get more troubleshooting information. Note that the HP driver
uses libusb (Linux kernel 2.4.19 and later).

To determine the options specific to your scanner, run:

# scanimage -help

Options specific to hp2400:
-l 0..210.919mm [0]
Top-left x position of scan area.
-t 0..292.206mm [0]
Top-left y position of scan area.
-x 5..215.919mm [215.919]
Width of scan-area.
-y 5..297.206mm [297.206]
Height of scan-area.
--resolution 200|300|600|1200dpi [200]
Sets the resolution of the scanned image.
--mode Color|Gray|Lineart [Color]
Selects the scan mode (e.g., lineart, monochrome, or color).
--source Flatbed|Negative|Slide [Flatbed]
Selects the scan source (such as a document-feeder).
--paper-size
Custom|Letter|A4|A5|A6|A7|B5|
B6|B7|C5|C6|C7|JIS-B5|JIS-B6|JIS-B7 [Custom]
Sets scan area to selected paper size

Option notes:
Defaults are in enclosed in [].

The default scan area is the maximum width and height.

Limitations:
Images are raw (no automatic image enhancement).

Buttons are not supported.

Monday, March 2, 2009

Access denied for user 'root'@'localhost'

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

You can over come the error by the following way.
--------------------------------------------------

# /etc/init.d/mysql stop
# mysqld --skip-grant-tables --user=root&
# mysql
mysql> use mysql
mysql> update user set Password='' where User='root';
mysql> exit
# killall -9 mysqld
# /etc/init.d/mysql start
# mysql -p
Enter password:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpassword');
mysql> FLUSH PRIVILEGES;
mysql> exit

Mount NTFS / FAT32 Windows Drive In Ubuntu

Mount NTFS / FAT32 Windows Drive In Ubuntu

1. Open terminal in ubuntu

2. Type the following command

sudo /bin/bash

Note: Now type the password of the root user in ubuntu

3. Now, type the following command

mkdir /media/windisk

4. Now, you need to force mount the ntfs drive of windows by typing the following command

For Mounting NTFS Drive, type the following command

mount -t ntfs-3g /dev/sda1 /media/windisk -o force

For Mounting FAT32 Drive, type the following command

mount -t vfat -o umask=000 /dev/sda1 /media/disk

You can change the parameter in the above command /dev/sda1 to change the windows drive to mount, In order to get the listing of the windows drives type the following command

fdisk -l

5. Now, to access all the windows files browse to computer and open file system

Open Filesystem, browse to media/windisk to see all the contents of the drive you mounted.

For permenantly mount add the following line in /etc/fstab

/dev/sda1 /media/disk ntfs rw,umask=0222 0 0