Every action there is equal and opposite reaction.

Uncategorized

Ubuntu Tip: How To Launch Programs In The Background From A Terminal Window

ubuntulogo.jpgWhen running programs from an terminal window in Ubuntu, the program process will run in the foreground, occupying the terminal session that started the program. Until the program ends or is closed, you can not start other applications as long as this process is running in the foreground. While you can open another terminal window or use the screen command, Bash shell provides an easier function known as job control that will allow multiple programs to run in the background and return control to the terminal window on Ubuntu.

To use job control and allow programs to return control back to the terminal window, commands entered should be followed with the ampersand character &For example, you want to open Firefox. From the command line you would type:

firefox &

Firefox will open in the background and the terminal window control will be returned allowing you to continue working in the terminal window. If you want to open another program or run a script, you can enter the command follow by &

For longer running programs started in the background, which do not need user input, job control commands can be executed that can show status, suspend, bring a program to the foreground, and return to background.

In the screen shot below, Firefox and Terminal server client applications were started in the background. Executing the jobs command displays all running jobs started in the background.

ubuntujobs1.png

To bring the first program started in the background – Firefox, to the foreground and then suspend the process, execute
fg %1
followed by Ctrl+Z

ubuntujobs2.png

To resume Firefox in the background, execute bg %1

ubuntujobs3.png

Below are all options that can be used with job control:

jobs [-lnprs] [jobspec]
jobs -x command [arguments]

The first form lists the active jobs. The options have the following meanings:

-l
List process IDs in addition to the normal information.

-n
Display information only about jobs that have changed status since the user was last notified of their status.

-p
List only the process ID of the job’s process group leader.

-r
Restrict output to running jobs.

-s
Restrict output to stopped jobs.

If jobspec is given, output is restricted to information about that job. If jobspec is not supplied, the status of all jobs is listed.

If the `-x’ option is supplied, jobs replaces any jobspec found in command or arguments with the corresponding process group ID, and executes command, passing it arguments, returning its exit status.

bg [jobspec]

Resume the suspended job jobspec in the background, as if it had been started with `&’. If jobspec is not supplied, the current job is used. The return status is zero unless it is run when job control is not enabled, or, when run with job control enabled, if jobspec was not found or jobspec specifies a job that was started without job control.

fg [jobspec]

Resume the job jobspec in the foreground and make it the current job. If jobspec is not supplied, the current job is used. The return status is that of the command placed into the foreground, or non-zero if run when job control is disabled or, when run with job control enabled, jobspec does not specify a valid job or jobspec specifies a job that was started without job control.

Ctrl +Z Suspend (stop, but not quit) a process running in the foreground (suspend).

Ctrl +C Interrupt (terminate and quit) a process running in the foreground.


Ardour: A Multichannel Digital Audio Workstation For Mixing, Editing And Recording Instrument Tracks – Ubuntu

Ardour is a free cross platform digital audio workstation software that allows users to edit, mix, and record Instrument tracks. It can also be used as an audio mastering environment. Here are some of its features:

In this guide we will see how to install Ardour on Ubuntu 11.10/11.04, older versions of Ubuntu are also supported by Ardour.

Ardour Installation

To install Ardour on Ubuntu 11.10/11.04, run this command:

sudo apt-get install ardour

To get the latest version of Ardour (currently 2.8.12), you can upgrade the current version with this PPA:

sudo add-apt-repository ppa:pmjdebruijn/ardour-release
sudo apt-get update
sudo aptitude upgrade ardour

[Note]: If the aptitude command is not installed, use this command to install it: sudo apt-get install aptitude


Screenshot:


Install Cinelerra in Ubuntu 12.04 & 12.10

This simple tutorial is going to show you how to install Cinelerra & Cinelerra-CV (Community Version) in Ubuntu using PPA.

Cinelerra is a professional video editor and compositor for Linux. It is produced by Heroine Virtual, and is free software. Cinelerra includes support for very high-fidelity audio and video: it processes audio using 64 bits of precision, and can work in both RGBA and YUVA color spaces, using floating-point and 16-bit integer representations, respectively. It is resolution and frame rate-independent, meaning that it can support video of any speed and size. The application has a wide range of features.

Install Cinelerra in Ubuntu using PPA:

Cinelerra team PPA provides latest stable packages for Ubuntu 12.10, 12.04, 11.10, 11.04, 10.10, and 10.04.

  • To install Cinelerra, hit Ctrl+Alt+T to open up a terminal window, copy and paste this command into terminal and hit enter to add the PPA:
    sudo add-apt-repository ppa:cinelerra-ppa/ppa

    Then update and install:

    sudo apt-get update
    sudo apt-get install cinelerra

  • To install Cinelerra-CV, run following commands:
    sudo add-apt-repository ppa:cinelerra-ppa/cinelerra-cv

    Then update and install:

    sudo apt-get update
    sudo apt-get install cinelerra-cv

Once installed, launch from the dash home. For Cinelerra tutorials click here.

Enjoy!


controlling brightness in linux

  1. Open a terminal (Ctrl + Alt + T).
  2. Then type sudo nano /etc/default/grub. It will ask for your password. Type it in.
  3. Around the 11th line, there will be something like: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash". Change it to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
  4. Save the file by Ctrl+O followed by Ctrl+X. Then run sudo update-grub in the terminal.
  5. Reboot and see if backlight adjustment works. If not, undo the changes you did above, by invoking the text editor as in steps 1 and 2.

