Wednesday, 30 July 2008

How to Optimize your Internet Connection using MTU and RWIN

The TCP Maximum Transmission Unit (MTU) is the maximum size of a single TCP packet that can pass through a TCP/IP network.


An easy way to figure out what your MTU should be is to use ping where you specify the payload size:

ping -s 1464 -c1 google.com

Note though that the total IP packet size will be 1464+28=1492 bytes since there is 28 bytes of header info. Thus if the packet gets fragmented for payload above 1464, then you should set your MTU=1492. Ping will let you know when it becomes fragmented with something like the following:

ping -s 1464 -c1 google.com

PING google.com (72.14.207.99) 1464(1492) bytes of data.
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=1 ttl=237 (truncated)

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 118.672/118.672/118.672/0.000 ms
john@TECH5321:~$ ping -s 1465 -c1 google.com
PING google.com (64.233.167.99) 1465(1493) bytes of data.
From adsl-75-18-118-221.dsl.sndg02.sbcglobal.net (75.18.118.221) icmp_seq=1 Frag needed and DF set (mtu = 1492)

--- google.com ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

In other words, to find your correct MTU, you would first start with a small packet size, and then gradually increase it until you see fragmentation; the cutoff point will be what to use for your MTU (using the formula payload + 28 = MTU). Note in the first case shown above where the payload size is 1464, the packet was transmitted fine, but in the second case where the payload size is 1465, ping complains "Frag needed"; to clarify, that means any packet with a payload of 1464 or less will be sent just fine, but a payload size of 1465 or above will end up being fragmented. Therefore, 1464 is the maximum payload, and that means the MTU is 1464+28=1492.

To set the MTU temporarily (will be lost after a reboot), you can do:

sudo ifconfig mtu 1492

Note that unfortunately some NICs do not allow you to change their MTU. You can use "ifconfig" by itself to see what the MTU is for your NIC and whether the MTU changes when you use the above command.
Or to make the change permanent, you can add it to /etc/network/interfaces:

gksudo gedit /etc/network/interfaces

And then add "mtu " in it for the particular interface. Here's an example of mine that uses my wireless interface wlan0:

iface wlan0 inet static
address 192.168.1.23
netmask 255.255.255.0
gateway 192.168.1.1
wireless-essid John's Home WLAN
mtu 1492

TCP Receive Window (RWIN)


In computer networking, RWIN (TCP Receive Window) is the maximum amount of data that a computer will accept before acknowledging the sender. In practical terms, that means when you download say a 20 MB file, the remote server does not just send you the 20 MB continuously after you request it. When your computer sends the request for the file, your computer tells the remote server what your RWIN value is; the remote server then starts streaming data at you until it reaches your RWIN value, and then the server waits until your computer acknowledges that you received that data OK. Once your computer sends the acknowledgement, then the server continues to send more data in chunks of your RWIN value, each time waiting for your acknowledgment before proceeding to send more.

Now the crux of the problem here is with what is called latency, or the amount of time that it takes to send and receive packets from the remote server. Note that latency will depend not only on how fast the connection is between you and the remote server, but it also includes all additional delays, such as the time that it takes for the server to process your request and respond. You can easily find out the latency between you and the remote server with the ping command. When you use ping, the time that ping reports is the round-trip time (RTT), or latency, between you and the remote server.

When I ping google.com, I typically get a latency of 100 msec. Now if there were no concept of RWIN, and thus my computer had to acknowledge every single packet sent between me and google, then transfer speed between me and them would be simply the (packet size)/RTT. Thus for a maximum sized packet (my MTU as we learned above), my transfer speed would be:

1492 bytes/.1 sec = 14,920 B/sec or 14.57 KiB/sec

That is pathetically slow considering that my connection is 3 Mb/sec, which is the same as 366 KiB/sec; so I would be using only about 4% of my available bandwidth. Therefore, we use the concept of RWIN so that a remote server can stream data to me without having to acknowledge every single packet and slow everything down to a crawl.

