[How to ]Clone Your Ubuntu installation

If you want to create a system that is similar to a different system you have already set up, it can be difficult to remember each and every package you had installed.This method works best when you are exporting to and importing from the same distribution and, specifically, the same releasefor example, exporting from Ubuntu Dapper to Ubuntu Dapper or ubuntu edgy to ubuntu edgy.

Ubuntu uses the APT package management system which handles installed packages and their dependencies. If we can get a list of currently installed packages you can very easily duplicate exactly what you have installed now on your new machine. Below is a command you can use to export a list of your installed packages.





sudo dpkg --get-selections | grep '[[:space:]]install$='| awk '{print $1}' > installedpackages


Now you should end up with a file called “installedpackages” which consists of a long list of every package your currently have installed.








The next step would be to tell the clone machine to install each of those packages. You’ll have to copy that file to the clone machine (via network, usb drive, email, etc) and also make sure to duplicate the /etc/apt/sources.list file. Without the same access to repositories it may not be able to find the packages.
To tell your system to use the previously exported package list use the following command (after making sure to also clone your /etc/apt/sources.list file)
Update the source list using the following command
sudo aptitude update
Import the package list using the following command
cat installedpackages | xargs sudo aptitude install

How to speed up internet connection in Ubuntu

Basically you disable ipV6 which apparently conflicts with ipV4, I'm no expert on the whys or hows but like I said, it worked for me.

1. Open your Gnome Terminal/ KDE Konsole and type :-
For Gnome

Quote:
gksudo gedit /etc/modprobe.d/aliases
or For KDE

Quote:
kdesu kate /etc/modprobe.d/aliases
2. Kate or Gedit will open and show you this file :-
(scroll down to see what to copy and paste)


Quote:
# These are the standard aliases for devices and kernel drivers.
# This file does not need to be modified.
#
# Please file a bug against module-init-tools if a package needs a entry
# in this file.


# network protocols ################################################## ########
alias net-pf-1 unix
alias net-pf-2 ipv4
alias net-pf-3 ax25
alias net-pf-4 ipx
alias net-pf-5 appletalk
alias net-pf-6 netrom
alias net-pf-7 bridge
alias net-pf-8 atm
alias net-pf-9 x25
# 1, 2, 3 new lines
alias net-pf-10 ipv6 off --
alias net-pf-10 off -- add these three lines here.
alias ipv6 off --
#alias net-pf-10 ipv6 =========comment (put #) the original line
alias net-pf-11 rose
alias net-pf-12 decnet
# 13 NETBEUI
alias net-pf-15 af_key
alias net-pf-16 af_netlink
alias net-pf-17 af_packet
3. Now "Save" and "Reboot"

There's another way too: instead of changing aliases file, create fie named bad_list in /etc/modprobe.d containing this line:


Quote:
alias net-pf-10 off
This method will work even if /etc/modprobe.d/aliases get replaced at some update.

Howto Share Internet Connections in Ubuntu

Network Bridge comes in handy. Its essentially the same as ICS, only more flexible, albeit less secure. You might want to have a firewall remain on your system with it.

Normally, using a series of commands will work when bridge-utils is installed, but they're only for the current session. We want to make it permanent.


Procedure to follow

1. Get bridge-utils through Synaptic. This is the software we'll use to create the Network Bridge.

sudo aptitude install bridge-utils

Now, keep in mind to either print this out or not exit your browser, because in this next step we'll stop the Networking Services to change them.

2. Open a terminal, and type

sudo /etc/init.d/networking stop

Keep the terminal open.

3. Now we're going to edit our interfaces file:

gksu gedit /etc/network/interfaces

Replace whatever is there with:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

auto br0
iface br0 inet dhcp
bridge_ports eth0 eth1

Save the changes.

4. Now we'll restart the Network Services

sudo /etc/init.d/networking start

And there we go. Your computer is now set up to automatically share its internet connection without dizzying settings for more advanced set-ups!

Have fun, and note longer boot-ups will occur due to creating the network upon boot.

How to Create a SSH Tunnel for Firefox to surf securely

A ssh tunnel for Firefox to a remote computer is good security measure. Especially when connecting via an untrusted network like a wifi hotspot or other public networks. The tunnel encrypts and sends the data to your remote machine then it is sent over the web to your destination. This tutorial assumes you have an account on a remote machine you can ssh into. This is a pretty easy set up.

