linux poison RSS
linux poison Email

Free Disk Space by Reducing Reserved Blocks Percentage

In a default install Linux reserves 5% of the disk space for privileged processes. It is a precautionary measure on part of Linux to keep up even after the file-system is filled up.

With this approach it allows root to conduct administrative activities on the partition and perhaps move some data off. However, this is most critical when the partition contains / or home directories. For pure data partitions, this is just lost space. Five percent of a 250Gb partition is 12.5 Gb. Especially in the case of large partitions, it is safe to set the reserved space to the minimum, which is one percent or even to 0 percent.

There are two ways through which you can adjust this reserve percentage

1) At the time of creation of file-system:
# mkfs.ext3 -m 1/dev/sda1 (replace sda1 with your partition name)
The above command creates a file system with only 1% of its space reserved for the root user.

2) After creation of file-system:

You can use tune2fs utility to reduce reserved blocks in ext2, ext3 as well as ext4 file-systems. To reduce reserved blocks to 1% use the following command:
# tune2fs -m 1 /dev/sda1 (replace sda1 with your partition name)
In a 1 TB hard drive you can save upto 37GB of space after applying this tweak.
Read more

Shell on Fire

Run command aafire and admire beautiful ASCII art fire in the console.

Read more

Windows 7 Sins: The case against Microsoft and Proprietary Software

The new version of Microsoft's Windows operating system, Windows 7, has the same problem that Vista, XP, and all previous versions have had -- it's proprietary software. Users are not permitted to share or modify the Windows software, or examine how it works inside.

The fact that Windows 7 is proprietary means that Microsoft asserts legal control over its users through a combination of copyrights, contracts, and patents. Microsoft uses this power to abuse computer users. At, the Free Software Foundation lists seven examples of abuse committed by Microsoft.

Windows 7 Sins
You can help!
Free software operating systems like GNU/Linux can do the same jobs as Windows, but they encourage users to share, modify, and study the software as much as they want. This makes using a free software operating system the best way for users to escape Microsoft and avoid becoming victims of these seven sins. Software and computers will always have problems, but by using free software, users and their communities are empowered to fix problems for themselves and each other.

You can get more information about each of the sins and how to escape them at Please sign up there for campaign news and action alerts to help raise awareness about Microsoft's abuses, the problems with Windows 7, and the importance of free software!

Read more

Installing KDE 4.3.1 in Kubuntu

KDE 4.3.1 contains bugfix, translation and maintenance update for the latest generation of the most advanced and powerful free desktop. KDE 4.3.1 is a monthly update to KDE 4.3. It ships with a desktop workspace and many cross-platform applications such as administration programs, network tools, educational applications, utilities, multimedia software, games, artwork, development tools and more. KDE's award-winning tools and applications are available in more than 50 languages.

As a service release, the changelog contains a list of bugfixes and improvements. Notable improvements include, but are not limited to:

    * KDE 4.3 is now also available in Croatian
    * A crash when editing toolbar setup has been fixed
    * Support for transferring files through SSH using KIO::Fish has been fixed
    * A number of bugs in KWin, KDE's window and compositing manager has been fixed
    * A large number of bugs in KMail, KDE's email client are now gone

Open/Edit sources.list: $ vi /etc/apt/sources.list

Add the following repository at the end of the file. Save the file when you are done:

    deb jaunty main

It is strongly recommended that you verify the integrity of these repositories packages by installing the archive's GPG key. You may do this by running the following commands:

gpg --keyserver --recv 2836CB0A8AC93F7A
gpg --export --armor 2836CB0A8AC93F7A | sudo apt-key add -

Now you can update your list and do a dist-upgrade to upgrade to KDE 4.3.1 :

$sudo apt-get update
$sudo apt-get dist-upgrade
Read more

Kernel Compilation & Installation on Ubuntu - KernelCheck

If you’ve ever tried compile a linux kernel yourself you know the headache of configuring and taking care of dependencies. KernelCheck makes this a point and click process for debian based linux distributions such as Ubuntu. You can use it to compile and install any 2.6.* stable kernel as well as the bleeding edge.