Note that the TCP receive window (RWIN) is independent of the MTU setting. RWIN is determined by the BDP (Bandwidth Delay Product) for your internet connection, and BDP can be calculated as:

BDP = max bandwidth of your internet connection (Bytes/second) * RTT (seconds)

Therefore RWIN does not depend on the TCP packet size, and TCP packet size is of course limited by the MTU (Maximum Transmission Unit).

Before we change RWIN, use the following command to get the kernel variables related to RWIN:

sysctl -a 2> /dev/null | grep -iE "_mem |_rmem|_wmem"

Note the space after the _mem is deliberate, don't remove it or add other spaces elsewhere between the quotes.

You should get the following three variables:

net.ipv4.tcp_rmem = 4096 87380 2584576
net.ipv4.tcp_wmem = 4096 16384 2584576
net.ipv4.tcp_mem = 258576 258576 258576

The variable numbers are in bytes, and they represent the minimum, default, and maximum values for each of those variables.

net.ipv4.tcp_rmem = Receive window memory vector
net.ipv4.tcp_wmem = Send window memory vector
net.ipv4.tcp_mem = TCP stack memory vector

Note that there is no exact equivalent variable in Linux that corresponds to RWIN, the closest is the net.ipv4.tcp_rmem variable. The variables above control the actual memory usage (not just the TCP window size) and include memory used by the socket data structures as well as memory wasted by short packets in large buffers. The maximum values have to be larger than the BDP (Bandwidth Delay Product) of the path by some suitable overhead.

To try and optimize RWIN, first use ping to send the maximum size packet your connection allows (MTU) to some distant server. Since my MTU is 1492, the ping command payload would be 1492-28=1464. Thus:

ping -s 1464 -c5 google.com

PING google.com (64.233.167.99) 1464(1492) bytes of data.
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=1 ttl=237 (truncated)
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=2 ttl=237 (truncated)
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=3 ttl=237 (truncated)
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=4 ttl=237 (truncated)
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=5 ttl=237 (truncated)

--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 101.411/102.699/105.723/1.637 ms

Note though that you should run the above test several times at different times during the day, and also try pinging other destinations. You'll see RTT might vary quite a bit.

But for the above example, the RTT average is about 103 msec. Now since the maximum speed of my internet connection is 3 Mbits/sec, then the BDP is:
Code:

(3,000,000 bits/sec) * (.103 sec) * (1 byte/8 bits) = 38,625 bytes

Thus I should set the default value in net.ipv4.tcp_rmem to about 39,000. For my internet connection, I've seen RTT as bad as 500 msec, which would lead to a BDP of 187,000 bytes. Therefore, I could set the max value in net.ipv4.tcp_rmem to about 187,000. The values in net.ipv4.tcp_wmem should be the same as net.ipv4.tcp_rmem since both sending and receiving use the same internet connection. And since net.ipv4.tcp_mem is the maximum total memory buffer for TCP transactions, it is usually set to the the max value used in net.ipv4.tcp_rmem and net.ipv4.tcp_wmem.

And lastly, there are two more kernel TCP variables related to RWIN that you should set:

sysctl -a 2> /dev/null | grep -iE "rcvbuf|save"

which returns:

net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1

Note enabling net.ipv4.tcp_no_metrics_save (setting it to 1) means have Linux optimize the TCP receive window dynamically between the values in net.ipv4.tcp_rmem and net.ipv4.tcp_wmem. And enabling net.ipv4.tcp_moderate_rcvbuf removes an odd behavior in the 2.6 kernels, whereby the kernel stores the slow start threshold for a client between TCP sessions. This can cause undesired results, as a single period of congestion can affect many subsequent connections.

Before you change any of the above variables, try going to http://www.speedtest.net or a similar website and check the speed of your connection. Then temporarily change the variables by using the following command with your own computed values:

