Linux: Tips and Tricks

Fix plymouth boot splash on Ubuntu 10.10 (Maverick Meerkat)

To get rid of the ugly plymouth boot splash screen after installing ATI or NVIDIA drivers do the following:

  1. Install v86d package (sudo apt-get install v86d)
  2. Edit the grub config file (/etc/default/grub)
    • replace GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” into GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1280x800-24,mtrr=3,scroll=ywrap" or whatever resolution you want to use.
    • replace #GRUB_GFXMODE=640×480 into GRUB_GFXMODE=1280x800 (or whatever resolution you used in the previous change).
  3. Edit the initramfs config file (/etc/initramfs-tools/modules)
    • add the following line to the the config file uvesafb mode_option=1280x1024-24 mtrr=3 scroll=ywrap
  4. Enable framebuffer support
    • add FRAMEBUFFER=y to /etc/initramfs-tools/conf.d/splash (echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash)
  5. Update grub and initramfs
    • sudo update-grub2 && sudo update-initramfs -u
  6. Reboot

Posted by Johan Bakker on Oct 11, 2010

Ubuntu Performance Tuning

The overall performance of Ubuntu Linux is fine but to further tune the following can be done :

1. If you are not using IPv6 it can be disabled as follows:

In /etc/modprobe.d/aliases change the line alias net-pf-10 ipv6 into alias net-pf-10 off #ipv6.

2. Start daemon/processes in parallel

Change /etc/init.d/rc from CONCURRENCY=none in CONCURRENCY=shell

3. Add your hostname in the host file (default on hardy & intrepid). If you add your host name to the /etc/hosts file some apps will start quicker. e.g. 127.0.1.1 myhostname

4. Install preload. Startup times on apps. can be further improved by installing preload (apt-get install preload)

5. Decrease Swappiness setting

If you got plenty of ram (>1GB) you can decrease the use of the swap file by changing the vm.swappiness sysctl entry from 60 to 10. If you like to further reduce swapfile usage you can set this value to 0* which will not disable swapfile usage but will reduce it to the absolute minimum. To change the sysctl entry *sysctl vm.swappiness=10 can be used, to let this setting survive a reboot vm.swapiness=10 can be added to the /etc/sysctl.conf file.

I’ve found that the value of 5 works very good for my use and I have 2 GB of memory.

6. Use the profile option of grub to reduce startup time.

Hit the escape button when booting to get to the grub menu, select the default kernel and select edit, add the profile option to the end of the kernel line and boot your system.

8. Disable unused services.

9. Use the noatime mount option to disable updating the access time on files.

If you have additional tips I’m more then willing to test/add them to this list.

Posted by Johan Bakker on Sep 23, 2008

Howto enable compiz-fusion in Ubuntu Feisty

Linux desktop effects have come a long way. Over time we’ve seen different implementations like compiz & beryl. These 2 projects have lead a life of their own but have now been merged back together again in a new project called: compiz-fusion. Compiz-fusion has got some awesome eye candy effects, but it’s still a little bit tricky to get it to work though.

Continue Reading…

Posted by Administrator on Sep 21, 2007

How to create and use patch files in Linux, BSD and Unix

Creating a Patch File:
diff -Naur oldfile newfile >patch_file

Patching a File:
patch -p0

Note about patch levels (-p0, -p1, -p2, -p3, ..)

The -p option will optionally strip off directory levels from the patchfile. For Ex: if you have a patchfile with a header as such:

--- old/modules/file Mon Sep 10 08:02:57 2007
+++ new/modules/file Tue Sep 11 14:25:13 2007

Using a -p0 will expect, from your current working directory, to find a subdirectory called “new”, then “modules” below that, then the “pcitable” file below that.

Using a -p1 will strip off the 1st level from the path and will expect to find (from your current working directory) a directory called “modules”, then a file called “pcitable”. Patch will ignore the “new” directory mentioned in the header of the patchfile.

Using a -p2 will strip of the first two levels from the path. Patch will expect to find “file” in the current working directory. Patch will ignore the “new” and “modules” directories mentioned in the header of the patchfile.

Using a -p3 in this example would not be a good thing. Patch probably wouldn’t patch anything.

Posted by Administrator on Sep 13, 2007

Add Flash support to firefox without linux-compatibility installed.

This weblog explains how to play flash on FreeBSD without Linux compatibility installed.

Continue Reading…

Posted by Administrator on May 30, 2007

Programming: Build a Web spider on Linux

Using common scripting languages and their collection of Web modules, you can easily develop Web spiders.

Web spiders are software agents that traverse the Internet gathering, filtering, and potentially aggregating information for a user. Using common scripting languages and their collection of Web modules, you can easily develop Web spiders.

A spider is a program that crawls the Internet in a specific way for a specific purpose. The purpose could be to gather information or to understand the structure and validity of a Web site. Spiders are the basis for modern search engines, such as Google and AltaVista. These spiders automatically retrieve data from the Web and pass it on to other applications that index the contents of the Web site for the best set of search terms.

Similar to a spider, but with more interesting legal questions, is the Web scraper. A scraper is a type of spider that targets specific content from the Web, such as the cost of products or services. One use of the scraper is for competitive pricing, to identify the price of a given product to tailor your price or advertise it accordingly. A scraper can also aggregate data from a number of Web sources and provide that information to a user.

Continue Reading…

Posted by Administrator on Nov 15, 2006

Installing VMware server on Ubuntu (Dapper Drake)

VMware has just released version 1.0 of its free VMware Server. With VMware Server you can create and run guest operating systems (“virtual machines”) such as Linux, Windows, FreeBSD, etc. under a host operating system. This has the benefit that you can run multiple operating systems on the same hardware which saves a lot of money, and you can move virtual machines from one VMware Server to the next one (or to a system that has the VMware Player which is also free).

Continue Reading…

Posted by Administrator on Oct 20, 2006

Upgrade clamav on servers running Debian sarge

As we all know: Debian is rather conservative in introducing new versions of software packages which is fine it guarantees a stable well tested set of applications which makes Debian a perfect linux server platform. But if you want to protect your files or network against viruses you need the latest antivirus engines. The following procedure describes how you can upgrade the clamav anti virus package to a new version without switching to testing or unstable.

Continue Reading…

Posted by Administrator on Oct 19, 2006