Monday 31 December 2012

TOP 100 LINUX TIPS AND TRICKS - 5


Tip 41: Read files from FAT32 drives
The Linux utility mount can read any file system that the kernel supports. Since version 2.0.34, the kernel
supports FAT32, which is the main file system used by Windows 98.
To read the FAT32 file system you need to specify the -tvfat option to mount. Here is an example:
mount -tvfat /dev/hdb1 /mnt

Tip 42: TV on Linux
A number of cards exist allowing you to watch and record TV on your PC. Most come with software for
Windows only, like so many things, but it is possible to do the same thing on Linux.
Linux comes with several drivers which make up the Video4Linux drivers. Several cards are supported by
these drivers, and a list of them is available at http://roadrunner.swansea.linux.org.uk/v4l.shtml. This is the
driver side. You also need software to use the devices.
Several programs are available to watch TV, capture images and even Web applications. A list of some of the
programs is available at http://www.thp.uni-koeln.de/~rjkm/linux/bttv.html including datasheets.

Tip 43: Device drivers
Hardware devices are not of much use without device drivers. Fortunately, the Linux kernel, like every other
operating system, comes with a lot of them.
When you configure a kernel, the menu from which you must choose which devices you have in your
computer is actually a list of device drivers available to you. Here is how to configure your kernel:
cd /usr/src/linux
make menuconfig
Linux, still not being as popular as some other operating systems, can't support all of the existing hardware.
If you have a device that is not in the list, then you will need to search for it on the Web. Some drivers may
exist for Linux and not be in the default kernel. But if a device is not currently supported by any driver for
Linux, then you will have to wait for someone to make one, or make one yourself.
If you want to write your own driver, the best place to start is at The Kernel Hacker's Guide, available at
http://khg.redhat.com/HyperNews/get/khg.html

Tip 44: Mouse problems
The mouse is a very important part of a computer. In X, you can't do much without it. Even in console some
applications will allow you to use it. You must first configure it.
Like every other device, the mouse has a device file in the /dev directory. Depending on your mouse type, it
will be either /dev/psaux for a PS/2 mouse, or /dev/cua0 for a serial mouse on COM1.
To make it easy to use in the future, you should link the right device file to /dev/mouse:
ln -s /dev/cua0 /dev/mouse
Then, when you configure X Window or any other program that requires a mouse, you can specify
/dev/mouse.

Tip 45: International keyboards
The X Window System comes by default with an english keymap on most distributions. If you have a
keyboard from another country, it may be a problem.
The XKB extension was provided for that purpose. If you look in your X configuration file, usualy in
/etc/X11 called XF86Config, you will find a section about the keyboard. There, you may specify several
parameters, including the keymap and keycodes to use.
For a list of available keymaps, you can look in your X directory. Most of those keymaps are also available
from the graphical configuration program, XF86Setup.

Tip 46: Background image in X Window
By default, the background in X Window is a grey background. Some window managers have their own
options to set other backgrounds, and some don't.
A program you can use to set your background is a program that comes with most Linux distributions. It's
called XV, and you can specify which background image you want with this line:
xv -quit -root image.gif
This will set the background to be the image.gif file. You can add that line in your .xinitrc file, in your home
directory, so it is executed each time you launch X Window.

Tip 47: Customize Netscape Communicator
Netscape Communicator has one nice feature that few people use. When you download it, it has a Personal
Toolbar with buttons that most of us may not find really useful, so we either turn it off or don't look at it.
I found it to be a much more useful tool than the Bookmarks. What appears on that bar is simply what's
inside the Personal Folder inside your Bookmarks.
You can ceate folders in it for news sites, Linux sites, etc and move your bookmarks into them (with the Edit
Bookmarks option).
You then have your own personal portal in your browser

Tip 48: POP3 in Pine
Many Linux users use Pine as their mail client. Lets see how you can use Pine both with local mail and with
POP3 mail, without using fetchmail or some other tool to get POP mail first.
First you will want to use multiple config files:
pine -p localmail
pine -p popserver1
pine -p popserver2
You need to configure Pine to use your POP3 server. In the program go to Setup, Config. You'll want to set
something like this in your inbox-path:
{pop.server.com/pop3/user=myid}INBOX
Now restart Pine and it will ask you for your password and connect to the remote server, and use it just like if
you were accessing local mail.

Tip 49: Multiple accounts in Pine
You can use multiple POP3, IMAP or other incoming mail accounts in the same config file by editing the line
"incoming-folders=" from .pinerc in your local home directory.
The syntax is:
incoming-folders= "Nick1" {pop1.domain.com/pop3/user=login}INBOX,
"Nick2" {pop2.somewhere.com/pop3/user=login}INBOX
This will create a new collection in Pine with these folders in it, plus the mail folder on the local system.

Tip 50: Running Java programs
Java is an interpreted language. Usualy Java is found on the Web, in small programs called applets. But many
Java applications exist. They are like applets, but require a Java Virtual Machine to run on your system.
Netscape Communicator and any Java-enabled browser can run Java applets, but what if you want to run Java
programs?
Java programs are files ending with .class and must be run in a JVM. The Java Development Kit comes with
a JVM. What you need is the Linux port of the JDK that you can find at http://www.blackdown.org. Once
installed, you can run any Java application using the line:
java Program
Where java is the JVM, from the JDK package, and Program is the class found inside the Program.class file.
Note that you do not have to specify the .class part of the file to run it.

No comments:

Post a Comment