sudo sysctl -w net.ipv4.tcp_rmem="4096 39000 187000" net.ipv4.tcp_wmem="4096 39000 187000" net.ipv4.tcp_mem="187000 187000 187000" net.ipv4.tcp_no_metrics_save=1 net.ipv4.tcp_moderate_rcvbuf=1

Then retest your connection and see if your speed improved at all.

Once you tweak the values to your liking, you can make them permanent by adding them to /etc/sysctl.conf as follows:

net.ipv4.tcp_rmem=4096 39000 187000
net.ipv4.tcp_wmem=4096 39000 187000
net.ipv4.tcp_mem=187000 187000 187000
net.ipv4.tcp_no_metrics_save=1
net.ipv4.tcp_moderate_rcvbuf=1

And then do the following command to make the changes permanent:

sudo sysctl -p

Read More......

Howto use Truecrypt and Evolution

For anyone who likes to store their email in encrypted containers (for security and portability reasons), here is way to link evolution to files stored on an encrypted drive.


first you need to make sure you have installed Truecrypt and follow this procedure

Then, create the link to the encrypted container as follows:

1. For a new Ubuntu installation, start Evolution normally and go through the configuration questions. Then close Evolution
2. Mount the encrypted drive (in my case it is mounted at /media/truecrypt1) and create a directory in which to store the evolution-data (in my case it is at /media/truecrypt1/Datafile/evolution):
3. Navigate to the /home/user directory and type the following:
sudo rm -f -r .evolution (you will want to copy the .evolution directory before removing it if you already have valuable files there)
ln -s /media/truecrypt1/Datafile/evolution .evolution
4. Verify that the link brings you to the mounted drive location.
5. Start Evolution and, voila, it should be storing data into the encrypted drive.

Not only is your evolution data encrypted, but it is in a container you can easily backup, etc.

Read More......

Friday, 25 July 2008

Howto Add The Trash to Your Ubuntu Desktop

If you are a new person to linux, just coming from Windows or if you want the trash applet on your desktop, then you will like this tutorial. This is on how to add the trash icon to your Ubuntu desktop:

* Run in terminal: gconf-editor
* enter your password into the "Password For...." area
* Navigate apps \ nautilus \ desktop
* On the right side, you will see an option named "trash_icon_visible"
* Check the box next to the above said option
* exit out of gconf-editor, remember to save your work before you leave

Thats it, you should now see a big bin on your desktop, similar to the gnome-panel applet icon. I am sure this will help anyone transition from Windows to Ubuntu.

Read More......

Howto Use Bootchart to Time and Track your Boot Sequence

This simple tutorial will describe how to use bootchart in order to get a graphical representation of the processes which run during your boot process. You will also be able to view the CPU and disk usage during your boot sequence, and will get an exact time (in seconds) of how long it takes for you to boot up.

Installing Bootchart

In order to track the boot sequence, we will use a program called bootchart. Installing it from the repositories is dead simple:

sudo aptitude install bootchart

... And it's installed! No further configuration is necessary.

Using Bootchart

Using bootchart may be even easier than installing it... Just reboot! After your machine starts up next time, bootchart will create a graphical representation of the boot sequence (as a .png file), and place it in /var/log/bootchart.

An example bootchart is attached. It was taken from an unoptimized boot sequence on my Thinkpad x61 running Hardy. You can see at the top that it took 30 seconds to boot completely, and there seem to be some places where optimizing the boot sequence (through parallelism) could possibly lead to a speedier bootup. But, such a thing is best left for another tutorial...

Disable Bootchart

Bootchart will, unless disabled, chart every boot process after you've installed it. This may be overkill for most users, who only want to track their boot sequence occasionally. In order to stop bootchart from charting your boot sequence, simply remove its SysV script from executing after startup:

cd /etc/init.d

sudo update-rc.d -f stop-bootchart remove

Removing any system startup links for /etc/init.d/stop-bootchart ...
/etc/rc2.d/S99stop-bootchart
/etc/rc3.d/S99stop-bootchart
/etc/rc4.d/S99stop-bootchart
/etc/rc5.d/S99stop-bootchart