KernelCheck even offers custom compilation options such as including kernel patches or rolling in proprietary video drivers. A tutorial (PDF) is also provided so you can see what you’re getting yourself into.

KernelCheck is a graphical user interface program designed to make the kernel-compiling process as easy as the click of a button. A kernel is the base of any operating system – in our case, the Linux operating system.

KernelCheck will fetch the latest information from, which hosts the source packages for the Linux kernel, and ask the user which one they would like to compile into a .deb package (with the option of installing the kernel after the compilation). This automated process is a fork of AutoKernel by Robert Wolterman (xtacocorex), Timothy Janssen (mentok), and Kristof Verbeken (PingunZ). KernelCheck is currently licensed under the GNU Public License version 3.

   1. Download the KernelCheck source here.
   2. Unpack the archive: tar -xzf kernelcheck-*.tar.gz
   3. Install KernelCheck
      cd kernelcheck-*
      sudo python install
   4. Use it: sudo kernelcheck

The basic things the program will show you are:
   1. Your running kernel
   2. The latest kernel
   3. The latest kernel patch

Now on to building the kernel. Under Kernel Patch Options, select the option that you wish to use. Unless you know what you're doing, I strongly recommend using the default selected.

Under Advanced Options, you can choose whether you want to configure the kernel options, reconfigure the X server, and install an nVidia module. The nVidia option will remove any nVidia-related packages, any binary version installed, and install the latest one. This will remove nVidia support for older kernels until you run the binary file in /usr/src with the -K option with every new kernel you use, not compiled with KernelCheck. It is strongly recommended that you configure the kernel options yourself, mainly to make sure your hardware is supported. Now to build the kernel, all you have to do is go to Program > Build New Kernel.
Read more

Backup & Restore MySQL Databases - MySQLDumper

MySQLDumper is a backup & restore management script for MySQL Databases, written in PHP and Perl, which fills this gap and offers a complete control over the databases.

MySQLDumper uses a proprietary technique to avoid execution interruption. It only reads and saves a certain amount of commands and then calls itself via JavaScript and memorizes how far in the process it was and resumes its action from its last standby.

MySQLDumper offers to write data directly into a compressed gz-File. The Restore-Script is able to read this file directly without unpacking it. Of course you can use it without compression, however using Gzip saves a sizable amount of bandwidth.

Installation & Configuration
  * Download MySQLDumper - Here
  * Extract the zip file under your webserver root directory: unzip, this command will create a new directory msd1.24
  *  Lunch your browser and point to the msd1.24 directory, this will open up the installation wizard which is very simple and straight forward.
  * After successful installation point your browser to "index.php" to open up the main application from where you can take & restore backup

MySQLDumper can read Dumpfiles from other Scripts via the integrated parser (for example from phpMyAdmin)
- Security: MySQLDumper can generate a .htaccess-file to protect itself and all of your backup-files
- MySQLDumper can do Multipart-Backups. That means: MySQLDumper can automatically split the dumpfile if it gets bigger than your chosen size. When you want to restore a backup and choose the wrong part - it doesn' matter: MySQLDumper will notice that and will get the correct startfile automatically.
- automatic Errormodul
- MiniSql: You have access to your MySQL-Tables. You can delete tables, edit or insert data. You can run/ save any SQL-Statement.
- Database-Overview: look at running processes or even stop them
- very good file-overview: backups of the same database are shown as one entry. Click it to see all of the files.
- automatic file-deletion: set your own rules to delete old backups. Specify the age or the number of files when it will be deletetd automatically to save server webspace.
- Perl Cronscript done: all features of the PHP-Script are now integrated in the Perlscript that can be started via a Cronjob
- Configuration can be set seperatly for each Script (PHP and Perl)
- befor you start a backup all your parameters are shown again, so you definitely know what you are doing :-)
- Send Emails with or without your dumpfile attached / you can set the maximum size of the attachement. If it grows bigger it won't be attached.
- Send dumpfiles via FTP to another Server. This is also working using the multipart feature.
Read more

Goggles Music Manager (GMM) - Jukebox & Complete Multimedia Player for OpenSUSE