Hope it helps.


controlling brightness in linux

  1. Open a terminal (Ctrl + Alt + T).
  2. Then type sudo nano /etc/default/grub. It will ask for your password. Type it in.
  3. Around the 11th line, there will be something like: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash". Change it to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
  4. Save the file by Ctrl+O followed by Ctrl+X. Then run sudo update-grub in the terminal.
  5. Reboot and see if backlight adjustment works. If not, undo the changes you did above, by invoking the text editor as in steps 1 and 2.

Hope it helps.


touchpad like mac on windows

Get Mac-Like Scrolling and Gestures on a Windows Laptop

Once you’ve used the hand-helping, time-saving, two-finger scrolling and three-finger gestures on a MacBook, a standard Windows trackpad can feel kind of, well, dead. Here’s how to get total finger control with a tiny app, or go further with a driver swap.

 

Let’s put this out there right away: This won’t give you the Mac’s pinch-to-zoom or rotation powers, but it will give you nearly everything else. Also, I tested this out on just one laptop, a ThinkPad T61p, and the more complex version of this trick relies on unofficial—some might even say hacked—drivers for Synaptics touchpads. Most every non-Mac laptop ships with a Synaptics touchpad, and various bloggers and forum users with different laptop builds have reported it working. You may experience some quirks or buggy behavior, and if you opt for the full driver replacement, you’ll have to avoid upgrading that driver to keep everything in place. But the benefits for those who do a lot of browsing or document editing are pretty significant, and the likelihood of an absolutely crucial trackpad update is fairly slim.

If you only want simple two-finger scrolling in your web browser without having to mess with your touchpad drivers, follow this post through only the (very simple) first section. If you’d like to get configurable two-finger, three-finger, circular and gesture-based actions on your laptop, we’ll dive into that in just a bit.

The Simple Two-Finger Scrolling Fix

Get Mac-Like Scrolling and Gestures on a Windows LaptopTwo-Finger-Scroll is a tiny little utility that doesn’t require installation, configuration, or anything, really, other than a double-click to launch. On most trackpads, running two-finger-scroll will simply make dragging two fingers up and down on your trackpad scroll a window with a vertical tracking bar up and down, as if you were moving the middle scroll wheel up and down.

Get Mac-Like Scrolling and Gestures on a Windows LaptopIf that vertical two-finger scrolling is all you want, and you want it to stick around the next time you restart Windows, check your system tray. It might be hidden away, but there should be a TwoFingerScroll icon that you can right-click to turn on and off, and right-click to select “Settings.” In the settings, you can have TwoFingerScroll start with Windows, but you can also do a lot more. Check out the next tab, “Scrolling,” where you can set up exactly how your two-finger scrolling should work. In my own case, I kept the speed and acceleration defaults, disabled “Keep scrolling on edges,” and switched to “Smooth” for the Scroll Mode. I haven’t really broken them in and figured out what exactly I like, because, hey, two-finger scrolling in Windows is entirely new to me.

Get Mac-Like Scrolling and Gestures on a Windows LaptopHead to the next tab to the right, and you’ll see that you can actually manage two and three-finger tapping from TwoFingerScroll. I haven’t played with these features as much, but if your trackpad has a middle button function, or an equivalent “Button4” and “Button5,” you can set a two, three, or “two plus one” (two fingers together, one just outside) tap to do what those buttons would normally do. I could see these functions being helpful for quick right-clicking or, perhaps, triggering an Escape key or the like, but I’ve generally left this section well enough alone. If you know of some clever uses for multi-finger taps, do tell in the comments!

Sick of TwoFingerScroll, or not seeing it do much good? Disable it from the system tray and uninstall it the way you would any program. If disabling temporarily doesn’t seem to work, kill it by hitting Ctrl+Shift+Esc, selecting the Processes tab, and clicking End Process with TwoFingerScroll.exe selected.

The Whole Shebang: Gestures, Three Fingers, and More

Want to get a bit more in control of your scrolling, and add features like circular scrolls and three-finger swipes and gestures? You’ll need to install a modified version of the Synaptics drivers your laptop likely uses.

Uninstall your existing Synaptics drivers, or the touchpad/trackpad drivers your laptop manufacturer provided, by heading to Control Panel, selecting “Uninstall a program” under the Programs heading, and removing those choices that relate to your trackpad control. You can also use an app like Revo Uninstaller Free to hunt down those drivers if they don’t appear, or are hard to discern, in your Add/Remove Programs dialog. You might have to restart after your uninstall, and it might be the first of a few restarts.

To get multi-finger gestures on your trackpad, you’re going to install a set of trackpad drivers that were intended for a certain netbook in a foreign locale, but which have been modified for more general use. The drivers I installed on my ThinkPad came from a packaged dubbedsynaptics_v10.2.4.0_allOS_modded_b2.zip, and I grabbed them from a file sharing service linked at the My Digital Life blog, where you can also find 64-bit specific drivers, if needed. If that free file hosting service doesn’t work for you, or you want to try and avoid the annoying 60-second download delay, run a Google search for that package, and be sure to scan the download ZIP file for viruses before you install it.