Enable Bootchart

Re-enabling bootchart is as simple as disabling it. You may either reinstall it (through the repositories), or add it back to runlevels 2345:

cd /etc/init.d

sudo update-rc.d stop-bootchart start 99 2 3 4 5 .

Adding system startup for /etc/init.d/stop-bootchart ...
/etc/rc2.d/S99stop-bootchart -> ../init.d/stop-bootchart
/etc/rc3.d/S99stop-bootchart -> ../init.d/stop-bootchart
/etc/rc4.d/S99stop-bootchart -> ../init.d/stop-bootchart
/etc/rc5.d/S99stop-bootchart -> ../init.d/stop-bootchart

That's it! It's so easy!

Read More......

Saturday, 19 July 2008

Howto Install Netgear WG111v3 USB wireless

This is a GUI solution on how to install Netgear USB WG111v3 USB.


STEP 1

Go to "add and remove programs" type on the searchfield " ndiswrapper "

One program should come up! it calls samething like "graphical frontend for ndiswrapper"

Install it!

STEP 2

start whit wine a file called setup.exe

the installations fails! but if you go to:

/home/moises/.wine/drive_c/windows/inf/WG111v3

( Moises is my home directory ) or go to wine and push " Explore c:/ "
There you will find the .inf file you need!

STEP 3

Go to SYSTEM - ADMINISTRATION - and there you will find the program called

" graphical frontend for ndiswrapper "

Push the buttom " Install new driver "! Go to the .inf file located on /home/moises/.wine/drive_c/windows/inf/WG111v3

And install it!

Download drivers from here

Read More......

Tuesday, 15 July 2008

Howto setup Handbrake including GUI from svn in Ubuntu

First get the medibuntu version of ffmpeg (makes more codecs available),but first remove any old ffmpeg,open a terminal and enter.


sudo apt-get remove ffmpeg

then enter.

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

then enter.

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

then enter.

sudo apt-get install ffmpeg

Next Install the dependencies for Handbrake and the gtk gui.

sudo apt-get update && sudo apt-get install automake build-essential jam libdvdcss2-dev libtool subversion yasm zlib1g-dev libbz2-dev dvdbackup xmlto texinfo g77 gfortran libgtk2.0-dev nasm doxygen libsdl1.2-dev gfortran-multilib gcc-multilib g++-multilib libesd0-dev libgtk1.2-dev libfftw3-dev electric-fence

Next install and build Handbrake.svn and gtk gui (enter each line seperately,it will take some time to build)...

svn co svn://svn.handbrake.fr/HandBrake/trunk HandBrake

cd HandBrake

./configure

make

sudo make install

cd Handbrake/gtk

./autogen.sh

make

sudo make install

HandBrake should be available from the Applications menu under Sound & Video

Read More......

Sunday, 13 July 2008

LXDE- lightweight and fast UBUNTU environment

One brilliant thing about Linux is that it can be tweaked anyway to suit any kind of a system. If your system is pretty old and if ubuntu is too slow in it, then here you go. LXDE(Lightweight X11 Desktop Environment) is a light weight environment that's fast even on antique systems. It is surely not designed to be powerful or bloated but it is light enough to keep the system usage low.


Not all components are integrated but most of them are independent and each of them can be used with a few dependencies.


Here are some of the important LXDE features :


It's lightweight and runs with reasonably low memory usage.
Fast and runs on old machines producced in the '90s.
Gook looking gtk+2 internationalized user interface.
Desktop independent(every component can be used without LXDE)
Standard compliant, follows the specs on freedesktop.org


Installing LXDE in UBUNTU:
This first step is to edit the "/etc/apt/sources.list" file. Add the following lines to the file.(Please make a back up before you do so)

For hardy heron users:
"deb http://ppa.launchpad.net/lxde/ubuntu hardy main
deb-src http://ppa.launchpad.net/lxde/ubuntu hardy main"