Now all you need to do is login your remote computer that you have access to with SSH then issue this 1 command

ssh -D 9999 -C me@ipaddress.com

The -D switch - Specifies a local “dynamic” application-level port forwarding. We are also adding the -C switch for compression.

Next we need to put the settings into Firefox.

Firefox> Edit> Preferences> Advanced tab> Network tab> Settings button.

Select Manual proxy configuration

SOCKS Host: localhost Port: 9999

SOCKS v5

No Proxy for: localhost, 127.0.0.1

Note: Sometimes localhost can cause a problem. If your settings are right and it still is not working replace localhost with 127.0.0.1.

[How to ] get list of non-free software Installed on your system

The vrms (Virtual Richard M. Stallman) program will analyze the set of currently-installed packages on a Debian GNU/Linux system, and report all of the packages from the non-free tree which are currently installed.

Future versions of vrms will include an option to also display text from the public writings of RMS and others that explain why use of each of the installed non-free packages might cause moral issues for some in the Free Software community. This functionality is not yet included.

Install vrms in ubuntu

sudo apt-get install vrms

This will complete the installation at the time of installation you should see the following message
An invocation of vrms has been added to the set of cron jobs run on a monthly basis, so that you will get a periodic reminder of non-free packages which are installed on your system.
if you want to run manually use the following command


vrms

How to Repair a corrupted filesystem in Ubuntu

You can repair a corrupted filesystem with the program "fsck".The system utility fsck (for "file system check" or "file system consistency check") is a tool for checking the consistency of a file system in Unix and Unix-like operating systems such as Linux.


Note:-File systems must be unmounted, you cannot repair them while they are running.So fsck must ALWAYS be run on an UNmounted filesystem.Running fsck on a mounted filesystem can do SEVERE damage.

A quick fsck options overview:

Many options for fsck exist, but the most important are:
-f which performs a FAST check
-p which fixes minor problems without user interaction
-y which gives permission to correct every problem found
-n which indicates to only search (and not correct) problems

The most simple variant to run fsck is to force fsck on restart, and then restart your system:

sudo touch /forcefsck

The other option is to swich the system to runlevel 1 (logs-out any userRunning fsck on a mounted filesystem can do SEVERE damage), unmount all partitions. run fsck & repair, remount all drives, increase the runlevel to 3 and continue.

How to use Google Public DNS

Google unveiled its new project: Google Public DNS. It means now anybody can use Google’s DNS servers for resolving domain names into IP addresses and back. According to Google it should speedup browsing as well as security.


Here are easy-to-remember Google Public DNS IP addresses: 8.8.8.8 and 8.8.4.4.

In order to set up Google public DNS to your Linux settings place the following lines into /etc/resolv.conf:

nameserver 8.8.8.8
nameserver 8.8.4.4

How to install nVidia Graphics driver in Ubuntu 9.10 Karmic Koala

Take terminal 




Use the following command to add PPA


sudo add-apt-repository ppa:nvidia-vdpau/ppa


Install GPG key using the following command


sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CEC06767




Update package database


sudo apt-get update




finally install drivers 




sudo apt-get install nvidia-190-modaliases nvidia-glx-190 nvidia-settings-190

[How to solve ] Display cannot be reactivated if it enters sleep mode on Fedora 12

Due to a known bug, on some laptops with Intel video adapters, if the display goes into sleep mode with the laptop lid closed, it will not be reactivated when the laptop lid is opened. The display will stay blank unless you reboot or use the following workaround. To workaround this problem, create a file with the following contents:

#!/bin/bash
xrandr --output LVDS1 --off
xrandr --output LVDS1 --auto


and save it as ~/screenfix.sh. Make it executable, and assign it to a keyboard shortcut (the method for doing this depends on your desktop environment). Executing this script via the keyboard shortcut should bring the display back to life. Note that the output parameter may vary; you can see the appropriate value for your system by running xrandr at a console and examining the output. A fix for this issue has been committed to the upstream kernel and may be made available in a future Fedora 12 kernel update.

Howto : GfxBoot ( Grub like suse ) in Ubuntu


                                
Gfxboot makes grub look nicer but with the same features
 

Download the grub-gfxboot.deb
And the message.suse

First remove your old grub

