Showing posts with label Tutorials. Show all posts

How to Install True Combat: Elite on Ubuntu

True-Combat-Elite-Logo

True Combat: Elite is converted from Wolfenstein: Enemy Territory. True Combat: Elite is a team game set-up in modern day era. You take the role of elite mercenary soldier and have to deal with two internationally operating forces.

Game Features

  • The game is absolutely free to download.
  • Tactical-teamplay oriented, modern-world combat simulation
  • Realistic weapon behavior simulation
  • Iron sight aiming system, no crosshair
  • Sophisticated ballistic simulation including multiple-layer object penetration
  • Professional mode: 1-life, short-timed, objective driven scenarios in realistic environments
  • Independent minimods: objective, bodycount and capture the flag
  • Balanced, team specific set of real-world weapons (Beretta 92, Glock 19, Ump45, Mac-10, M4, Ak-47, and much more)
  • Rich, deluxe graphics, based on high-resolution digital-camera shots and HDR lighting
  • Lag compensation, client-side bullet prediction, punkbuster support
  • Immersive and lethal, fast-paced action

Installation Steps

  1. Install the package to add PlayDeb PPA from here
  2. Run the following commands to install Wolfenstein: Enemy Territory: sudo apt-get update && sudo apt-get install enemy-territory
  3. Start Enemy Territory once and create a User
  4. Extract TCE 0.49 and put the Folder "tcetest" in "/home/yourusername/.etwolf
  5. Extract the TCE 0.49b Patch and put the Content of the Folder in the "tcetest" Folder
  6. Now TCE should be listed as a Mod in Enemy Territory
  7. Run the Mod

What are Static Fields and Methods? - Java Tutorials

java-default-logo-icon-png-large-orignal-png

Every program that you make in Java main method is always tagged with the keyword static. Similar to main other method (as well as Fields) can be defined as static.

Static Fields

If a field is defined as static it will mean that there will be only one instance of such field. Consider the following code:

class Employee{
 private int empId;
 private static int nextId = 1;
 private String empName;
 
 Employee(String name){
  empName = name;
  empId = nextId;
  nextId++;
 }
 
 void getDetails(){
  System.out.println("ID: " + empId);
  System.out.println("Name: " + empName);
 }
}

The above class assigns a unique id to every employee that is created. Here, nextId is defined as static which means that there will be a single unique nextId available for all objects. For example, if we make 100 objects of Employee class there will be 100 empId and empName, but only 1 nextId created. The static field (nextId in this case) will be common for all objects.

Static Constants

Static variables are quite rarely used or defined. However, static constants commonly used, consider the following example:

class someMathsClass{
 ...
 private static final double pi = 3.14159265358979323846;
 ...
}

Here we use the keyword final to make pi a constant and the keyword static makes sure that there is only one copy of it available for all objects.

Static Methods

Static methods are the ones that do not operate on objects. To call a static method we use the class name followed by '.', for example:

The pow defined in Math class is static. So, you do not need to make an object of Math to use pow, to call pow you simply write:

Math.pow(a, b)

Since, static methods do not operate on objects they cannot make a call to instance variable but you can make a call to static variable from static methods.

GIMP tutorial, How to take a screenshot in GIMP

GIMP-Logo-Large

Being able to capture what is on your screen can be useful at time (one example can be this tutorial in which I had to use pictures of my screen). Taking a screenshot is fairly simple and straight-forward in GIMP. All you have to do is goto File > Create > Screenshot....

GIMP-Screenshot-create-image-from-a-screen-shot-menu

Following the menu as shown in the above picture will open the following window that will help you take the screenshot. From here on all you have to do is choose the right option.

GIMP-Screenshot-Dialog-Box

The window shown in the above figure provide three options (all of them doing exactly what they say):

  • Take a screenshot of a single window
  • Take a screenshot of the entire screen
  • Select a region to grab

Take a screenshot of a single window

If you want to capture only a single window just select this option and click snap. Doing so will allow you to capture any single window that in visible on the screen just by clicking on it.

This option provides a sub-option as well: Include window decoration. You may or may not check it depending on what you want to do. The name is very self explanatory, if you want to include window borders while taking the screenshot select this option and vice versa.

Take a screenshot of the entire screen

Choosing this option will allow you to take the screenshot of the entire desktop. Using the sub-option: Include mouse pointer, you may or may not capture mouse arrow (if normally opt not to capture mouse arrow).

Select a region to grab

If you have to take screenshot of multiple windows or prefer not to capture the entire screen, you can can select this option. It allows the user to capture any portion of the screen. Simple click and drag across the screen and select an area to capture.

What is delay?

There is a sweet little option at the end of the window labeled as delay. Delay can be used to set the time between the moment you press the Snap button and the moment at which the screenshot is taken. Delay option is available while using the options: Take a screenshot of a single window, Take a screenshot of the entire screen

Ubuntu Netbook, a simple tweak to make it work faster