For gutsy gibbon users:
"deb http://ppa.launchpad.net/lxde/ubuntu gutsy main
deb-src http://ppa.launchpad.net/lxde/ubuntu gutsy main"
Save and exit the file.

Now the source list has to be updated. Open a terminal and type the following command:
sudo apt-get update
Use the following command to install the LXDE environment:
sudo apt-get install lxde


This will install all the required components for LXDE. Now you need to logout from you system. Then go to Options->Select session.

Select the LXDE option and click on Change Session.

Read More......

Howto setup custom gproftpd ( GUI for Proftpd Server) in Ubuntu

If you have installed lampp, then you probably know that the proftpd configuration is very confusing for people that haven't dealt with proftpd.

Gproftpd is a user interface to the config file, making it easy to set it up. However, installing it from synaptic makes u get a new proftpd install.


step 1: have this installed: (you can remove it after, its just so that the compiler thinks that you have gtk2.0 installed. if anyone finds a work around, plz post)

sudo apt-get install libgtk2.0-dev

step 2: get the gproftpd package and unpack it:

wget http://mange.dynalias.org/linux/gadmin-proftpd/gadmin-proftpd-0.2.8.tar.gz && tar -zxvf gadmin-proftpd-0.2.8.tar.gz

you can remove the tar.gz if you like

rm gadmin-proftpd-0.2.8.tar.gz

step 3: cd there and open autoinstall:

cd gadmin-proftpd-0.2.8 && gedit ./Autoinstall

step 4: we have to change the directories for it use the lampp proftp.conf:

original:

### Default paths and settings ###
# export PROFTPD_CONF="/etc/proftpd.conf"
# export SECURE_LOG="/var/log/secure"
# export XFER_LOG="/var/log/xferlog"
# export PROC_PATH="/proc"
# export PROFTPD_BINARY="proftpd"
# export FTPWHO_BINARY="ftpwho"
# export SERVER_USER="nobody"
# export SERVER_GROUP="nobody"
# export WELCOME_MESSAGE="welcome.msg"
# export HTML_STATISTICS="/var/www/html/ftp.htm"
# export MIN_PASS_LEN=6

### Debian commands for starting the server at boot ###
# export SYSINIT_START_CMD="update-rc.d -f proftpd defaults"
# export SYSINIT_STOP_CMD="update-rc.d -f proftpd remove"

### RH/Fedora commands for starting the server at boot ###
### This is the defaults for the rpm specfile ###
export SYSINIT_START_CMD="chkconfig proftpd on"
export SYSINIT_STOP_CMD="chkconfig proftpd off"

./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --sbindir=/usr/sbin &&
make &&
make install

(assuming you did a normal lampp install) new:

### Default paths and settings ###
export PROFTPD_CONF="/opt/lampp/etc/proftpd.conf"
# export SECURE_LOG="/var/log/secure"
# export XFER_LOG="/var/log/xferlog"
# export PROC_PATH="/proc"
export PROFTPD_BINARY="/opt/lampp/sbin/proftpd"
export FTPWHO_BINARY="/opt/lampp/bin/ftpwho"
# export SERVER_USER="nobody"
# export SERVER_GROUP="nobody"
# export WELCOME_MESSAGE="welcome.msg"
# export HTML_STATISTICS="/var/www/html/ftp.htm"
# export MIN_PASS_LEN=6

#############################################
############# feel free to change any of the
############# above to your liking as long as
############# you know what you're doing
#############################################

### Debian commands for starting the server at boot ###
# export SYSINIT_START_CMD="update-rc.d -f proftpd defaults"
# export SYSINIT_STOP_CMD="update-rc.d -f proftpd remove"

### RH/Fedora commands for starting the server at boot ###
### This is the defaults for the rpm specfile ###
export SYSINIT_START_CMD="chkconfig proftpd on"
export SYSINIT_STOP_CMD="chkconfig proftpd off"

./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --sbindir=/usr/sbin &&
make &&
make install

