Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Sunday, March 01, 2009

Linux tips that every geek should know

Tuxradar has a list of over 50 tips that every geek should know

I have used most of them - what about you?

See the full list here

Sunday, December 02, 2007

Enable Video Acceleration on Linux

These are Debian/Ubuntu specific steps

  1. In your terminal, execute lspci -v and check for the manufacturer of your video card. You are likely to find either nvidia or ATI
  2. To install Nvidia drivers
    1. Check for your kernel version using uname -r which might return a output like 2.6.22-14-generic
    2. Install the restricted drivers package - sudo apt-get install linux-restricted-modules-2.6.22-14-generic
    3. Install nvidia-glx module - sudo apt-get install nvidia-glx
    4. Make a backup of /etc/X11/xorg.conf. Edit /etc/X11/xorg.conf and replace the string Driver "nv" with Driver "nvidia"
    5. Exit Gnome and you should see the nvidia Logo. See the difference in framerate!
  3. To install ATI drivers
    1. Install the fglrx driver - sudo apt-get install xorg-driver-fglrx
    2. Make a back up of /etc/X11/xorg.conf. Edit /etc/X11/xorg.conf and replace the string Driver "ati" with Driver "fglrx"
    3. If you want to install ATI's own driver, you might have to check their site for the procedure

Friday, October 05, 2007

Skype 1.4 for Linux

Skype has released a new version of their software for Linux. Codenamed Panacea, it delivers superior voice quality compared to Skype 1.3

Following are the new features of Skype 1.4

  • feature: Command line switches, run “skype —help” for more details.
  • feature: —resources= to set an alternative to /usr/share/skype for resources.
  • feature: Add an option to Sound Devices to enable/disable automatic mixer adjustment.
  • feature: Allow keyboard/keypad to be used to enter DTMF numbers in call window.
  • feature: Clickable links in chat topics.
  • feature: Tooltips for emoticons in the chat window.
  • feature: Chat toolbar with Add People, Send File(s) to Chat, History and Leave Chat buttons.
  • feature: Confirmation dialog for Leave Chat button.
  • feature: Drag-and-drop files to chat input box to send files to chat.
  • feature: Drag-and-drop files to individual contacts in chat or contact list to send files.
  • feature: Drag-and-drop users from contact list into chat input box to send contacts.
  • feature: Drag-and-drop users from contact list into chat memberlist to add to chat.
  • feature: Dragging of contacts into other programs (text entry) will copy skype:.
  • feature: File transfer menu.
  • feature: API OPEN FILETRANSFER and OPEN USERINFO commands.
  • feature: Auto-accept file transfers.
  • feature: “Cleanup transfers” button.
  • feature: Key ‘F6’ to bring main window focus instantly to Quickfilter.
  • feature: Interface language choice in Options based on translation files available (restart required).
  • feature: “New version available” dialog.

Sunday, September 16, 2007

Tennix - tennis on your Linux system

Written in C using SDL, Tennix is a simple tennis game for your playing pleasure

On Ubuntu

sudo apt-get install libsdl-mixer1.2 libsmpeg0

Get the deb file from here

Install

sudo dpkg -i tennix_0.4.0-1\~getdeb1_i386.deb

Go to their home page to know about Game hints and keyboard shortcuts

Friday, September 14, 2007

Reboot your Frozen Linux based system

Ctrl-Alt-Backspace doesn't work ?

Try this

Hold down the Alt and SysRq (Print Screen) keys.

While holding those down, type the following in order. Nothing will appear to happen until the last letter is pressed: REISUB

Watch your computer reboot magically.

What the individual keys do in that sequence are not as important as what it does as a whole: stops all programs, unmounts all drives, and reboots.

To remember this,

Raising Skinny Elephants Is Utterly Boring or R E I S U B - is just the word busier in reverse.

R gives back control of the keyboard
S issues a sync
E sends all processes but init the term singal
I sends all processes but init the kill signal
U mounts all filesystem ro to prevent a fsck at reboot
B reboots the system

Via Fosswire

Sunday, September 09, 2007