Get Mac-Like Scrolling and Gestures on a Windows LaptopExtract the files from the ZIP package you downloaded, double-click the Setup file to start the installation process, and if you’re asked to verify that you want to install an “untrusted” or unverified driver, go ahead and do so. Once you’re through the setup process, you’ll likely be asked to restart once again. Allow your system to restart. When you boot up again, you may be asked if you’re sure you want to allow programs related to your Synaptics driver installation to run on your system, seeing as how they were downloaded from the internet and all. Un-check the boxes in the lower-left that ask something akin to “Always ask for this type of file,” and you won’t see these prompts on your next start-up.

Open a browser, or a document with enough vertical content to scroll up and down, and see what happens when you slide two fingers up or down. If you’re scrolling, hey, that’s great! If not, you may still need to install TwoFingerScroll to manually enable your own two-finger scrolling.

Get Mac-Like Scrolling and Gestures on a Windows LaptopNow, the good stuff. Head to Control Panel, into the “Hardware and Sound” section, and select “Mouse.” The farthest-right tab should have a red icon and read “Device Settings.” Make sure Synaptics Touchpad is selected in that tab, then hit the “Settings” button below it. You’ll see a whole realm of options there to explore and customize. The new stuff that you’ll want to pay close attention to is in a few places:

  • Under Pointer Motion, a selection namedSticky Borders, which controls what happens when you scroll to the edges of a window.
  • Virtual Scrolling, where you may want to turn off the edge-of-trackpad scrolling that you’d been using before.
  • Under the Pointer Motion heading, a sub-section named Momentum, which provides Apple-like scrolling based on scroll speed.
  • Three-Finger Gestures and its sub-sections, Top and Bottom, which relate to what happens when you drag three fingers up or down, respectively. I prefer to use these gestures as page back and forward in a browser.
  • Two-Finger Gestures, where you can get fancy and add actions to diagonal drags, left-to-right and right-to-left flicks, and the like.

To repeat what was stated up top, you won’t find any pinch-to-zoom or rotate gestures—at least on the laptop I was using. Your mileage may vary, but that doesn’t seem to be something that made the transition to these modified drivers. Also remember that you should consciously check your Windows Updates, or other updating software provided with your laptop, to make sure your Synaptics drivers stay put in this modified version.
 


WordPress on linux

Step1:First install LAMP on your system .

Step2: Create a database for WordPress and an user who has all privileges for accessing.
So open terminal and type :

mysql -u root -p
mysql> CREATE DATABASE wordpress;
mysql> CREATE USER wpuser;
mysql> SET PASSWORD FOR wpuser = PASSWORS(“wppassword“);
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost IDENTIFIED BY ‘wppassword’;
mysql> FLUSH PRIVILEGES;

Step3:Download WordPress from http://wordpress.org/download
Step4:Move the wordpress directory to the root directory of Apache web site, /var/www/ as
Open terminal and then type

sudo tar -xvzf wordpress-2.9.2.tar.gz -C /var/www

Step5:Now in wordpress directory, rename the wp-config-sample.php file to wp-config.php as
Open terminal and then type

sudo mv wp-config-sample.php wp-config.php

Step6: Now open the terminal type:

sudo gedit /var/www/wordpress/wp-config.php

Change putyourdbnamehere to wordpress.
Change usernamehere to wpuser.
Change yourpasswordhere to the wppassword.

Enjoy,Congrats you have installed wordpress.


LAMP

1:Install Apache

1. Open up the Terminal (Applications > Accessories > Terminal).
2. Copy/Paste the following line of code into Terminal and then press enter:

sudo apt-get install apache2

3. The Terminal will then ask you for you’re password, type it and then press enter.

Testing Apache

To make sure everything installed correctly we will now test Apache to ensure it is working properly.

1. Open up any web browser and then enter the following into the web address:

http://localhost/

You should see a folder entitled apache2-default/. Open it and you will see a message saying “It works!” , congrats to you!

2:Install PHP

In this part we will install PHP 5.
Step 1. Again open up the Terminal (Applications > Accessories > Terminal).
Step 2. Copy/Paste the following line into Terminal and press enter:

sudo apt-get install php5 libapache2-mod-php5

Step 3. In order for PHP to work and be compatible with Apache we must restart it. Type the following code in Terminal to do this:

sudo /etc/init.d/apache2 restart


Test PHP

To ensure there are no issues with PHP let’s give it a quick test run.
Step 1. In the terminal copy/paste the following line:

sudo gedit /var/www/testphp.php

This will open up a file called testphp.php.
Step 2. Copy/Paste this line into the testphp.php file:


Step 3. Save and close the file.
Step 4. Now open you’re web browser and type the following into the web address:

http://localhost/testphp.php

A page will be pop up .
Congrats you have now installed both Apache and PHP!

3:Install MySQL

Step 1. Once again open up the amazing Terminal and then copy/paste this line:

sudo apt-get install mysql-server

Step 2. This is where things may start to get tricky. Begin by typing the following into Terminal:

mysql -u root -p

Following that copy/paste this line
mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘yourpassword’);
(Make sure to change yourpassword to a password of your choice.)

4:INSTALL PHPMYADMIN

step1. open the terminal copy and paste following command and then enter

sudo apt-get install phpmyadmin

step2. Now type the following

http://localhost/phpmyadmin

If this does not work, then you can do the following to include the phpMyadmin-shipped Apache configuration into Apache:
step3.Type the following command in terminal

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf

step 4.Now type following

sudo /etc/init.d/apache2 reload

Step5. Test again your phpmyadmin ,type following:

http://localhost/phpmyadmin