Save it!

step 5: last step

sudo ./Autoinstall

NOTE:
the binary isn't

gproftpd

its

gadmin-proftpd

and it has to be run as root

recommended steps:

This installs a binary into Applications-Internet-GADMIN-PROFTPD.
but it needs to run as root. So, right click on applications, click edit menus, click internet, right click on gadmin-proftpd, click properties, and in the command box it'll say:

gadmin-proftpd

but we want it to be:

gksudo gadmin-proftpd

Save all that.

and that should be it!

Read More......

Wednesday, 9 July 2008

Howto Schedule Bittorrents to Automatically Download in Ubuntu

Ever wondered if you could schedule your torrent downloads to occur in those times when you are not using you computer, when you know that there will be more people online sharing the file your downloading, or perhaps during the off-peak times of your Internet plan Well this tutorial is for you.


1. We need to make sure that the relevant software is installed on our system. To do this we start up Synaptic Package Manager

System → Administration → Synaptic Package Manager

and search for 'bittorrent'. Select 'bittorrent' from the options and click 'Apply' to install it with all of its dependencies. If you've already got bittorrent installed then it will already be selected in the list and you won't need to perform this step.

2. Next we need to create the directory that we will download our torrents into. You can use any directory that you have permission to use for this this but a sub-directory in your home directory will often make things easier. For this tutorial I will be using a sub-directory in the user's home directory called 'torrents'. To create this directory simply navigate to your home directory

Places → Home Folder

right click on some empty space and select 'Create Folder'. Name this folder 'torrents'.

3. To automate the task of downloading torrents, and stopping the downloads at an appropriate time, we are going to create some very simple bash scripts (For more on bash scripts see here). We will use the familiar graphical text editor gedit for this task.

In your home folder right click some empty space and select

'Create Document' → 'Empty File'

Name this file 'bittorrentstart'. Perform this task again to create another file and call this one 'bittorrentstop'. You can place these files anywhere you like, perhaps in a directory called 'scripts', but this tutorial will assume they are in your Home directory.
Double click the file 'bittorrentstart' to open it and paste in the following information


#!/bin/sh
# Start Downloading Torrent Files!
cd
nohup btlaunchmany /home/Your_User_Name/torrents/ > torrent.log &
tail -f torrent.log

Make sure you change the 'Your_User_Name' to your user-name. Save this file, open 'bittorrentstop' and paste in the following information

#!/bin/bash
# Stop Downloading ALL Torrent Files!
killall btlaunchmany


4. The second part of automating the downloading of torrents is to tell our computer when to execute the start script and execute the stop script. To do this we use a tool called cron . To make the editing of cron entries simple we are going to create a text file that we will edit in gedit (like the bash scripts above) and then append it to our cron entries.

While in your Home directory right click on some empty space and select

'Create Document' → 'Empty File'

Name this file 'cron.txt'. Double click this file to open it and enter in the following information


# Start BitTorrent Download Script
05 02 * * * sh /home/Your_User_Name/bash_scripts/bittorrentstart.sh
# Stop ALL BitTorrent Downloads Script
55 11 * * * sh /home/Your_User_Name/bash_scripts/bittorrentstop.sh

Be sure to enter your user-name in the required fields. This setup will start the download start script at 2:05am and start the download stop script at 11:55am. These values will likely not suit you so you need to alter them. To understand the format of cron entries picture five asterisks at the start followed by your command. Something like the following

* * * * * sh /home/Your_User_Name/bash_scripts/bittorrentstart.sh

The first asterisk represents minutes, the second hours, the third days of the month, the fourth is the month, and the fifth the day of the week. The allowed syntax is

minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or the month names)
day of week 0-7 (0 or 7 is Sun, or use the weekday names)

Save this file and start up your terminal emulator

Applications → Accessories → Terminal

Enter in the following command

crontab cron.txt

To verify that this was entered into your cron entries properly enter in the following command

crontab -l