Code:
sudo apt-get remove grub
Then Install the gfxboot-grub
Code:
sudo dpkg -i grub-gfxboot_0.97-5_i386.deb
then we're going to move the message
Code:
sudo cp message.suse /boot/grub/ # the suse can be replaced by the one you downloaded
Then edit your menu.lst

Code:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
and make it use gfxboot
Code:
gfxmenu /boot/grub/message.suse # the suse can be replaced

Then do :
Code:
sudo grub

grub> find /boot/grub/stage1
 (hdx,y) # this will be the output
grub> root (hdx,y)
grub> setup (hdx)
-- Howto make you own theme --


Code:
mkdir /home/name/whatever
cpio -i < /boot/grub/message.suse # replace it by the name of you message
edit the pictures
sudo ls . |cpio -o > /boot/grub/message.new
Reboot and enjoy


here are some themes

Light Green generic theme [message.gobo] | Link | Screenshot
Dark Brown (Dapper look) generic theme [message.new] | Link | Screenshot
Medium blue kubuntu theme [message.kubuntu] | Link | Screenshot
Dark grey ubuntu theme [message.ubugrey] | Link | Screenshot
Medium brown ubuntu theme [message.ububrown] | Link | Screenshot
Light orange ubuntu theme [message.ubu] | Link | Screenshot
Red ubuntu theme [message.new] | Link | Screenshot
Fuzzy blue and black ubuntu theme [message.bluspash] | Link | Screenshot
White / Grey Snowish generic theme [message.snow] | Link | Screenshot
Linspire-style blue kubuntu theme [message.kubu] | Link | Screenshot
Old- Grub style dark blue and light blue [message.kubu] | Link | Screenshot
Light blue / grey Xubuntu theme [message.xubu] | Link | Screenshot

Cricket Score applet for Gnome desktop












 


Cricket score applet is a  gnome-applet which will display score at gnome-panel, the same way, we see date/time. It is written in python. It will also score updates through libnotify module. Read more here

How to : GNOME Shell ( Preview of GNOME 3.0 ) in Fedora 12


A very early version of GNOME Shell is now available in the repository. GNOME Shell is a key part of GNOME 3 and is in active development with the heavy involvement of Fedora developers and interaction designers. A simple way to try out GNOME Shell is to install the desktop-effects package
yum install desktop-effects gnome-shell 
Go to System => Preferences => Desktop Effects



If you would like to configure it manually, run
mkdir ~/.config/autostart

ln -s /usr/share/applications/gnome-shell.desktop ~/.config/autostart

You can also run the following to invoke it directly.
gnome-shell --replace &

[ How to ] Disable asking password of encrypted partitions during booting in Fedora 12

You can disable luks password prompt at boot by adding "rd_NO_LUKS" kernel flag to /boot/grub/grub.conf





.

How to Automatic and timed login in Fedora 12 ( constantine )

edit /etc/gdm/custom.conf

and change it to


[xdmcp]

[chooser]

[security]

[debug]
[daemon]
TimedLoginEnable=true
TimedLogin=your_user_name
TimedLoginDelay=0
AutomaticLoginEnable=true
AutomaticLogin=your_user_name

Package management on Ubuntu using dpkg

Installing a package manually.

# dpkg -i aspell_0.60.6-1_i386.deb

Removing the package

# dpkg -r aspell

#dpkg -P aspell ( Removes everything including config files.)

Now Let us explore the contents of a deb package.

Make a temporary directory.

#mkdir aspell_tmp
Extract the deb to the aspell_tmp directory.

# dpkg -x aspell_0.60.6-1_i386.deb aspell_tmp


You can see the package contents.
( Try ls -lR aspell_tmp)

The control information alone can be extrcted using -e flag instead of -x.
Or you can list the contents of a deb package as below.


# dpkg -c aspell_0.60.6-1_i386.deb

You can get details about the package with

#dpkg -p aspell
#dpkg -s aspell

If you find a strange file on your system you can check if it belongs to any package. Let us check the file /usr/share/man/man1/aspell.1.gz ( man page of aspell)
$ dpkg -S /usr/share/man/man1/aspell.1.gz
aspell: /usr/share/man/man1/aspell.1.gz

To see the installed files belonging to aspell try this
# dpkg -L aspell

If the package is not removed completely, you may see some configuration files left over