Thats all ,You have successfullly installed LAMP


OSM

Open Street Map is a free editable map of the whole world. It is made by people like you. Open Street Map allows you to view, edit and use geographical data in a collaborative way from anywhere on Earth. Open Street Map has been praised for being more detailed than maps compiled by big companies like Google and Microsoft,yahoo and its creators hope that with thousands of editors, it will be more accurate.

 

GPS (Global Positioning System)

This is a GPS device that is used to make a Map.The Global Positioning System (GPS) is a U.S. space-based radio navigation system that provides reliable positioning, navigation, and timing services to civilian users on a continuous worldwide basis — freely available to all. For anyone with a GPS receiver, the system will provide location and time. GPS provides accurate location and time information for an unlimited number of people in all weather, day and night, anywhere in the world.

 

JOSM (Java Open Street Map Editor)

JOSM is the “Java OpenStreetMap Editor”, a desktop application originally developed by Immanuel Scholz and currently maintained by Dirk Stöcker. JOSM is an editor for OpenStreetMap written in Java 1.5. The current version supports stand alone GPX tracks, GPX track data from the OSM database and existing nodes, line segments and metadata tags from the OSM database.You can download JOSM from there

Steps to Make a Map

1:Mark the points with GPS device
2:Upload the Map
3:Edit a Map (JOSM)
4:Use the Map

Difference Between Google,Yahoo and Open Street Map

I made a Map of Dugri Phase-1 just in 3 hours.It was very interesting experience.There is a Lot of Difference Between My Map and Yahoo and Google Map of Dugri Phase-1.You Can find the Difference Between the Map of yahoo,Google and Open Street here.


kannel

Kannel is a compact and very powerful open source WAP and SMS gateway.This time i got a chance to implement it.I was perplex  and was surprised why the deveolpers of it haven’t documented it even they are using it since decades.So i am documenting it so that others can take a quick start and do not face the problems that i faced.Please follow it step by step and ask if you get any problem anywhere.
I am going to explain how to compile,install and configure it.My System is Ubuntu(10.04).Just follow these steps.

1) Open terminal and install it
sudo apt-get install build-essential bison libxml2-dev libmysqld-dev

Now install it.
sudo apt-get install libtool
Now download the source code of kannel from Click to download 

2) Compile and Install it now as:
./configure
make
make install 

3)Now you need configuration files .Download those from here Click to download 
Now make the changes as per your own needs e.g change the Phone/Modem name as per your’s etc.

4) Attach your phone/modem to your computer and select Pc suite or Nokia mode option.
Note:You should know at which port your phone or modem is connected so use ‘dmesg’ command to know it. 

5) Start the bearerbox and smsbox by issuing the following commands in different terminals.
For bearbox:
sudo bearerbox -v 1 /path-to-config file

For Sms-box:
sudo smsbox -v 1 /path-to-config file 

Now Kannel is configured and you are ready to use it.You can now send sms from browser (Url).Use following url and make your changes for username and password and paste it in browser’s url and then enter.Message will be send to the given number.
Url is:
http://127.0.0.1:13018/cgi-bin/sendsms?username=your-username&password=your-password&to=+91-Enter a number to which you want to send a sms&text=Hello+world

Done!!!


for the linux magazine .. :)

logon to =====> http://www.muktware.com


VI linux terminal help sheet

VI Editor Help Sheet from GoSquared - UNIX terminal commands reference

We’re really pleased to bring you another Help Sheet. Introducing the VI Help Sheet for all you Linux loving developers out there.

It’s been a while since we released our set of web development Help Sheets for PHP, HTML and CSS, so we thought it was time to release another. This one should keep a lot of developers happily coding away into the early hours of the morning.

So what are you waiting for? Download it. Print it. Stick it on the wall and get commanding.

As always, if you find any errors or typos or anything like that, please drop us a note in the comments.

 

New to GoSquared?

For those of you new to GoSquared – we design and engineer web applications for site owners to monitor their traffic and earn more money from their Site. We run Liquidicity, the blog on design & technology to share our thoughts and content with wonderful people like you in the hope that one day you’ll use our products.

VI Help Sheet PDF Get the PDF (553KB)

VI Help Sheet Full Preview


how to disable pam-face-authentication

Try removing line “auth sufficient pam_face_authentication.so” of the files /etc/pam.d/gdm and /etc/pam.d/gnome-screensaver


Linux vi editor tutorial – Create and edit file in command line terminal

The vi editor has a long history in UNIX. It is a default text editor of the UNIX and UNIX based operating system including Linux. Some people say vi is difficult to use. Here is a good news for you, the improved version of Vi editor which is called Vim editor is a lot easier and user friendly. In this tutorial, I’ll just mention Vi but it’s the same as vim. I’ll mention some vim improvements over original vi editor at the end of this tutorial.

Create new file with vi editor

In the Linux permission tutorial you have been introduced briefly to vi editor. You probably still remember that vi has 2 modes, command mode and insert mode. To start vi from the command line, type:

vi filename

 

or

vim filename

The vi command will create a new file if the filename you mention in the command above does not exist in the current directory. You’ll have a screen with a column of tildes (~) on the left screen like the example below:.

luzar@slackware:~$ mkdir vitutorial
luzar@slackware:~$ cd vitutorial/
luzar@slackware:~/vitutorial$ vi vitest

vi create a new file picture here image