5. Now that we've installed the relevant applications and told the computer to execute the appropriate tasks at the appropriate times all we need to do is save our *.torrent files into the bittorrent directory we created earlier and wait. At the appropriate times they will be downloaded into their own sub-directory without you even being aware.

6. In the bittorrentstart script we created earlier there is a command to create a log file. This file records the activity of the torrent downloads. This file, called 'torrent.log', will be found in your Home directory. You can simply open this file to check on the status of your downloads. A sample line from this log file is

/home/Your_User_Name/torrents/torrent_name: Spd: 34.0 K/s:18.2 K/s Tot: 171.2 M:61.1 M [18:10:07 76%]
All: Spd: 34.0 K/s:18.2 K/s Tot: 171.2 M:61.1 M

What all of these entries mean is beyond the scope of this tutorial but you can easily recognise your connection speed and the percentage finished of your torrent downloads.

Read More......

Tuesday, 8 July 2008

Howto install latest ayttm for yahoo messanger in Ubuntu

Ayttm is an instant messenger program, supporting various protocols such as MSN, Yahoo, AIM, Jabber, and more. It is the heir of the Everybuddy project, and aims to continue improving the program and addressing its shortcomings.


Install alien using the following command

sudo apt-get install alien

Now you need to download latest ayttm rpm from here and convert it to a deb:

sudo alien ayttm-0.5.0-45.i386.rpm

and install using the following command

sudo dpkg -i ayttm_0.5.0-46_i386.deb

starting ayttm will probably generate a message about not finding a library libjasper-1.701.so.1 which is used for yahoo webcam.

To get rid of the jasper lib warning, install it:

sudo apt-get install libjasper1

and make a link to simulate the correct version:

sudo ln -s libjasper.so.1 /usr/lib/libjasper-1.701.so.1

That's it, ayttm works again.

Read More......

Printing CD Labels with GIMP and Canon Pixma iP3000

This tutorial will explain how to Print CD Labels with GIMP and Canon Pixma iP3000

Preparing your system


If you don't have it, install GIMP trough apt, aptitude, synaptic... whatever you like.

CREATE A PRINTER CLASS

On this part we will create a printer class that will save us time on configuring the printer each time we need to print a CD.

#1 . Open System Configuration and click on "Printers" then "Add Printer".
On the wizard select:

1) Printer Class -> NEXT

2) If you're using TurboPrint (recommended), select tp0 (or the number of your Pixma printer), otherwise select iPxxxx (where xxxx is the model of your printer) and press the arrow (->) on the middle to add the printer to the class. -> NEXT

3) Name now your printer CD_Label_Printer leave location and description blanked. -> NEXT -> FINISH

4) Now you must have another printer on the list named "CD_Label_Printer", click on it to select the printer than the tab "Instances" and with (default) select on the list below, press Configure.

5) Select on the first tab:

Page Size: CD Printable
Paper kind: CD Printable
Paper Origin: CD Tray

leave the rest as is and, if you're using TurboPrint, select the last tab "Controller Configuration", otherwise is done.

If you are using TurboPrint set the Print Quality to 1200 dpi or over (default CUPS driver just has 300 or 600 dpi).

USING GIMP WITH OUR PRINTER

1) Start GIMP and create an image of 800 x 800 pixels with some color background. If need use the bucket and fill the background with some weird color.

2) Create a new layer with transparent background, name it "mask" for an instance.

3) With the new layer selected, choose the circle selection tool and draw and adjust a circle to fill the canvas, then select Selection -> Invert Selection

4) Select the forecolor white and the bucket fill tool and fill the selection with it.

You must now have a "your background" color circle on the middle.
*I added mine as attachment to this post

5) Open your CD label image on GIMP and copy it to clipboard.

6) With background layer selected paste the CD label image.

7) The image must now be a new floating selection, with it selected click on "New layer". Now the image must be rasterized between the background and the mask.

Adjust your image, add text, etc. When you're done press "Print" (CTRL+P)