Linux - the fastest smartphone OS

Over the next 5 years, Linux is expected to be the fastest growing Smartphone OS with a compound annual growth rate in excess of 75 percent. By 2012, a recent study from ABI Research forecasts the Linux-based OS to account for nearly 31 percent of all smart devices in the market - representing more than 331 million cumulative shipments over the same period.

Read more

Saturday, September 01, 2007

Linux to be Fastest-Growing Smartphone OS

Over the next 5 years, Linux is expected to be the fastest growing Smartphone OS with a compound annual growth rate in excess of 75 percent. By 2012, a recent study from ABI Research forecasts the Linux-based OS to account for nearly 31 percent of all smart devices in the market - representing more than 331 million cumulative shipments over the same period.

More here

Thursday, June 28, 2007

Google Desktop for Linux


Long expected, Google finally has released the popular Google Desktop for Linux. I have just started indexing and look forward to searching man pages in a way I never knew :) - All I used to do was man -k before. This would be so much better I would hope.

Get it here

Sunday, June 03, 2007

sylpheed - the no frills mail client


I haven't tried out sylpheed since gtk-1.2 days. I was looking for a replacement for Evolution which I was using as my second mail client (use Thunderbird as the primary client) .

I wanted the simplest of GUI based mail clients and Sylpheed seems to be perfect fit - Its fast, does most of what a mail clients do (protocols, privacy, junk mail handling, command line options, etc) and more importantly doesn't crash (evolution crashes a lot!). Its a little unconventional in terms of UI, but I guess its manageable.

On Ubuntu

sudo apt-get install sylpheed

Sunday, March 18, 2007

Foxit PDF Reader for Linux

Foxit PDF reader which is claimed to be the Fastest PDF Reader has a Linux version too.. and it plain sucks! Rendering is horrible and it just is unusable. Images in the pdfs are missed and it looks horrible. Just stick to Evince or xpdf or even Acrobat Reader

Saturday, February 03, 2007

Change your forgotten password

This is Ubuntu/Debian specific and might differ in other Linux distributions.

So, you come back after a long vacation and don't remember your password ? Just change the password!

1. Reboot the system and Press Esc to enter the GRUB menu
2. Choose the menu option in which you see the "recovery" option of the latest kernel
3. Let your system boot and you will see a root shell soon
4. Change your password ! using passwd
5. You are done! Reboot and use your new password!

Monday, January 08, 2007

Checking for rootkits

The term "rootkit" (also written as "root kit") originally referred to a set of recompiled Unix tools such as "ps", "netstat", "w" and "passwd" that would carefully hide any trace of the intruder that those commands would normally display, thus allowing the intruders to maintain "root" on the system without the system administrator even seeing them.

Generally now the term is not restricted to Unix-based operating systems, as tools that perform a similar set of tasks now exist for non-Unix operating systems such as Microsoft Windows, regardless of the existence (or lack of existence) of a "root" in the operating system. (Wikipedia.org)

In Linux, you can check for rootkits using 2 different programs

1. chkrootkit
2. rkhunter

chrootkit

One of the popular rootkit checking programs, this program can check for any
rootkits installed on your local machine

On Ubuntu/Debian

sudo apt-get install chkrootkit

Download from http://www.chkrootkit.org/download/

rkhunter

rkhunter does what chkrootkit does plus a whole lot more.

rkhunter can also be updated with the latest definitions and can be run
through cron as well.

On Ubuntu/Debian

sudo apt-get install rkhunter

Download from http://rkhunter.sourceforge.net/

Saturday, January 06, 2007

Apache Performance Tips - Part 1

A few basic tips will go a long way in enhancing your Apache performance. You will have to put in the directives in your httpd.conf or the through a seperate .conf file which you can include through the httpd.conf file.

1. Cache those frequent pages!

How often do you see the Home Page being very slow to load up? A tip would be to use a caching module to cache those pages you think will be loaded very frequently. These pages will be loaded in the memory instead of being retrieved from the filesystem everytime.

Module to use:

mod_file_cache

How and What to use:

There are 2 directives that you can use MMapFile and CacheFile which you can use to Cache the pages you want.

Read the differences between MMapfile and CacheFile

For Example:

CacheFile /home/web2/index.htm
CacheFile /home/web2/about.htm

The above two directives will cache index.htm and about.htm


Don't forget to read the above module page to find out how to cache the contents of a entire directory ;-)

2. Don't use DNS lookups

You don't use the HostNameLookups directive to lookup for dns names in your log file - This is disabled by default in Apache 1.3 and above versions.

Also, make sure you always use a IP address instead of a domain names in your Allow or Deny directives either. It will cost you a lot of performance.

If you need hostnames in your logfile, you just use logresolve

How to use:

HostNameLookUps Off

3. Keep your site alive

HTTP works by requesting for a document over a new connection. So, everytime you request a document, a new socket connection is established, once served, the connection is closed. The time spent for establishing a connection and closing it can be avoided using a directive called KeepAlive

How to use:

KeepAlive On

Other Related Directives

With the above KeepAlive directive, there are 2 other related directives - MaxKeepAliveRequests and KeepAliveTimeout.

MaxKeepAliveRequests is the number of requests to be allowed over a single connection. Default value for MaxKeepAliveRequests is 100. If you have a lot of memory to spare, you could consider putting MaxKeepAliveRequests to 0 to allow unlimited number of connections

KeepAliveTimeout is used to timeout the connection - you don't want to keep the connection established with the client even though they are not using your site - do you ? 15-20 seconds should be a ideal value for KeepAliveTimeout

How to use:

MaxKeepAliveRequests 100
KeepAliveTimeout 20

4. Consider mod_perl

If you are using CGI perl based web application, it pays to consider to using mod_perl

Read this excellent article on mod_perl

How to do it:

PerlModule ModPerl::PerlRun Alias /cgi-bin/ /opt/apache2/cgi-bin/
<location >
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
Options +ExecCGI
< /location >

or

PerlModule ModPerl::Registry
Alias /cgi-bin/ /opt/apache2/cgi-bin/
<location >
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
< /location >
As you see, there are 2 ways to go about using mod_perl, one is the PerlRun method and other is the Registry method basic difference being that in Registry method, code is cached after compilation whereas it isn't . Read more about the porting guidelines

5. Share the load

If you have 2 or more webservers - you can share the load amongst them by shifting some of the pages to the other webserver.

Module to use:

mod_proxy

How and What to use:

ProxyPass /images/ http://web2.techflock.com/
ProxyPassReverse /images/ http://web2.techflock.com/

Read about the above directives at Apache documentation

...to be continued ..

Meanwhile you can also go through Apache Tuning

Thursday, January 04, 2007

10 useful Linux programs you hardly use!

We list out 10 Linux (available on other platforms too!) programs and commands you would probably wouldn't know, nevertheless, and probably very useful.
Not related to each other and just a assorted collection...

Few of these programs have to be installed either through your distribution's package manager

1. catdoc

Got a M$ doc file and don't want to use OpenOffice to open that ? Check the contents of a doc file on your terminal! Get catdoc which does a decent job of converting your doc to text file

Get catdoc

Ubuntu/Debian Users - sudo apt-get install catdoc

Usage: catdoc {name_of_file.doc}

2. pdftotext

Have a pdf and want to convert to a text file ? pdftotext which is included in most of the distributions lets you do just that. pdftotext is part of the xpdf package and can be downloaded here

Ubuntu/Debian Users - sudo apt-get install xpdf

3. pdftk

The swiss-army knife if you have to do anything with pdf manipulation! Read more and get pdftk

Ubuntu/Debian Users - sudo apt-get install pdftk

4. whois

Don't spit fire on me but I know quite a few people who don't know about this one. Hey! there is no shame in learning. This one lets you check who is the domain owner of a ipaddress or domain name. Get it here

Ubuntu/Debian Users - sudo apt-get install whois

5.vimtutor

Want to learn vim? Use the vimtutor - Comes bundled with vim. Gets you started for sure

6. zless, bzless