To insert text to the new file, press i. Now you can start typing what you want. You probably notice that delete key and backspace key didn’t work. If you want to delete text, you must enter vi command mode. Press Esc to go the vi command mode. To delete a character, move cursor to the character and press x to delete that character. To delete a line, move cursor to the beginning of the line and press dd. To continue insert the text again, press i or this time try press a to append text. The different between i and a command in vi is, a will move the cursor one character after the current cursor. At this step in the learning process, just remember the vi command mode and vi insert mode. The vi command mode is everything here, insert text, delete text and save file. Oh we haven’t save our file yet. To save and exit file, enter this key: :wq. Of course it’s in the command mode.

vi insert text image

You can find all basic vi commands in the next topic.

Edit file with vi editor

The Linux vi editor is a great tool to edit files in the Linux command line terminal. It has been a popular text editor to edit server configuration files and programs for so long. Almost all Linux distributions include vi editor in default installation. Now, let’s learn how to edit file with vi editor. The syntax used to edit file using vi editor is the same as create a new file. To edit a file in Linux system, you can change directory or just provide the path to the directory where the file resides. See the vi format below:

vi /path/to/filename

During the create new file with vi editor practice, we didn’t use much commands. You learn how to insert text, delete text and save file. However, when editing a file or program in Linux, you are going need more than that. Of course, the basic file editing is just insert text, delete text and save the changes, but there are many useful vi commands that can make your job a lot easier. This is the table of basic vi commands that you can use to assist you editing a file in Linux command line terminal:

 

Command Description
i Insert text
a Append
u Undo
x Delete 1 character
dd Delete one line
yy Yank (copy 1 line)
p Paste
ZZ Exit and save
:q Quit without saving
:wq Write and quit
:q! Force quit without saving
:wq! Force write and quit
/ Searches forward
? Searches backward
h Move cursor back 1 space
j Move cursor down 1 line
k Move cursor up 1 line
l Move cursor forward 1 space

Those are basic vi commands that every Linux user should remember. In the original vi editor, the arrow keys are not for moving cursor. You probably noticed that during create a new file with vi editor practice before. If you don’t know how to move the cursor, then how do you plan to edit a file? Here is the tips on how I remember the keys to move cursor in vi editor. I just remember two keys, the key point, j for jump and the k for climb. Use j to jump down one line and k to climb up one line. Then I would know that before j is h which is used to move back one step and the l key in front is to move forward. I don’t know what you think about that, but that’s how I remember how to move cursor in vi text editor. Let’s start practice editing a file with vi text editor now by openning the file that we created just now.

luzar@slackware:~/vitutorial$ vi vitest

This is the my vitest file. It doesn’t matter if your file content doesn’t similar with mine. We are going to try all those command above so you can see how it works and get familiar with it. You already use i to insert text before. This time, use a to append text to the file. Press a and type something.

Tdfgdfhis is a vi test file. We just learn how to insert text to new blank file.
We open the file with: vi filename
We save a file with: :wq
in command mode.

When you open the file with vi editor, the cursor will be at the first character on the first line. When you press a to append text, the cursor will move to the next character, that means the second space. As you can see from the example above, I type something that I don’t understand myself. So, I want to cancel it. What command that we have in vi editor which can cancel what we did? We can delete character like in the create new file example above. But there is a useful command in vi editor that we can use, which is the undo command. To undo, press Esc key to go to the vi command mode and press u. This will undo what I just type a moment ago.

This is a vi test file. We just learn how to insert text to new blank file.
We open the file with: vi filename
We save a file with: :wq
in command mode.

We already know how to delete a character in vi editor, let’s try delete one line. The vi command to delete one line is the dd command. When you press dd, the line which your cursor is at the moment will be deleted. To delete the line with dd, make sure you are in the vi command mode. See the example below:

We open the file with: vi filename
We save a file with: :wq
in command mode.

As you can see, the first line is gone when I press dd. Press u to undo, and the line is back.

The next command is the vi command to yank. Yank means copying one line. Press yy at the first line will copy that line. when we press p, vi will paste that line below the line where the cursor is right now. Let’s see what it means:

This is a vi test file. We just learn how to insert text to new blank file.
This is a vi test file. We just learn how to insert text to new blank file.
We open the file with: vi filename
We save a file with: :wq
in command mode.

The cursor is at the first line when I press yy. So vi paste the line to the line below it when I press p.

You already learn how to save and exit file in previous the example. If we don’t want to save the file, we can enter the key :q which means just quit. But if we press :q now, vi won’t quit. That is because we already make changes to the file. Vi warns us that the file has been modified, and we do not save it yet. We can see the message at the bottom of vi editor which says vitest modified, not saved. If we want to save, we can issue the :wq command or the ZZ (double upper case Z) command. If we don’t want to save and just quit, we must force vi to quit. The command to force quit is :q!.

One of the most useful utility that vi has is the / command, which can be used to search text in the file. We can use vi search utility to edit a certain word for the whole file. We can also use the vi search utility to fine a certain word in a large file without having to scroll line by line looking for the word. To use the vi editor search utility, type /word and enter. Vi will move the cursor to the first word in the file. To go to the next word, press n. You can press n again and vi editor will continue looking for the next word in the whole file. The vi / command searches forward, that means from top to bottom, and the ? command searches backward, opposite the /.

Finally, we can move the cursor around in the file with j, k, h, l keys. Move down line by line to the end of the file by pressing j. To move up line by line, press k. Press j to move backward on the line. Press l to move forward on the line.