Ubuntu-Lucid-Logo-Orange

Most of the times it happens that Ubuntu Netbook becomes agonizingly slow. Checking the RAM usage shows that only half of RAM is used (and quite obviously half is still free not being utilized) while SWAP memory usage is above 50%. This confuses many (including me) because SWAP memory is a lot slower than RAM and since RAM is available why Ubuntu even bother using SWAP.

What is SWAP?

Before moving to why this happens I will like to tell a few things about SWAP. SWAP is a portion of your hard disk dedicated to work as RAM. RAM is a fast piece of hardware and works more efficiently and so it is preferred that most of the process run in it. But, since RAM is very expensive, Linux makes use of SWAP that actually fakes to be a RAM and is used if RAM memory is not sufficient enough to hold the running processes.

Why Ubuntu uses SWAP when RAM is available

The problem here is RAM is available and Ubuntu is still using SWAP memory. This is due to the fact that the default value for swappiness is 60. Now what is swappiness? Swappiness is a parameter that controls the likelihood of the kernel to move the processes from RAM to the SWAP (a sort of virtuall ram). This value can be altered from 0 to 100. The higher the value the higher will be the chance of processes being moved to SWAP area and vice versa. So, here we are simple going to lower the swappiness value. A swappiness value of 10 is recommended but the default value is 60

How do I decrease swappiness value

To change the swappiness value just follow the following instructions. :

To see the current swappiness vaule type this in Terminal (to open terminal goto Application > Accessories > Terminal) and type the following command

cat /proc/sys/vm/swappiness

To temporarily change the swappiness value (lost on reboot) type:

sudo sysctl vm.swappiness=10

To change the swappiness value permanently type the following to open sysctl.conf in editor:

gksudo gedit /etc/sysctl.conf

Now search for vm.swappiness and change it to vm.swappiness=10. If vm.swappiness is not found then add following at the end of the file:

vm.swappiness=10

Save and reboot your system, you will notice the increase in performance.

Source:

Tips on how to choose a safe password

green-safe-lock-icon-representing-safe-password

Easy to remember is easy to steal, it is as simple as that. Many people think that it is OK to have a simple and easy password, not even thinking a way to choose a safe password. Having as easy password is risky especially when your password protects some sensitive information like credit card number, account number, etc.

A large number of security attacks start with a stolen password. Which makes it extremely important for a user to know how to set a safe password. From security point of view a safe password is a combination of random numbers, letters, and other characters. Passwords like these can be hard to remember so people write them down, which is a bad habit (as bad as a weak password). So, it is important to have a password that can be remembered and can be categorized as a safe password and this tutorial will show you how.

How not to choose a password

People make some very common mistakes while choosing their passwords and end up with some pretty weak passwords that are easy to hack. Before going any further I think it is important to describe some common mistakes that should be avoided while choosing a password.

  • Never use your own name (or username) as password.
  • Name of a relative, friend, pet, actor, or some other name should not be chosen. As, they are easy to guess when a person is going for a targeted attack.
  • Don't use the name of your favorite book, movie, play, location, etc. These are the first obvious guess of a hacker when they are trying to break into the account of someone that they know.
  • Any information that is personally relevant to you is again easy to guess. So, things such as address, SSN (Social Security Number), etc. should never be used.
  • Any single word in a language is vulnerable even spelled backwards.
  • An obvious misspelling like, f00tball (where number 0 is replace by letter o) or any similar can be guess specially in dictionary-attacks.
  • Never write down your password, specially for root accounts.
  • A name that appears or is near the monitor of the system falls in the category of don't do while selecting a safe password.
  • Ascending or descending order of numbers are fairly weak.
  • A string of same characters or characters that appear in the same row of a keyboard should never be user.

How to choose a safe password

Now that we know what not to do, lets move on what to do when choosing a good password. I'll use a two step process that will involve selecting a base for the password that will make it easy to remember and in step two I will modify it making hard for password cracking tools to crack it. Passwords created in this way are extremely safe and can't be hacked easily, so the following method is advised.

Step 1: Selecting a good base

First step is selecting a good base that is a string of characters that are easy to remember and must not appear in any language's dictionary. You can start with choosing a sentence and then combining the first letter of each word for example you can use sibfhh using smoking is bad for human health.

Another way of selecting a base is to combine two different words making a single word that does not appear in the dictionary for example you can use ruitpunc (by combining Fruit and Punch), now ruitpunc is not a part of dictionary so it a good choice and it is easy to remember too. So, it is also a good base.

Step 2: Modifying the base