Goggles Music Manager (GMM) is a free open source (licensed under GPLv3) music collection manager and player that automatically categorizes MP3, Ogg Vorbis, FLAC, and Musepack files based on genre, artist, album, and song. There is no need to create playlists of any kind. Just select one or more artists and albums to start playing your music.

It supports gapless playback and features easy tag editing.  Googgles Music Manager is fast light-weight and starts up very quickly and there is no delay with splash screens.

Goggles Music Manager is written using OX, one of the fastest GUI toolkits available with the support for FOX-1.6.x and the latest development version FOX-1.7.x and the light-weight fast SQLite3 DB backend.

Features include,
    * Fast and light weight. Quick startup, no splash screen needed!
    * Supports Ogg Vorbis , FLAC, MP3 , MP4 , ASF and Musepack music files.
    * Support for AlbumArt embedded in tag or as separate file on disk.
    * Tag editing and file renaming capability (batch). One or more tracks may be edited at the same time.
    * Smart sorting with user configurable leading word filter to prevent sorting on common words like the, a or an.
    * Support for play lists. Play lists may be played in a certain configurable order, or browsed through like the main music library.
    * Export music library and play lists to XSPF,PLS,Extended M3U,M3U and CSV.
    * Clipboard & DND (drag-and-drop) support to arrange playlists and dragging to and from gnome / kde applications.
    * Uses xine multimedia library for gapless playback.
    * Written using FOX, one of the fastest GUI toolkits available. Support for FOX-1.6.x and the latest development version FOX-1.7.x.
    * Customizable icons. Either use buildin icons or use an existing gnome/kde icon theme.
    * Configurable user interface from minimalistic to detailed view. Full screen mode available with FOX-1.7.11.
    * Clean and fast database backend using SQLite 3.
    * Last-FM audio scrobbler support.
    * Replay Gain support (Ogg Vorbis, FLAC and mp3 with APE tags).
    * Equalizer

Installation - Goggles Music Manager:
OpenSUSE packages are provided by the PackMan project.
After successful installation you can find  Goggles Music Manager
Application → Multimedia → Jukebox Goggles Music Manager
The first time you start Goggles Music Manager, it will come up with a empty song database. In order to enjoy your music collection you first need to fill up the song database.

To add songs to the database, open up the Music menu and select "Import Folders". It will pop a dialog asking you to select from which directory you like to add songs from.

Once you press "Ok", Goggles Music Manager will add all Ogg Vorbis files located in the chosen directories and its subdirectories. Note this may take a while when you a have huge collection of songs. You only need to do this once. If you want to add new songs to the database use the "import" command in the Music menu.

If everything was successful, the database should have been filled up. Select any genre, then artist, and finally select the album and double click on the song you want to listen to.

Read more

WineXS - GUI (Graphical User Interface) for Wine

Wine makes it possible to run Windows programs alongside any Unix-like operating system, particularly Linux. At its heart, Wine is an implementation of the Windows Application Programing Interface (API) library, acting as a bridge between the Windows program and Linux.

Think of Wine as a compatibility layer, when a Windows program tries to perform a function that Linux doesn't normally understand, Wine will translate that program's instruction into one supported by the system. For example, if a program asks the system to create a Windows pushbutton or text-edit field, Wine will convert that instruction into its Linux equivalent in the form of a command to the window manager using the standard X11 protocol.

WineXS is a GUI (Graphical User Interface) for Wine. WineXS allows you to easily configure Wine by installing and removing  software, editing the registry, managing files, and more.

Download WineXS from here
Extract it to a directory: tar -zxvf winexs-1.4.2.tgz
Move inside the extracted directory: cd winexs/
Run WinEXS: ./winexs

Software Installation screen:

Install MS fonsts screen:
Read more

Howto install Skype 2.1 beta in Ubuntu

A new beta version of Skype for Linux has been released and includes a slew of new features that Linux users have been waiting for a long time. There are also a few tweaks and UI changes that will make using Skype on Linux a better overall experience for anyone who uses this popular client to make calls via their computer.