What do you think of vi editor now? Is it difficult to use? I’m sure your answer is yes if you are a gui user before. Well, don’t give up now. All you need is some practice. You’ll never regret because vi editor is very useful and supported by most of unix-based operating system. There are many other things that you can do with vi. If you want to know what vi is capable of, type vimtutor and scan over to see what it can do.

So, what are improvements vim over vi editor? Like I said earlier, it’s more user friendly. For example, with vim editor, you can use backspace as well as delete key function. You can also use arrow keys. That improvement alone means so much for a beginner. Other vi editor basic functions are still the same. And I recommend vim for all Linux users. To use vim instead of vi, you just replace vi with vim. For example, if we want to edit a file, type vim file. That’s all.

Here is a description about vim from the manual page:

DESCRIPTION
       Vim  is a text editor that is upwards compatible to Vi.  It can be used
       to edit all kinds of plain text.  It is especially useful  for  editing
       programs.

       There  are a lot of enhancements above Vi: multi level undo, multi win-
       dows and buffers, syntax highlighting, command line  editing,  filename
       completion,   on-line   help,   visual  selection,  etc..   See  ":help
       vi_diff.txt" for a summary of the differences between Vim and Vi.

       While running Vim a lot of help can be obtained from the  on-line  help
       system,  with the ":help" command.  See the ON-LINE HELP section below.

       Most often Vim is started to edit a single file with the command

            vim file

       More generally Vim is started with:

            vim [options] [filelist]

       If the filelist is missing, the editor will start with an empty buffer.
       Otherwise  exactly  one out of the following four may be used to choose
       one or more files to be edited.

Burg-manager- Install and configure Burg the easy way| Ubuntu Maverick Meerkat PPA

Burg-manageris an intuitive interface that simplify installation and configuration of burg bootloader. Burg-manager allows to install Burg and many beautiful themes from a big gallery.

After installing Burg, if you want to secure it with a password, check our previous post :How to enable password protection in Burg

buc_035

 

