Home page of this blog

Tuesday, July 27, 2010

Improving linux network compatibility with old routers

Recently I was reading about random slowness in browsing and similar experiences here http://ubuntuforums.org/showthread.php?t=1174741


and this one http://inodes.org/2006/09/06/tcp-window-scaling-and-kernel-2617/

and this one http://lwn.net/Articles/92727/

According to the LWN article, tcp window scaling is enabled by default. So if we want to improve compatibility with old routers and linux networking stack, it is by disabling tcp window scaling

To disable tcp window scaling

add this to end of  /etc/sysctl.conf


net.ipv4.tcp_window_scaling = 0 


To disable ipv6

add this to end of /etc/sysctl.conf


#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1 
net.ipv6.conf.default.disable_ipv6 = 1 
net.ipv6.conf.lo.disable_ipv6 = 1 


After this reboot to experience compatible network experience with old routers

Saturday, July 24, 2010

Breaking the mental barrier and installing latest softwares in linux distributions

When there is a release of my favorite software, it is easy for me to install in Windows. When firefox is released, I don't have to wait for another release of Ubuntu to get it running

I want my latest VLC, latest firefox, latest nvidia, latest software running in my current version of Ubuntu, Is it possible ?

Yes, there are three ways without waiting for next release of Ubuntu/openSUSE to get latest software

1. Install latest binary manually without using system's default package management tool synaptic/aptitude/apt/zypper/pacman ...

2. Download latest source and compile/run yourself

3. Install from a PPA (personal packaging archive) or community packages (for openSUSE) or AUR (here arch linux is rolling distribution and does not require waiting if it is not unusual software which is in main repository)

Obviously, it is the third way which is the most easiest and attractive

I am happily using the 3rd step and I am using the latest softwares I love.

To install VLC latest (1.1.1 as of now) from PPA, sudo add-apt-repository ppa:c-korn/vlc && sudo apt-get update and install vlc from synaptic

To install latest version of nvidia/ati/intel drivers PPA, sudo apt-add-repository ppa:ubuntu-x-swat/x-updates && sudo apt-get update and upgraded my graphics drivers (nvidia 256.35 I got now instead of old version which is there in default updates)

To install latest XBMC from PPA, sudo apt-add-repository ppa:team-xbmc && sudo apt-get update and installed xbmc from synaptic

The above are just some three softwares I am quoting here, there are another 30 thousand s/w in ubuntu PPA to be searched and to be installed in your computer. To know how to search PPA, follow this ubuntugeek article

http://www.ubuntugeek.com/where-to-search-ubuntu-personal-package-archives-ppa.html

To search for software in openSUSE is equally easy, go to the following link, type your favorite software name and install from there

http://software.opensuse.org/113/en

To search and install in archlinux, follow http://aur.archlinux.org/

and we can go one step further and even install next version of kernel

For e.g, to install 2.6.34 version of linux kernel in Ubuntu lucid http://usablesoftware.wordpress.com/2010/05/26/switch-to-a-newer-kernel-in-ubuntu-10-04/

If it is arch linux, I would have compiled it myself or used a pkgbuild script from AUR repository to get another kernel


Every part of GNU/Linux system can be modified at will, if we really want to do so, by breaking the mental barrier which is there only in name and in our mind as fear of the unknown


Sunday, July 18, 2010

Setting changing wallpapers as background in Ubuntu Lucid

I have often wondered how easy it is to set a group of wallpapers in Windows 7 with a time duration. It is time I did the same in Ubuntu and know it is already there.


I know there are two software which do the task of rotating wallpapers available from synaptic. They are drapes and wally


drapes has dependency on mono (which some will not want to)
wally pulls the entire kdebase-runtime as its dependency  (which I obviously does not want)

The following method uses gnome feature to accept xml file to change/rotate images without installing any of the above packages.

Here is a small howto of what I did to change the backgrounds based on interval step by step

Step 1: Create a directory and copy your images

Step 2: Goto terminal