Have a gzipped or bzipped text file? No need to gunzip or bunzip2 them. View them directly !

Usage:

zless {name_of_file.txt.gz}

bzless {name_of_file.txt.bz2}

7. strings

Mostly used by programmers to check printable "strings" in binaries and libraries - VERY Useful when you want to find out where exactly the error messages are coming from when you are using man third party libraries

strings {name_of_file}

8. x11vnc

x11vnc is a vncserver that lets you run a vncserver on your current X display. I just love it! Are there any other ? I found this and didn't go beyond it find any other!

Get it here

Ubuntu/Debian - sudo apt-get install x11vnc

9. tidy

Got badly idented code ? tidy it up using this nifty program - there are perl, Java and Python versions of tidy too

Get it

10. ssh-agent

Do you type in those passphrases everytime you ssh to a machine? Make those passphrase logins go away with ssh-agent

Read here

Wednesday, January 03, 2007

Basic Networking Commands you should know!

This would be mostly (*)nix based command set - Here we go...

  1. ping {hostname}
    Lets you check whether your internet connection is alive or lost
    Example : ping techflock.blogspot.com

  2. traceroute {hostname}
    Lets you trace packets and find if your connection is broken beyond your ip address. Also can be used to track the number of hops to get to the hostname
    Example: traceroute techflock.blogspot.com

  3. ifconfig
    Find out your ip address, your network interfaces, transferred and received data information
    Example : ifconfig

  4. nslookup {hostname}
    Find out the dns name resolves to a IP - a way to test your dns server
    Example: nslookup techflock.blogspot.com

  5. dig {hostname}
    Does the same as above and provides other dns related information
    Example: dig techflock.blogspot.com

  6. netstat -a
    Find out all the open ports on your machine
    Example: netstat -a

  7. netstat -nt
    Display all the tcp based established connections on your machine
    Example: netstat -nt

  8. telnet {hostname} {port}
    Telnet or connect to a machine at the specified port to find out whether that machine/server is working right
    Example: telnet techflock.blogspot.com 80

Ofcourse, there are many other options within each of these commands which you can find out through the manual pages by typing man {command}

Update:
Some of the commands might be in /sbin or /usr/sbin paths and might not be in default PATH. So go and execute it from there! For Example: /sbin/ifconfig

Saturday, December 09, 2006

Network Interface Configuration Using ifconfig

For you Linux networking newbies, DebianAdmin explains the basic networking commands used in Linux

Go there

Tuesday, December 05, 2006

bmon - monitor your bandwidth


bmon is a little utility for Linux which lets you monitor your download speed & data transfer just like the DU Meter on Windows You can do minutely, hourly or daily monitoring and do it through ascii art ;-) Ubuntu users: sudo apt-get install bmon

Friday, December 01, 2006

History tricks in Bash

  • ! ! - Last command
  • !n - Get the "n" th command
  • !-n - Get "-n" command from the current command
  • !str - Get the command which matches "str"
  • ^str1^str2 - Replace str1 by str2 for the last command

Tuesday, November 28, 2006

A survey of Linux PDF viewers

Portable Document Format, designed in the early 1990s by Adobe Systems, is slowly replacing PostScript as the preferred format for saving and viewing generic documents. Early on, only Adobe supplied programs that enabled users to view PDF files. But since the format's specification is open, Adobe Reader (formerly "Adobe Acrobat Reader") is now only one among an increasing set of PDF viewers. Here's a guide to the best alternatives for Linux users.

Read Via Linux.com

command-line calculations using bc

If like me, you do most of your work from the command-line, using vim to edit files, mutt for e-mails, cd/ls/mv/find/etc instead of a file manager, then you may get annoyed by having to fire up a GUI calculator to make (what may sometimes be) a single calculation.

One useful feature of calculating on the command-line is that you can see what you've typed. For instance, sometimes when I'm entering a long, complex calculation on a calculator (either the GUI or the solid, hold-in-your-hand type), I sometimes forget if I've actually typed in all those numbers or made the calculations in the right order. Maybe it's just me ... :-)


Complete article: command-line calculations using bc