Here's a list of all the new features and some of the improvements you'll find in Skype version for Linux:

    * High Quality Video support.
    * Skype's SILK audio codec.
    * Pulse Audio support
    * SMS sending support.
    * Chat messages editing/removing support.
    * Typing notification in chat.
    * Chat picture support (add/change/remove) for group conversations.
    * Mood messages are visible in contact list and tooltip.
    * Video/Mobile icons are visible in contact list.
    * Bookmarked Chats are visible in contact list.
    * Contact labels/tags.

    * Right-clicking on the user name in the chat will open contact menu.
    improvement: A day divider is added to the chat. Timestamps are shorter for old messages.
    * Clickable links in mood message.
    * Enlarged tray icon, also showing number of missed events.
    * Flag button is replaced by button showing number of missed events.
    * Updated ALSA device detection, nicer to USB headsets.

Install Skype 2.1 beta in Ubuntu
First you need to remove the existing version of skype using the following command

    sudo apt-get autoremove skype skype-common

Download .deb package from here and install the downloaded package using the following command

    sudo dpkg -i skype-ubuntu-intrepid_2.1.0.47-1_i386.deb
Read more

HowTo Get ClearType like Smooth Fonts in Ubuntu Linux

Turning on ClearType mode if you’re using an LCD monitor helps a lot in improving readability. Ubuntu, by default, doesn’t have ClearType turned on. However, you could achieve really nice font smoothing by just choosing an option in the settings.

In order to turn text smoothing on in Ubuntu, do the following:

    * Go to System > Preferences > Appearance
    * Go to the Fonts tab
    * Under rendering, select Subpixel Smoothing (LCDs)

  * Click close
Read more

Speeding up Linux Using hdparm - Optimize Hard Disk

hdparm is a command line utility for the Linux operating systems to set and view SATA and IDE hard disk hardware parameters. It can set parameters such as drive caches, sleep mode, power management, acoustic management, and DMA settings.

Changing hardware parameters from suboptimal conservative defaults to their optimal settings can improve performance greatly. For example, turning on DMA can in some instances double or triple data throughput.

Here's how to put hdparm to use on your computer. Unlike recent tips, for this one you start by logging in as root. Type: $ su

Type the root password at the prompt. Then type: # hdparm -tT /dev/sda
Above commands should display a screen something this:

    Timing cached reads:   1174 MB in  2.00 seconds = 587.03 MB/sec
    Timing buffered disk reads:  174 MB in  3.01 seconds =  57.81 MB/sec

This performance isn't bad, but could be improved by tweaking some settings. Before you jump right in though, be sure to take some precautions. Some tweaks can cause problems, and may even make your hard disk unstable. First check the current settings: # hdparm /dev/sda

This will return something like:
multcount= 16 (on)
IO_support= 0 (default 16-bit)
unmaskirq= 0 (off)
using_dma= 1 (on)
keepsettings= 0 (off)
readonly= 0 (off)
readahead= 256 (on)
geometry= 65535/16/63, sectors = 60040544256, start = 0
Write down the parameters and their values, so you can set them back to the old values if needed.
To find additional info about your hard disk, use this command: # hdparm -i /dev/sda
This set of sample results from the above command shows just how detailed the information will be:

    Model=WDC WD800BD-22LRA0, FwRev=06.01D06, SerialNo=     WD-WMAM9P258947
     Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
     RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=65
     BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=?1?
     CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
     IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
     PIO modes:  pio0 pio3 pio4
     DMA modes:  mdma0 mdma1 mdma2
     UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
     AdvancedPM=no WriteCache=enabled
     Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

    * signifies the current active mode

These are possible settings for your hard disk, and the tweaks you might make.
As an example, to set 32-bit I/O support flag to 3, multicount to 16 and DMA (Direct Memory Access) to 1 (= on), you give the following command from root:  # hdparm -c3 -m16 -d1 /dev/sda

Enabling DMA can in some cases lead to serious instability. To disable DMA:  # hdparm -d0 /dev/sda
After making changes, check to see if performance has improved: # hdparm -tT /dev/hda
Read more

File Access Permissions on Linux