What`s new?

-Install Burg, Burg-themes and a Burg emulator
-Set timeout
-Set your favourite theme
-Set the screen resolution
-Add new themes by choosing them among the ones you can find on this site
-Remove Burg
-Restore Grub2
-Setting the default operating sistem
-Setting advanced parameters
-Sdd menuentry to boot some iso directly using burg

-Added support to Linux Mint 10 Julia

-For more info about this version check this link

 

Download and Install Burg manager :

Before to install Burg manager, you need to have first buc installed or will not work for you.

Download Buc package from this link

When Buc is installed then you can download and install Burg-manager.

Download Burg-manager

download-150x150 


Installation in Ubuntu and LinuxMint (Via ppa repository):

For Ubuntu/LinuxMint , if you want to install from repository then skip the step above of installing Buc. We will install Burg manager and Buc from repository by following these steps (Just copy/Past these 4 lines to your terminal):

 

For Ubuntu 10.10 Maverick Meerkat / LinuxMint Julia (32bit):

Open terminal and type the following commands :

echo "deb http://buc.billera.eu/ubuntu/ binary/" | sudo tee -a /etc/apt/sources.listecho "deb http://www.sourceslist.eu/repo/ubuntu maverick main non-free" | sudo tee -a /etc/apt/sources.listsudo gpg --keyserver hkp://pgp.mit.edu --recv-keys FA088BA5 && sudo gpg --armor --export FA088BA5 | sudo apt-key add -sudo apt-get update && sudo apt-get install burg-manager buc

For Lucid Lynx :

echo "deb http://buc.billera.eu/ubuntu/ binary/" | sudo tee -a /etc/apt/sources.listecho "deb http://www.sourceslist.eu/repo/ubuntu lucid main non-free" | sudo tee -a /etc/apt/sources.listsudo gpg --keyserver hkp://pgp.mit.edu --recv-keys FA088BA5 && sudo gpg --armor --export FA088BA5 | sudo apt-key addsudo apt-get update && sudo apt-get install burg-manager buc

 

Known Issues

If you have already installed any previous version of burg-manager and now you have installed version 1.0.5, if burg-manager doesn’t start, purge it executing:

1- remove previous version :

sudo apt-get purge burg-manager
sudo rm -rf ~/.burg-manager
sudo rm -rf /root/.burg-manager

2- Then reinstall it:

sudo dpkg -i burg-manager*

Or if you have the ppa installed use this command to reinstall it :

sudo apt-get update && sudo apt-get install burg-manager

buc_034

Install the theme by clicking twice on the theme

buc_035

Watch this video from the developer :

{youtube}4l4OA3T8q-c&feature=player_embedded{/youtube}

Useful links : http://www.sourceslist.eu/


linux face recognition tool

How to install facial recognition tool in Ubuntu Linux distro:

1) Install the dependencies required to run the face recognition tool. You can install that by executing the following command in terminal. To open  Terminal go to Applications > Accessories > Terminal. The commands are different for Lucid Lynx and Maverick Meerkat users:

Ubuntu Terminal

Lucid Lynx users: –

sudo apt-get install build-essential cmake qt4-qmake libx11-dev libcv-dev libcvaux-dev libhighgui4 libhighgui-dev libqt4-dev libpam0g-dev libswscale0

Maverick Meerkat users:

sudo apt-get install build-essential cmake qt4-qmake libx11-dev libcv-dev libcvaux-dev libqt4-dev libpam0g-dev libswscale0 libhighgui-dev libhighgui2.1

Ubuntu face login sudo command

2) Install the face recognition tool by executing the following commands one at a time.

cd /tmp

wget http://pam-face-authentication.googlecode.com/files/pam-face-authentication-0.3.tar.gz

tar zxf pam-face-authentication-0.3.tar.gz && cd pam-face-authentication-*

mkdir build && cd build

cmake -D CMAKE_INSTALL_PREFIX=/usr ..

make

sudo make install

3) Run the ‘Face Trainer’ application from the Applications > Other menu.

Ubuntu face login tool

Steps to add face recognition tool to GNOME display manager (GDM):

For the face login feature to be added to your default GNOME display manager you should execute the following sudo commands,

sudo sed -i '1i auth sufficient pam_face_authentication.so enableX' /etc/pam.d/gdm

sudo sed -i '1i auth sufficient pam_face_authentication.so enableX' /etc/pam.d/gnome-screensaver

Depending on your webcam model/make you may need to install and add libv4lto preload:

  • Create the file /etc/ld.so.preload
  • Paste in the path to the v411compat.so file commonly found in /usr/lib/libv4l

how to install a debian package ….?

You need to use dpkg package manager from shell/command prompt. dpkg is a tool to install, build, remove and manage packages. dpkg itself is controlled entirely via command line parameters. For example -i use to install .deb file.

How do I install .deb file?

To install package called package.deb type the following command:
Go to directory where package.deb is kept. For example if it is in /tmp directory:
$ cd /tmp
Type the following command:
$ sudo dpkg -i package.deb

 


restricted format for linux

See Multimedia Codecs and Playing proprietary formats for official documentation on this issue.

Ubuntu strives to make all software that meets the licensing terms in theUbuntu License Policy available. However patent and copyright restrictions complicate free operating systems distributing software to support proprietary formats.

Ubuntu’s commitment to only include completely free software by default means that proprietary media formats are not configured ‘out of the box’.

Ubuntu can play the most popular non-free media formats, including DVD, MP3, Quicktime, Windows Media, and more by following the instructions below. If this seems like unnecessary work, remember that Ubuntu is a distribution of free software and these packages are (at least arguably) affected by patents and license restrictions in some countries. Avoid formats suppressed by DRM (Digital Rights Management, or Digital Restrictions Management), as they are often unplayable.

See Ubuntu’s Free Software Philosophy and the Free Formats page for a more comprehensive discussion of these issues.

  • Legal Notice Patent and copyright laws operate differently depending on which country you are in. Please obtain legal advice if you are unsure whether a particular patent or restriction applies to a media format you wish to use in your country.

 

Playing Restricted Formats

 

Follow these steps to play and record most common multimedia formats, including MP3, DVD, Flash, Quicktime, WMA and WMV, including both standalone files and content embedded in web pages.

 

Ubuntu 10.04 LTS (Lucid Lynx) and 9.10 (Karmic Koala)

(First, you may have to update the list of available packages from the apt sources. You can do it clicking on the “Reload” button of Synaptic or running in a terminal either sudo apt-get update or sudo aptitude update)

Click here to install the ubuntu-restricted-extras package

If you are using a different derivative of Ubuntu, install one of these instead:

To play DVDs, you also need to install libdvdcss by opening a terminal and entering the following in addition to installing the restricted extras package:

 

 sudo /usr/share/doc/libdvdread4/install-css.sh

The instructions below for 8.10 and 8.04 should still also work.

 

Ubuntu 10.04 LTS, 9.10, 8.04

(First, you may have to run “Software Sources” -inside the main menu-> System-> Administration- and enable the universe and multiverse packages -first tab, “Ubuntu Software”-). And also update the list of available packages from the apt sources -you can do it clicking on the “Reload” button of Synaptic or running in a terminal either sudo apt-get update or sudo aptitude update-)

 

Synaptic

  • Go to Applications → Add/Remove…
  • Set Show: to All available applications
  • Search for ubuntu-restricted-extras and install it. Note that there is also xubuntu-restricted-extras (for Xubuntu) andkubuntu-restricted-extras (for Kubuntu.)

Or open the Terminal, and execute the following command:

  • sudo apt-get install ubuntu-restricted-extras

 


Howto Install Intel C++ Compiler 10 on Ubuntu

Intel® C++ Compiler Professional Edition offers the best support for creating multi-threaded applications. Only the Professional Edition offers the breadth of advanced optimization, multi-threading, and processor support that includes automatic processor dispatch, vectorization, auto-parallelization, OpenMP*, data prefetching, and loop unrolling, along with highly optimized C++ templates for parallelism, math processing, and multimedia libraries.

If you want to know the features check here

You need to install non-commercial license software fromhere

Once you downloaded the file you need to Extract the archive

tar xfzv l_cc_p_10.0.023_ia32.tar.gz

We need to convert the RPM to a debian package using alien

sudo apt-get install alien

cd l_cc_p_10.0.023_ia32/data

sudo alien -cv intel-icc100023-10.0.023-1.i386.rpm

We can now install the debian package

sudo dpkg -i intel-icc100023_10.0.023-2_i386.deb

Now we need to copy our license file to the appropriate directory

sudo mkdir -p /opt/intel/licenses

sudo cp /your/license/path/NCOM_L_CMP_CPP_NB96-WLC77F6B.lic /opt/intel/licenses

Finally, we need to adjust some strings in the executable scripts

cd /opt/intel/cc/10.0.023/bin

sudo perl -pi -w -e ‘s/!\/bin\/sh/!\/bin\/bash/g;’ *

sudo perl -pi -w -e 's//\/opt\/intel\/cc\/10.0.023/g;' *

To have the compiler directories in the path environment variable, execute

. ./iccvars.sh

Now, try

icc --version

You should see some output like

icc (ICC) 10.0 20070426

Finally, if you want to have the compiler in the path all the time, append to your ~/.bashrc

source /opt/intel/cc/10.0.023/bin/iccvars.sh

To uninstall, simply select the appropriate intel package in synaptic.


How to Install C and C++ Compilers in Ubuntu and testing your first C and C++ Program

If you are a developer you need C and C++ Compiler for your development work.In ubuntu you can install the build-essential for C and C++ compilers. 

Install C and C++ Compilers in Ubuntu

sudo aptitude install build-essential

This will install all the required packages for C and C++ compilers

Testing C and C++ Programs

Compiling Your first C Programs

Now you need to open first.c file

sudo gedit first.c

add the following lines save and exit the file

Firstly compile the code using the following command

cc -c first.c

that would produce an object file you may need to add to the library.

then create an executable using the following command

cc -o first first.c

Now run this executable using the following command

./first

Output should show as follows

Hello, world

Compiling your first C++ program

If you want to run c++ program follow this procedure

g++ is the compiler that you must use.

you should use a .cpp file extension rather than a .c one

You need to create a file

sudo gedit first.cpp

add the following lines save and exit the file

Run your C++ Program using the following command

g++ first.cpp -o test

./test

Output should show as follows

Hello World!


Basic command for linux terminal…!

These are the very Basic Linux commands given Below,which should
be known to every Linux User.The meaning of “$” sign is the user you are lgged in as has not all the or root permissions,when you will logged in as rot user irt will change to “#” means having all permissions.
$passwd: Change passwords.
It will ask for a passwd of 8 or more than 8 characters,
if you want a small password then login as a root user and then
$passwd user_name
$su: Become a root user
$users: See who is connected.
$who: See who is connected.
$w: See who is connected.
$finger: Get information about a user.
$write: Send a real-time message to one user.
$wall: Send a real-time message to all users.
$mesg: Disable or enable reception of real-time messages.
$mail: Send e-mail to other users.
$du: See how much disk space a directory occupies.
$cat: Show contents of a text file.
$pwd: Print working directory.
$cd: Change to another directory.
$mkdir: Remove a directory.
$ls: List files.
$rm: Remove files.
$cp: Copy files.
$cal: Show a calendar.
$clear: Clear screen.
$uname: Show system information.
$wc: Count words, lines, and characters in a text file.
$date: Show and change current date and time.

How to make ur command line fast.. ;)

You can use keyboard shortcuts and other command line tricks to make entering commands easier and faster. You might already know about the ‘tab’ key which completes partial commands and even file and directory names.

Here are some other keyboard shortcuts you can use within terminal:

Ctrl-a Move to the start of the line.
Ctrl-e Move to the end of the line.
Alt- x Moves the cursor forward to the next occurrence of x.
Ctrl-u Delete from the cursor to the beginning of the line.
Ctrl-k Delete from the cursor to the end of the line.
Ctrl-y Pastes text from the clipboard.
Ctrl-l Clear the screen leaving the current line at the top of the screen.
Ctrl-u Undo the last changes.

Ctrl-Alt-r Undo all changes to the line.

Alt- Ctrl-e Expand command line.
Ctrl-r Incremental reverse search of history.
Alt-p Non-incremental reverse search of history.
!! Execute last command in history
!abc Execute last command in history beginning with abc
!n Execute nth command in history.

^abc^xyz Replace first occurrence of abc with xyz in last command and execute it.


Anant Singh (OSM contributor)

Guyz Don’t forget OpenStreetMap http://www.openstreetmap.org/ a Free wiki map of the world. It has a very unique style that I think is very nice. One of their statements is “We make beautiful maps”

The event was awesome and enjoyable to gain precious knowledge about mapping.
Open street map is the fastest uptadatable map of the world.
Pics of mapping area of Dugri Phase-1 :->
The openstreetmap of dugri area of phase-1 is compared with google map and yahoomap => http://www.flickr.com/photos/osm_mapping/open street map made by me


MACUBUNTU 10.04 the easy step to make linux(ubuntu) into MAC OS X

Convert Your Ubuntu10.04 into a Complete MacBook’s Look

Now you can change the Graphics of your Linux(Ubuntu10.04) into a Complete MacBook’s Look just with some simple commands given below.Mac OS X Transformation Pack. Similar to Mac4Lin but dedicated to Ubuntu Linux. It can also be used in other OS based on Debian/GTK. Package includes all necessary system components to mimic Mac OS X appearance on Ubuntu Linux.
Important: While Running these commands you will be asked to do changes on your current working Environment.
Mac Ubuntu

Installation:







wget https://downloads.sourceforge.net/project/macbuntu/macbuntu-10.04/v2.0/Macbuntu-10.04.tar.gz -O /tmp/Macbuntu-10.04.tar.gz
tar xzvf /tmp/Macbuntu-10.04.tar.gz -C /tmp
cd /tmp/Macbuntu-10.04/ 
$ ./install.sh