9) Select your "CD_Label_Printer" and go then the tab "Image Settings"

10) Set the following values:

Check the box "Ignore page margins"

Width: 120.00 mm
Height: 120.00 mm

Position: Center -> none

Top: 85.00
Left: 5.00

Put your CD on the tray and Print it.

Read More......

Saturday, 5 July 2008

How To Install torrentflux-b4rt on Ubuntu 8.04 (Hardy Heron)

Torrentflux-b4rt is a web based transfer control client.Torrentflux-b4rt allows you to control your internet downloads / transfers from anywhere using a highly configurable web based front end.


Torrentflux-b4rt is very easy to install on a web server and includes a simple setup script which can be accessed from a web browser. Just upload the files to your web server, run the setup script and your torrentflux-b4rt installation is ready to go.

First you need to make sure you have install Ubuntu 8.04 LAMP server setup from here and now follow this procedure.

Now you need to go /var/www folder using the following command

cd /var/www

If your behind a proxy and havn't already set up your export...

export http_proxy = [enter your proxy here]:[port]/

wget http://gunblade.fakap.net/doc/torrentflux-b4rt_1.0-beta2.tar.bz2

So far we've gone and got the tar containing torrentflux-b4rt and stuck it in our default web root /var/www.

tar xjvf torrentflux-b4rt_1.0-beta2.tar.bz2

This unzips our archive.

personally I now rename the new folder from torrentflux-b4rt_1.0-beta2 to something a little nicer like torrentflux

mv torrentflux-b4rt_1.0-beta2 torrentflux

but thats optional.

now we need to install quite a few libraries for everything to work nicely.

Now you need to install the following packages

sudo apt-get install php5-cli php5-gd libxml-dom-perl libxml-simple-perl libthreads-shared-perl libdigest-sha1-perl libhtml-parser-perl zip unzip unrar transmission-cli phpmyadmin

let that churn away for a bit then run setup.php from a web browser of your choice from the torrentflux/html folder.

When it gets the part where it asks what user name and password to use for the database, copy the username provided (or enter a new one) open a new tab and go to the phpmyadmin page (http://[your box ip]/phpmyadmin), log in using your root username and pwd and click on privileges. add a new user, give it sufficient privileges and click save.

I just gave it full access to everything. This isn't required and you can just keep flicking between the two tabs trying to connect until you've found the required permissions and it works.

when the setup is finished it'll give you a log in screen. the user and password you enter here is going to be your superadmin account! so don't forget it!


Read More......

Wednesday, 2 July 2008

How to install Ms OFFICE 2003 in Ubuntu

Install WINE 1.0 or greater for this you need to download latest wine from here or if you are using Hardy you can install it from ubuntu repos using the following comamnd.


sudo aptitude install wine

After wine has been installed -

Put your MS office 2003 cd in your drive and in terminal type following:

cd /media/cdrom0

wine autorun.exe

And follow instructions as if you were installing it on windows.

Now on your desktop right click -->Create launcher for each below

Create launchers for each application:

in Command field type this

For excel

env WINEPREFIX="/home/your_username/.wine" wine "C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE"

For Word

env WINEPREFIX="/home/your_username/.wine" wine "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE"

For powerpoint

env WINEPREFIX="/home/your_username/.wine" wine "C:\Program Files\Microsoft Office\OFFICE11\POWERPNT.EXE"

For Access

env WINEPREFIX="/home/your_username/.wine" wine "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"

You are almost done.

Now if you are having problem running your macro then you need to install Dcom98.

Dcom98 contains three dlls from Windows 98: ole32, oleaut32, and rpcrt4. Use winetricks to install it:

In terminal type:

wget http://www.kegel.com/wine/winetricks

sh winetricks dcom98

The winetricks script will set to override globally, and if you have any other programs installed in that wineprefix it may affect them. If that happens, you can fix it through winecfg.

That's it Now you have running MS OFFICE 2003 on your ubuntu.

Read More......