File protection with chmod
chmod 400 file    To protect a file against accidental overwriting.
chmod 500 dir     To protect yourself from accidentally removing,  renaming or moving files from this directory.
chmod 600 file    A private file only changeable by the user who entered this command.
chmod 644 file    A publicly readable file that can only be changed by the issuing user.
chmod 660 file    Users belonging to your group can change this files, others don't have any access to it at all.
chmod 700 file    Protects a file against any access from other users, while the issuing user still has full access.
chmod 755 dir     For files that should be readable and executable by others, but only changeable by the issuing user.
chmod 775 file    Standard file sharing mode for a group.
chmod 777 file    Everybody can do everything to this file. 

Special modes sticky bit
         sticky bit
        chmod +t
         when set on
        file:  if sticky bit set, after job execution, the command is kept in memory
        directory: can only change files in this dir when user is owner of the file or has  appropriate permissions see /tmp

Special modes set id
         set user id bit SUID
        chmod u+s
         set group id bit (SGID)
        chmod g+s
         when set on
        binary file: when run it runs with the group and or user of the file not the group/user of the person running it.
        directory: (SGID only) every file created in the directory takes same group as the directory, not the  creator's group. 
            note: existing and copied files keep their group id)

Special modes numeric (octal) representation
0 setuid, setgid, sticky bits are cleared
1 sticky bit is set
2 setgid bit is set
3 setgid and sticky bits are set
4 setuid bit is set
5 setuid and sticky bits are set
6 setuid and setgid bits are set
7 setuid, setgid, sticky bits are set

Special modes textual representation
         SUID: If set, then replaces "x" in the owner permissions to "s", if owner has execute ermissions, or to "S" otherwise. Examples:
-rws------ both owner execute and SUID are set
-r-S------ SUID is set, but owner execute is not set
         SGID: If set, then replaces "x" in the group permissions to "s", if group has execute permissions, or to "S" otherwise. Examples:
-rwxrws--- both group execute and SGID are set
-rwxr-S--- SGID is set, but group execute not set
         Sticky bit: If set, then replaces "x" in the others permissions to "t", if others have execute permissions, or to "T" otherwise. Examples:
-rwxrwxrwt both others execute and sticky bit are set
-rwxrwxr-T sticky bit is set, but others execute is not set
Read more

How To Write, Compile and Execute C Programs under Linux

Most Linux and Unix programs are written in C. When you download source for a project, it will often be C or C++ source code. You don't necessarily need to know a darn thing about C or anything else to compile the source if you aren't changing it. It may be helpful for you to understand a bit if you are having problems with the compile, but even that isn't really necessary.

You can type you C program using any of the editors that are available under Linux such as vi or emacs or any other editor. My favourite is vi.

Source Code:
Write a Hello World C Program: Create a file call "firstprogram.c" in vi and type the following content into this file and save it.
   printf("Hello World\n");
   printf("My First C Program\n");
Once you have written and saved your C program using any editor return to the prompt. An “ls” command should display your C program. It should have the .c extension. Now at the prompt type the following

$ gcc firstprogram.c

You would be having a a.out in the same directory as the source C file. This is the default name of the executable that gcc creates. This would create problems when you compile many programs in one directory. So you override this with the -o option followed by the name of the executable

$ gcc -o hello firstprogram.c

Would create an executable by the name hello for your source code named firstprogram.c
Running the executable that you created is as simple as typing the following at the prompt.

$ ./hello

Or whatever you named your executable.
Read more

How To do "Man in Middle" Attack using Ettercap

"Man in Middle" Attack is a form of active eavesdropping in which the attacker makes independent connections with the victims and relays messages between them, making them believe that they are talking directly to each other over a private connection when in fact the entire conversation is controlled by the attacker. The attacker must be able to intercept all messages going between the two victims and inject new and modified messages to one or both of them, which is straightforward in many circumstances (for example, an attacker within reception range of an unencrypted Wi-Fi wireless access point, can insert himself as a man-in-the-middle). example in form of picture is shown below.

Ettercap is a suite for man in the middle attacks on LAN. It features sniffing of live connections, content filtering on the fly and many other interesting tricks. It supports active and passive dissection of many protocols (even ciphered ones) and includes many feature for network and host analysis.

Installation: OpenSuSe 11.1 user can use "1-click" installer to install Ettercap - Here

Running Ettercap:You need to select a user interface (no default) using -T for Text only, -C for the Ncurses based GUI, or -G for the nice GTK2 interface (e.g) - # ettercap -G