Once you have selected a strong base using the method given in the first step now it time to make it more hard for the cracker to crack in. The aim of these modifications it to make the password move away from the original base. You can try one of the following modifications:

  • Add random punctuations, number, or control characters
    Start modifying the base by adding punctuations, number, or even control characters to it. We can modify our initial base sibfhh as si#bfh@h. Make sure to use the modification in between the base rather than at the end or start.
  • Change case at random
    This modification may not be all that effective on some systems which don't support case-sensitive passwords. But most of the system do, and it is important enough to employ it. In this way we can further modify the base as sI#bfH@h.
  • Reverse order of one base word
    If pair of words are used, you can reverse the order of anyone of them or you can change the order of any two letters at random for example we can modify sI#bfH@h as sI#fbH@h. Again it is not that effective but it will increase the search time of the cracker.

Once you are done with all these steps you will be left with a very very strong and safe password (sI#fbH@h in this case). This password is easy enough to remember and is hard for a cracker to crack. But, remember not to make password too hard to remember for yourself and you will be fine.

Blocking network traffic on a Linux System using iptables or ipchains

When someone from outside your network or system attempt to enter your system without permission he has to deal with your firewall first. If the firewall is not strong enough the intruder can have an easy time attacking your system. Even on home computers that are not connected to public networks can become a victim of unwanted intrusion.

Linux systems come built-in with a fine firewall with-in the Kernel. The firewall can be configured by the superuser using an interface. Two available interfaces are called ipchains and iptables. ipchains uses a stateless packet filter, meaning that package will be filtered against the set of pre-defined rules but the decision taken against the package won't be influenced by the previous packages.

While ipchains benefits from stateless model, iptables uses the stateful package model. The decisions to accept, reject, or forward a package are influenced by the previous packages in iptables. Only one of the two interfaces can be used at a time and this decision can only be made at kernel compile time.

So, if you haven't compiled your own kernel (you wouldn't have, if you are using a distribution released by someone other than you), then you would have to find out what interface the kernel of your distribution uses.

Block incoming network traffic

If you block incoming network traffic from your system the outgoing network traffic won't be affected by it. Using this method the firewall will block all traffic that is not sent by your system. You can use the following commands to block incoming network traffic:

For iptables

# iptables -F INPUT
# iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT
# iptables -A INPUT -j REJECT

For ipchains

# ipchains -F input
# ipchains -A input -i lo -j ACCEPT
# ipchains -A input -p tcp --syn -j REJECT
# ipchains -A input -p udp --dport 0:1023 -j REJECT

Block outgoing network traffic

For iptables

The following commands will block all the outgoing signals from your system. This won't affect any of the incoming traffic on your network:

# iptables -F OUTPUT
# iptables -A OUTPUT -m state --state ESTABLISHED -j ACCEPT
# iptables -A OUTPUT -j REJECT

For ipchains

# ipchains -F output
# ipchains -A output -p tcp ! --syn -j ACCEPT
# ipchains -A output -j REJECT

Block all network traffic

The easiest way to block all network traffic is to stop your network device or may be a simple act of unplugging the network cable can do. But, if you want to do it using the firewall you will have to enter the following commands:

For iptables

# iptables -F
# iptables -A INPUT -j REJECT
# iptables -A OUTPUT -j REJECT
# iptables -A FORWARD -j REJECT

For ipchains

# ipchains -F
# ipchains -A input -j REJECT
# ipchains -A output -j REJECT
# ipchains -A forward -j REJECT

How to install Linux softwares from source code



Many Linux softwares come with easy to use package installer and dependency resolver that make software installation a lot easier and pain-free for the users. But, even with all the modern day utilities it is sometimes necessary or even advisable to compile/build the software from the source code. One reason for that is the packaged version of the program may not be available (yes! it still happens even these days) or sometimes building softwares from the source is rather preferable specially when building security critical applications.
Installing softwares from the source code is rather frowned upon, more than anything. Many people say it is confusing and hard, but all those are just myths. If you follow the instructions given within the source code you can install the software quickly and more easily. Most of the source codes can be built/compiled using the standard configure-make-make install method mentioned in this post, but it is always preferable to read the documentation of the software.

Tools needed for building/compiling from the source code

There are two categories of programs that you may need to build your softwares from the source code:
  1. Essential development tools required in all Linux systems
  2. Specific libraries or utilities on which the program, you are compiling, depends
Following are some standard development tools that you may need to build your software from the source code:

GNU coreutils