Step 3: Change to the directory which contains your group of images which needs to be rotated based on interval. Change following script line INTERVAL=20 to desired interval (interval value in seconds) and paste it. If you just paste it, it will create a xml file called bg.xml with 20 seconds as interval between switching to next image



INTERVAL=20; echo "<background>" > bg.xml; for i in *.jpg; do echo "<static><duration>$INTERVAL</duration><file>`pwd`/$i</file></static>" >> bg.xml; done; echo "</background>" >> bg.xml




Step 4: Goto desktop. Right click desktop and invoke Change Desktop Background
(or System --> Preferences --> Appearance --> Background)

press Add... button and change Images to All files from the combo box, then choose bg.xml which we created now






This  will rotate images in Ubuntu Lucid or any gnome environment. The below video shows a background rotation on my desktop with 4 seconds interval.

Friday, July 16, 2010

openSUSE 11.3 KDE suprises with firefox integration


openSUSE 11.3 KDE live CD gave me a pleasant surprise. After downloading openSUSE 11.3 KDE live CD I booted into the live mode. The integration of firefox in openSUSE gives such a feel, that firefox is a native KDE application, such a clean integration of native KDE theme


If you are new to openSUSE and lazy to browse through enormous help and wiki of openSUSE to get links to install multimedia, flash, drivers, just read comments section for knowing more about making openSUSE boot from USB, multimedia repository links and how to install flash plugin, may or may not be useful





I am still exploring openSUSE 11.3. It feels very smooth unlike earlier KDE releases



I transferred openSUSE 11.3 iso to my USB drive using dd command for testing the live CD version. After testing once and rebooting, it gave me another surprise by storing all the modifications I did to session including network settings.

openSUSE 11.3 64 bit comes with a preemptive 1000Hz kernel. The feel of openSUSE 11.3 KDE version is as good as Ubuntu Lucid 10.04 running gnome

Saturday, July 3, 2010

Enabling prelink in Ubuntu Lucid like Fedora

Fedora is one of the most advanced operating system, which never fails to awe each and every day. I always have wondered how Fedora manages to be so much snappier than Ubuntu. Here may be one of the reasons, it has prelink enabled by default.

Here I try to explain how to get prelink running in Ubuntu for your reading pleasure

Here is a screenshot showing, Fedora 13 has prelink installed and enabled by default, whereas, Ubuntu Lucid 10.04 has not installed prelink by default



prelink is a utility which modifies shared libraries to relocate faster or in end user's terms, launch applications faster

To enable prelink in ubuntu, we have to install it first

sudo aptitude install prelink


Before running prelink first time, we need to modify its config file to enable prelink on all libraries

To do that, the following editor command will help (if you dont want to undergo the pain of opening a file and editing it)

sudo sed -i s/PRELINKING\=unknown/PRELINKING\=yes/g /etc/default/prelink


To do prelinking on all libraries for the first time, run prelink from cron as follows

sudo /etc/cron.daily/prelink


Now reboot your Ubuntu box, your applications should launch faster like Fedora

Thursday, July 1, 2010

Who inspired me with commandline mp3 player

This is about my friend Arjun (http://www.blogger.com/profile/12608024685176859481) who is another author to this blog. He inspired me towards command line.

When we friends were discussing about mp3 players like  winamp, windows media player he shocked all of us by telling he used/uses mpg123 from command line to play his mp3 songs

Do you wish to play mp3 from command line like him? Read further if you have ubuntu or fedora( if you are an Arch user, you are most probably a geek and most probably a linux guru and I won't be teaching you how to do "sudo pacman -S mpg123" from command line)

So, to install this commandline mp3 player in Ubuntu

sudo aptitude install mpg123


If you have Fedora, then in Fedora commandline (remove sudo from command, if you are a super user)

sudo yum install mpg321


To play a single mp3 song from command line

mpg123 <your mp3 file >

To play multiple mp3 songs

mpg123 *.mp3


or

mpg123 <mp3 1> <mp3 2> ...

To play a mp3 URL

mpg123 <url of the mp3 >






To know more about mpg123, use man mpg123 from commandline