Open Ettercap in graphical mode: # ettercap -G

Select the sniff mode: Sniff Unified sniffing and Scan for host inside your subnet Hosts Scan for hosts

See the MAC and  IP addresses of the hosts inside your subnet: Hosts Hosts List, from this list Select the machines to poison

We chose to ARP poison only the windows machine and the router
Highlight the line containing and click on the "target 1" button.
Highlight the line containing and click on the "target 2" button.

Start the ARP poisoning: Mitm Arp poisoning and start the sniffer to see the activities

ARP TRAFFIC before the poisoning:
As you can see that the router and the Windows machine send an ARP broadcast to find the MAC address of the other.

who has Tell is at 11:22:33:44:11:11
who has Tell is at 11:22:33:44:55:66

ARP TRAFFIC after the poisoning
The router ARP broadcast request is answered by the Windows machine similarly than in the previous capture.

The difference between the two steps comes from the fact that there is no request coming from Windows ( to find the MAC address associated to the router ( because the poisoner continuously sends ARP packets telling the Windows machine that is associated to his own MAC address (11:22:33:44:99:99) instead of the router MAC address (11:22:33:44:11:11).

who has Tell is at 11:22:33:44:55:66 is at 11:22:33:44:99:99 is at 11:22:33:44:99:99
Read more

Command line Audio CD Ripper for OpenSuSe Linux - RipIT

RipIT is a  Perl  script which makes it a lot easier to create "mp3" files from an audio CD. RipIT supports Flac, Lame, Oggenc and Faac. Artist and song titles are retrieved with the  and it is possible to submit and edit CDDB entries at Hidden tracks and ghost songs are detected and splitted into chunks of sound, a toc (cue) file permits to burn the wavs with text and no gaps in DAO mode. Several encoder formats and qualities can be used at the same time and encoded into different directories.

RipIT will do the following without user intervention:
    * getting the audio CD Album/Artist/Tracks information from CDDB
    * ripping the audio CD Tracks
    * encoding to Flac, mp3 or Ogg
    * id3 tags encoded songs
    * creating an playlist (m3u) file
    * optionally generating a toc (cue) sheet for nice DAO burning
    * optionally preparing and send a CDDB submission and save it locally
    * optionally extracting hidden songs and split ghost songs
    * optionally creating md5sum files for all tracks
    * running several encoder processes at the same time and same run

Download RipIT rpm file (from here) and install it using command:
# rpm -ivh ripit-3.7.0-3.noarch.rpm 
or to update an existing old package, type:
# rpm -Uvh ripit-3.7.0-3.noarch.rpm
To specify a CD device, type: ripit --device /dev/sr1
To specify the output directory, type ripit --outputdir /foo/paths/
To rip'n'code a special track selection, type ripit 1,3-6,8-11
To use several encoders in the same run, type ripit --coder 1,0,2 --quality 3,5,6

There are many more useful options that you can pass to ripit, look at the man pages for more detail.
Read more

How To Monitor Your System Performance In OpenSuSe Linux

System performance monitoring is normally done in response to a performance problem. Either the system is running too slowly, or programs (and sometimes even the entire system) fail to run at all. In either case, performance monitoring is normally done as the first and last steps of a three-step process:

  * Monitoring to identify the nature and scope of the resource shortages that are causing the performance problems.
  * The data produced from monitoring is analyzed and a course of action (normally performance tuning and/or the procurement of additional hardware) is taken to resolve the problem.
  * Monitoring to ensure that the performance problem has been resolved.

You can monitor your OpenSuSe system in one of the following fast and easy ways.

System Monitor
System Monitor is a default installed utility to monitor the system. It can be loaded from
Applications System Monitor System Monitor.

It has a very groovy graphical interface with two main tabs, Process Table and System Load.

Process Table shows the CPU,  memory, and network performance in the form of graphs. Have a look at the following screen shot.

Now, go to the System Load tab, it will show you all running programs along with their memory usage. From here you can get an idea which program is consuming more resources of your system and for here you can even kill or change the priority of the process (Rt click on the process and check all those things that you can do to a selected process).

Read more
Related Posts with Thumbnails