This is a large collection of essential system utilities: shellutils, fileutils, and textutils. (See http://www.gnu.org/software/coreutils/ for more info on coreutils.)

GNU binutils

Utilities releated to binary files (Details at http://www.gnu.org/software/binutils/).

gcc

GNU compiler collection, containing C, C++, Objective-C, Fortran, Java, and Ada, and libraries for these languages.

GNU tar

Archiving utility for source tarballs; these end in .tar.

gunzip

Compression utility often paired with tar. These end in .tar.gz.

bunzip2

A super-compression format for packing and unpacking tarballs; these end in .bz2.

make

This does the work of reading your configuration options and building the actual program files.
Note: Most of the Linux distributions have an option to install Core Development Tools so that you don't have to install them separately.
Files on which the program is dependent will be listed some where in the documentation of the source code.

The installation process

The standard way to compile and build a software, from source code, which comes in either tar.gz and tar.bz2 packages is as follow (again note that it is same in most of the softwares but documentation MUST be referred to before going any further.):
  • tar zxvf package-1.0.tar.gz (or tar jxvf package-1.0.tar.bz2)
  • cd package-1.0
  • ls
  • less README
  • less INFO
  • ./configure —help
  • ./configure
  • make
  • make install | tee install-output-makeinstall (this stores the installation output in the text install-output-makeinstall)
The above standard steps will help you install most of the softwares available, but you need to study your configure options carefully. So, make sure to read the configuration help file (using ./configure —help) before trying to install the software.

Advantages/Disadvantages of Compiling from the source

Advantages

  • You can set the exact configuration options
  • You can optimize the program for your specific architecture
  • You get ultimate control over the installation

Disadvantages

  • Updating or removing the softwares can be very hard
  • Dependency resolving can be very painful
  • Compiling the programs might take a lot of time

Printing out files in PDF from any application using Cups-PDF

PDF-File-Icon-3D

Both Windows and Mac OS X support exporting various file formats to PDF, by creating a virtual printer that actually exports files as PDFs. The same functionality can be achieved on Linux using a very useful package 'Cups-PDF'. Cups-PDF can be found in the repositories of most of the distributions, if not you can get it from the official website. I will be using Ubuntu 10.04 LTS - the Lucid Lynx in this demonstration.

Go to the package manager of your distribution and search for Cups-PDF and install it. In Ubuntu you can either use Synaptic Package Manger to download Cups-PDF or you can simple open terminal and type the following command:

sudo apt-get install cups-pdf

Once Cups-PDF is installed on your distribution, it will add a virtual printer to your operating system. Now to print a file to PDF, simply open your application software and click on the print option you will see a printer named PDF in the list along with your other printer (if any). Now, print the file using PDF printer it will put the generated PDF to the PDF folder present in your home.

Note: If the printer is not added in your distribution automatically after downloading the Cups-PDF you may need to add the printer manually. Add a printer via the add printer wizard, add a local printer select Generic under the Manufacturer field, and choose postscript color printer as Model.

How to show Computer, Home, Network, and Trash icons on desktop in Ubuntu

To give it a more neat look Computer, Home, Network, and Trash icons are hidden on Ubuntu desktop by default. Most Linux user prefer not to have these icons on the desktop as they are easily accessible from the Places menu from the top panel. But, a user coming from Windows background might like to have these on the desktop. There is an easy way to make them visible on the desktop, just follow the following simple steps:

First you have to open Ubuntu's Configuration Editor. To open configuration editor press Alt + F2 (hold alt button and press F2). This will open a Run Application windows, now type the following command in the input box:

gconf-editor
conf-editor-using-run-application-in-ubuntu-screenshot

Now press the run button, it will open Configuration Editor's window.

conf-editor-using-run-application-in-ubuntu-screenshot

From the tree menu on the left, click the plus button besides apps, and search for nautilus. Open nautilus and click on desktop.

configuration-editor-with-tree-showing-nautilus

On the right hand side you will see the options, computer_icon_visible, home_icon_visible, network_icon_visible, and trash_icon_visible, check all (or some) of them. Close the windows and you will see the icons on the desktop.

configuration-editor-with-tree-showing-nautilus-desktop-icons

9 Suspicious Events that you should investigate while detecting System Intrusion

System-Security-Warning-Icon-PNG-Small

Linux systems vary greatly in how they operate. One system might normally run with a high CPU load, whereas another might normally run with little or no load. One computer might normally see little network traffic, whereas another might regularly transfer gigabytes of data every day. As a system administrator you should be aware how your system normally behaves.

One method of detecting intruders is to be aware of normal operations of your system and then detecting any deviations from that standard. Even simple signs like higher-than-normal system load, unusual files or changes to configuration files can indicate an intrusion. Looking for odd system behaviors can help you find intruders in the system. Even if the odd behavior is not due to a system intrusion, still it points to a problem that needs fixing.

Unusual Load Averages

A load average is a measure of the demand for CPU time placed on the system by all the programs it runs. Load average can be checked with uptime or top. Many GUI environments now also provide load average meters. Check if the load average changes from its usual range, if it does it might be an indication that a cracker could have broken into the system and is using some CPU-intensive programs or is causing the programs to crash. But, there may also be a possibility that legitimate users are demanding more CPU time for normal reasons or the CPU-intensive programs are crashing for other reasons.

Unusual Network Traffic

Similar to load averages, a system normally sees a certain range of network traffic. One possible cause of changes in network traffic patterns can be an intrusion. A cracker might be using your system as a node in a distributed denial-of-service (DDoS) attack, for instance, chewing up your network bandwidth. On the other hand, you could be seeing an innocent spike in demand for a server's services, or a user could be downloading unusually large files for legitimate reasons. One way to monitor network traffic is to watch the activity LEDs on a NIC, hubs, switches, telephone modems, and broadband modems. Typing ifconfig eth0 (or a similar command for an interface other than eth0) produces a measure of transmitted (TX) and received (RX) packets.

Strange Running Processes

Process monitoring tools (such as ps or top) show the currently running processes. If you see a process that you are not familiar with, take it as a sign of problems or it may be some user running a harmless process. So, you should make sure that you spend enough time with the processes to determine what processes are normal for your system.

Odd Program Crashes

Programs crash, even on Linux. After you have spend sometime with Linux you would be able to notice which programs crash on your system and which don't. If another program starts crashing, it could be that an intruder has changed a configuration file, support libraries, or even the program executable file itself, thereby causing the crashes. Alternatively, it could be that a routine system upgrade or an error on your part caused these problems. Program crashes can also be early signs of deteriorating hardware, such as RAM or a hard disk starting to go bad.

Changes in Program Behavior

n most cases, programs should behave in a very predictable manner. For instance, if your bash shell presents a plain dollar sign ($) prompt today, it should do the same tomorrow unless you change the configuration file. If a program's behavior changes suddenly and without your having updated it or changed its configuration file, an intruder might have fumbled a takeover by inadvertently altering a configuration file detail or by changing a program file. On the other hand, you might have forgotten a legitimate upgrade or change, or the program might be responding to some other change in the system that you don't realize is related. If you share administrative responsibility for the system, perhaps another administrator has made a change.

Peculiar Log Entries

All Linux systems maintain log files, most of which reside in /var/log and its subdirectories. These log files may contain clues concerning an attempted or successful intrusion, such as repeated login failures or reports of unusual server stop/start cycles. Crackers often try to cover their tracks by editing or deleting log files, so even missing log files or gaps in log files can be signs of trouble.

Filled Filesystems

If you notice that a filesystem has filled up, you should investigate the matter. Even if it's due to innocent causes, such as increased user demand for storage space, you must correct the problem. Sometimes an intruder might inadvertently or intentionally fill a filesystem. One type of DoS attack involves causing your system to create huge log files, filling your log file partition. Such attacks aren't intrusions per se, but they do require your attention.

Complaints from Other System Administrators

If you notice unfamiliar usernames in ps or top listings or in /etc/passwd or other system configuration files, investigate immediately. Some servers require special accounts to operate correctly, but for the most part, if an account wasn't present when you installed the system and wasn't added by you or another authorized administrator, it's suspect. Make a backup of /etc/passwd right after you install the system, and keep it for reference.

Strange Running Processes

In many ways the worst-case scenario is receiving a complaint from another system administrator. You might receive a phone call or e-mail complaining of suspicious access attempts from your computer. Another common complaint concerns spam originating from your system. Sometimes these complaints are signs of an intrusion; the intruder is using your system to attack others. Other times these complaints indicate that you have a local user who's a "bad apple" and is attacking others. Sometimes (particularly with spam and e-mail worms) the complaint is spurious; it's easy to forge e-mail headers to indicate a false return address, and a spammer may be attacking you indirectly in this way.

All of the about events demand that you do further investigation of the problem. But looking for above suspicious events you can see if your system is vulnerable or not.

Managing and editing your photos using F-Spot, Tutorials and Tricks

F-Spot-Logo

F-Spot is photo manager designed to work on GNOME desktop. If you have got many personal photos or you are just into photography, then you got to use F-Spot. People tend to store photos in folders and try to manage them manually now that is alright for a few hundred images but once the number increase this becomes hard. Photos become hard to search and adding more photos becomes tough as well. So, if you have got lot many pictures or you don't want the labor work of managing them or simple you are just too lazy (like me), don't worry F-Spot will save the day for you.

My first impression of F-Spot was that the interface was really sweet. Sweet in terms of simplicity and ease of use, not much buttons not much confusion. There are two panes, the one on the left shows tags (by default) and can be switched to either one of metadata, Edit, and Folders (each one explained later), and the right pane shows the thumbnails to images. In addition to the two panes there is a very cool timeline, a tool-bar, and a standard menu-bar.

F-Spot currently supports 16 different image formats, so one expects not to have any trouble opening any image that a digital camera takes. It is the default picture manager in Ubuntu and is also available on the package repository of nearly all the major Linux distributions making it easily available to install if not preloaded.

Installing F-Spot

As mentioned above nearly all major linux distributions have got F-Spot on their repositories, so you can use your package manager to install F-Spot on your machine. But, if your linux distribution does not have it in its repository then you will have to do the installation manually.

I will advice you to first look into your package manager and search for F-Spot, in case you can't find it go to F-Spot website. Once you are on the website click on the download option on top bar or visit the download page directly. Under the release section you will see the link to download the package, click it and download the package. Once the package is downloaded extract it in a desired folder. Once extracted, open that folder in terminal and type the following commands in order.

./configure
make
make install

Note: if you are still unable to install, check the readme file or drop in a comment or mail me personally.

How to import photos in F-Spot

When you will run F-Spot for the first time you will be prompted for photo import by F-Spot itself, but if you manually want to import more photos in F-Spot later, like from a camera or some other device, you can do it by pressing the big import button just below the menu bar in the top left corner.

Managing and your photos using F-Spot, How to import photos

When you will press the import button a screen will pop up in front of you, the same screen comes up when you start F-Spot for the first time.

Managing and your photos using F-Spot, How to import photos from a source

Once the above screen comes up, click on the import source to either select a folder or some external media to import images from once you have selected the folder that has the images press import button and the images will start to load.

Once the images are loaded into the window you can press the import button to import them into F-Spot. But, here are a few options you should consider of before importing images:

Managing and your photos using F-Spot, How to import photos from a source
  • Detect Duplicates (Select this option if you don't want to include duplicate photos.)
  • Copy files to the Photo folder (If files are being imported from an external media like camera this option must be selected so that the photos are automatically imported to the hard disk.)
  • Include Subfolders (I prefer this option so that all of the folders are scanned.)

Photo Editing with F-Spot

While in the browser mode double click a photo to enter into the edit mode here in the edit mode you can do some basic (yet useful editing to your photos). F-Spot allows you to do following editing to your image (we will discuss some in detail):

  • Crop
  • Straighten
  • Adjust Colors
  • AutoColor
  • Desaturate
  • Sepia
  • Remove Red-Eye
  • Soft Focus
  • Sharpen
  • Describe
  • Adjust Time

Croping Photos in F-Spot

Croping a photo is like cutting a piece of it, it is good if you want to use the part of the picture only. Like in this whole post images have been cut into pieces just to show you the main parts.

Croping photos using F-Spot

To crop a photo first double click a photo to go into edit mode, and then click on the crop button on in the left pane. Now just click on the photo and keep clicking to select an area that you want to crop. You may also select constraints from the left pane if you prefer.

Straighten Photos in F-Spot

If you took an image that is not straight dont worry F-Spot will correct it. Straighten effect is a tool to level a photo, quite helpful for landscapes taken without a tripod. This tool rotates an image by a specified angle and automagically crops the resulted image, so that you always see a perfect rectangle and a straight photo.

Croping photos using F-Spot

to Straighten a photo just select straighten from left pane (in edit mode). and move the bar to select the number of degrees to straighten the image.

Adjust Colors of Photos in F-Spot

It is another useful option, you can do color correction and even change the white balance. So, if you think the image colors are not good and need a but of adjustment go for this option. If you are creative enough you can make the image look artistic.

Adjust Colors of Photos in F-Spot

AutoColor, Desaturate, Sepia Tone in F-Spot

These are basic option not much selection to make just select them from the left pane in the edit mode and click on the button to apply them. Auto Color will adjust the color of the image. Desaturate will wash the colors away, Sepia Tone will add Sepia effect to it.

AutoColor, Desaturate, Sepia Tone in F-Spot Screenshot

Sharpen a Photo in F-Spot

To sharpen a photo first open picture in edit mode. Then, click 'edit' in the menu bar and select sharpen

Sharpen a Photo in F-Spot in F-Spot Screenshot

Now you will see a preview of the image and a small window through which you can adjust the values to modify the image.

Sharpen a Photo in F-Spot Screenshot

Shortcuts in F-Spot

Global Shortcuts

KeyAction
[Rotate the selected photos to the left
]Rotate the selected photos to the right
DelRemove selected photos from F-Spot's catalogue
Shift + DelDelete selected photos permanently from the drive. If possible, they will moved to trash
tView or edit tags for selected photos
F11Full screen view
Ctrl + IDisplays information about the photo
Ctrl + =Zoom-in
Ctrl + -Zoom-out
Ctrl + NImport photos
Alt + (0 to 5)Alt plus a number from 0 to 5 rate the selected picture(s)

Browse Mode Shortcuts

KeyAction
Ctrl+ASelect all
Ctrl+Shift+AUn-Select all
Arrow keys or H, J, K, LMove focus
Ctrl-Arrow keyMove the focus without changing the selection
SpacebarSelect or unselect the focused photo
Shift+Arrow keyAdd/Remove all photos in the row, in the direction pressed, to the selection
Ctrl+Shift+Left arrow or Right arrowDisplays information about the photo
VPops up a larger preview of the picture pointed by the mouse
Ctrl + VZoom-out
Ctrl + NPops up a larger preview and a color histogram of the picture pointed by the mouse

Tag Shortcuts

KeyAction
F2Rename selected tag
Ctrl+TAdd tags to selected photos

Edit Mode Shortcuts

KeyAction
Page Up, Backspace, BGo to Previous Photo
Page Down, Spacebar, NGo to Next Photo
Arrow keys or H, J, K, LGo to Previous/Next photo or move around a zoomed photo
RGo to a random photo
fFull screen view
0Fit the image to the screen
1Zoom Factor to 1.0 (1 screen pixel per image pixel)
2Zoom Factor to 2.0 (4 screen pixels per image pixel)
EscapeReturns to Browser mode
V/td>Examine photo with magnifying glass (Loupe). Doubleclick on the Loupe, or type v again to close it.
Shift-MousewheelFaster filmstrip scrolling
iToggle infobox visibility ''(only when in full screen)''

Quickest way to send emails in Linux

mail-icon-with-@-sign-on-it-blue-in-color

Too busy to open the email client, or you are just too lazy to make some clicks. Both ways you will find this tip useful to send emails without making a lot of effort. This method works for both KDE and GNOME, just press "alt + F2" and in the dialog box that appears just type in the following command:

mailto:address@host.com 

Once you have added your desired address press enter and you will be directed to your email client either KMail (on KDE Desktop) or Evolution (in case of GNOME). Now simply speak your mind out and you are ready to press the big send button.

How to install new fonts (or Windows fonts) in Ubuntu Linux

Ubuntu-logo-brown

There are a lot of reasons why one would want to add new fonts (or may be even Windows fonts) to Ubuntu or other Linux distros. Sometimes some specific fonts are needed in some official document, or sometimes they are just too cool to miss. Whatever reason may be, but a newbie may find it difficult to do so. So, here is a small easy way to add new fonts to Ubuntu (or some other Linux distro).

Step 1

Open the terminal window, by clicking "Application" -> "Accessories" -> "Terminal". In other distros the Terminal may be present in some other directory, so do a little searching (or drop in a comment and mention specific distro).

1 - Ubuntu Screenshot Showing the menu with pointing to terminal

Step 2

Once you have got you Terminal open, type following command in it (and press enter):

sudo apt-get install ttf-mscorefonts-installer

Once the package is installed type this command:

sudo nautilus

Note: Nautilus is the default file browser/organizer in GNOME desktop, if you use desktop other than GNOME type the name of the corresponding desktop after sudo (for example "sudo dolphin" in KDE desktop).

2 - Ubuntu Screenshot Showing the terminal with sudo nautilus

Step 3

One the above mentioned command is executed you will see nautilus open under root.

3 - Ubuntu Screenshot Showing the nautilus open under root access

Step 4

Select "File System" from left pannel. One you are in "File System" open the folder "usr" then open "share". Now search for "font" you will find a folder named "font" open it.

4 - Ubuntu Screenshot Showing the nautilus open under root access with font folder

Step 5

Now if you have followed the instructions correctly, you are in the "fonts" folder and you must be able to see the folders with default fonts. Here create a new directory, I have named it "Windows", because I was copying the windows font. ;)

5 - Ubuntu Screenshot Showing the nautilus open under root access creating new folder

Step 6

Open the newly created directory and copy all of your fonts into it. Now close the file browser.

6 - Ubuntu Screenshot Showing the nautilus open under root access with font folder new fonts added

Step 7

Just to check if the new fonts are now installed open any application (I opened OpenOffice.org Writer). and check if the new fonts are installed proper which are in this case.

7 - Ubuntu Screenshot Showing the Openofficeorg Writer open with all new fonts added

Drop in comments if you have any question.

How to upload photos to Facebook Album using F-Spot


F-Spot is the default picture manager that come with Ubuntu, a very useful software that can help manage you photos, tagging them, import from a device, and many more. F-Spot can also be used to upload photos directly to your Facebook albums.

The Facebook upload feature is not activated by default (for some unknown reason). To upload your photos via F-Spot, open F-Spot. Go to "Edit -> Manage Extensions". Click on the '+' beside "Export" option, then click on the "Facebook export" option and click Enable.

Facebook extension f-spot screenshot

Go beck to the F-Spot gallery select the photos that you would like to upload to Facebook. Go to "File -> Export to -> Facebook".

Export to Facebook f-spot screenshot

Now hit the big login button to login to your Facebook account.

Export to Facebook login page f-spot screenshot

Once login via F-Spot you will be able to create albums, manage photos, add photos to existing albums etc.

How to install Monitorix in Ubuntu

Monitorix-Logo-ubuntu

Monitorix is a free, open source, lightweight system monitoring tool designed to monitorize as many services as possible. At this time it monitors from the CPU load and temperatures to the users using the system. Network devices activity, network services demand and even the devices’ interrupt activity are also monitored, and more. The current status of any corporate server with Monitorix installed can be accessed via a web browser.

It has been designed to be used under production UNIX/Linux servers, but due its simplicity and small size you may also use it to monitor embedded devices.

All its development was initially created for monitoring Red Hat, Fedora and CentOS Linux systems, so this project was made keeping in mind these distributions. Today it runs on different Linux distributions and even in other UNIX systems like FreeBSD.

Monitorix Features

The monitorization includes:

  • System core (CPU load and temperatures, active processes and memory allocation).
  • Global or per-processor/core kernel usage (user, nice, system, idle and i/o wait).
  • Temperatures (HP ProLiant IML Agent and LM-Sensors with HDDtemp support).
  • Mounted filesystems and disk i/o.
  • Activity of up to 5 network devices.
  • Use of SMTP, SSH, FTP, Telnet, Samba, NetAtalk, VirusMail, FAX, POP3 and HTTP services.
  • Complete MTA statistics including anti-spam, anti-virus and greylisting.
  • Activity of up to 12 predefined network ports.
  • Devices interrupt activity (APIC support with up to 256 different interrupts).
  • Support for HP Insight Management Agents for ProLiant servers.
  • Support for Samba v2 and v3, Sendmail, Postfix, NetAtalk, Qpopper and Hylafax status logs.
  • Support for the Nginx web server statistics.
  • Support for remote servers monitorization (Multihost feature).
  • Silent mode to be able to retrieve the graphs from scripts or other programs.
  • Traffic statistics are stored on disk into RRD format fixed-size databases.
  • Possibility to view statistics per day, week, month or year.
  • Possibility to view statistics with rendered graphs or in plain text.
  • Each picture can be zoomed in to see the graph in more detail.
  • Monthly traffic activity report via email can be sent to LAN users.
  • It warns if some selected network port is not listening.
  • Alert capability if CPU load average reaches or exceeds a threshold value for an specified amount of time.
  • Web interface offers minimal learning, ubiquitous access.
  • Configuration with only one text-plain file.
  • Perl and Shell Script based (lightweight tool).
  • Requires the RRDtool package and a CGI capable web server.

Install Monitorix in Ubuntu Server

Install ubuntu LAMP server follow these steps:

Preparing your system

Install the following packages

sudo apt-get install rrdtool librrds-perl libwww-perl

Now you need to download Monitorix source package from here or use the following command

$ wget http://www.monitorix.org/monitorix-1.5.0.tar.gz
$ tar -zxvf monitorix-1.5.0.tar.gz

Go to the Monitorix directory and execute the install script.

$ cd monitorix-1.5.0
$ sudo ./install.sh

Welcome to Monitorix v1.5.0 installation process.

The install script has detected that this is a Linux operating system.

Currently Monitorix supports only the following Linux distributions:
1 - RedHat/Fedora/CentOS
2 - Generic
3 - Debian (Ubuntu)
4 - Gentoo
5 - Slackware

Please select your option:

Choose the option number 3 (Debian).

The following is a list of the default paths where the Monitorix components
will be installed:

1 - /usr/bin
2 - /etc
3 - /etc/init.d
4 - /var/lib
5 - /usr/share/doc
6 - /var/www
7 - /usr/lib/cgi-bin
8 - /usr/share/man/man5

Last chance to stop the installation.
Are you sure to install Monitorix on the paths shown? [y/n]:

The list of paths should be correct. Press y.

Finally start Monitorix.

sudo service monitorix start

Now wait for a while and then go to http://localhost/monitorix/

Orignal Source

How to make Firefox work faster

Fire-Fox-Logo-Mixed-With-Tux

If you are of the many people who think the response time of Firefox is less or consider it to be slow then you might want to try the following:

  • Open Firefox and in the address bar type about:config.
  • Click on "I’ll be careful, I promise".
  • Use the search bar above to look for network.http.pipelining and double click on it to set it’s value to True.
  • Create a new boolean value named network.http.pipelining.firstrequest and set that to True, as well.
  • Find network.http.pipelining.maxrequests, double click on it, and change its value to 8.
  • Look for network.http.proxy.pipelining and set it to True.
  • Create two new integers named nglayout.initialpaint.delay and content.notify.interval, set them to 0.
  • Restart your browser.

    Once you are done. You will see the speed of Firefox would have increased to a greater extent

    How to convert eBooks from one format to another

    Photo-of-Amazon-Kindle-for-reading-e-books

    Suppose you have brought home an Amazone Kindle or a Barnes and Noble Nook, or may be someone gifted it to you (your lucky day, who knows?). Now the problem is you would need to convert you ebooks to .EPUB or .MOBI format, No panic readers because all you have to do is to install Calibre. With this little piece of software you can actually convert between EPUB, FB2, LIT, LRF, MOBI, OEB, PDB, PDF, PML, RB, RTF, TCR, TXT, HTML and more. Even CBR and CBZ (comic book formats) are supported.

    The syntax to the command is fairly simple.

    ebook-convert input_format output_format

    For example, if you want to convert a comic book archive to something readable on an e-ink screen, use

    ebook-convert filename.cbz filename.epub

    or

    ebook-convert filename.cbz filename.pdf

    Not only will ebook-convert convert the file, but it will also trim the white spaces around the page so they will better fit the small screen of an electronic eBook reader.