Install Mario On Ubuntu

Mega Mario is a Mario clone + blood. In the game you play Mario and your task is to free his brother Luigi, who was captured by the evil Bowser. Mario is controlled by Keyboard or Gamepad using the Arrowkeys to walk, Space / A to jump and CTRL / B to run/fire. After reaching a castle the game is saved and can be continued at any time by clicking on “Load Game”.

Mega Mario also features a blood-mode, which makes killed enemies spread their blood all over the level! And if you have fun to create your own levels after completing the game, you can use the Level-Editor (read “Editor.txt”).

You can download Mega Mario from here

To install Mega Mario on Ubuntu you have to add following lines in /etc/apt/sources.list

Note : I am using Ubuntu 11.04. For this version repository owner do not have any packages. Then also you can add following lines in your sources.list file. It will work.

deb http://ppa.launchpad.net/pratikmsinha/freethinkers.packages/ubuntu lucid main
deb-src http://ppa.launchpad.net/pratikmsinha/freethinkers.packages/ubuntu lucid main

Now run,

sudo apt-get update
sudo apt-get install megamario

That’s it. It will install Mega Mario on your machine. Just run megamario in your terminal and you are ready to play the game.

megamario

In case of any problem please let me know.

Master Sheet Learn VI

The VI editor is a screen-based editor used by many Unix users. The VI editor has powerful features to aid programmers. If you master the use of Vim text editor, it can be a very powerful tool in your hands, and allow you to do amazing text editing feats with just a few taps on your keyboard.

Many beginning users avoid using VI because the different features overwhelm them. To overcome it and practice it more you can use VI in bash. I have also collected some of the short cut keys which will be useful for you to learn VI

To set vi for your terminal run,

set -o vi

Keyboard Shortcut Summary for VI

.--------------.------------------------------------------------------------.
|              |                                                            |
| Shortcut     | Description                                                |
|              |                                                            |
'--------------'------------------------------------------------------------'
| Switching to COMMAND Mode:                                                |
'--------------.------------------------------------------------------------'
| ESC          | Switch to command mode.                                    |
'--------------'------------------------------------------------------------'
| Commands for Entering INPUT Mode:                                         |
'--------------.------------------------------------------------------------'
| i            | Insert before cursor.                                      |
'--------------+------------------------------------------------------------'
| a            | Insert after cursor.                                       |
'--------------+------------------------------------------------------------'
| I            | Insert at the beginning of line.                           |
'--------------+------------------------------------------------------------'
| A            | Insert at the end of line.                                 |
'--------------+------------------------------------------------------------'
| c<mov. comm> | Change text of a movement command <mov. comm> (see below). |
'--------------+------------------------------------------------------------'
| C            | Change text to the end of line (equivalent to c$).         |
'--------------+------------------------------------------------------------'
| cc or S      | Change current line (equivalent to 0c$).                   |
'--------------+------------------------------------------------------------'
| s            | Delete a single character under the cursor and enter input |
|              | mode (equivalent to c[SPACE]).                             |
'--------------+------------------------------------------------------------'
| r            | Replaces a single character under the cursor (without      |
|              | leaving command mode).                                     |
'--------------+------------------------------------------------------------'
| R            | Replaces characters under cursor.                          |
'--------------+------------------------------------------------------------'
| v            | Edit (and execute) the current command in the text editor. |
|              | (an editor defined in $VISUAL or $EDITOR variables, or vi  |
'--------------'------------------------------------------------------------'
| Basic Movement Commands (in command mode):                                |
'--------------.------------------------------------------------------------'
| h            | Move one character right.                                  |
'--------------+------------------------------------------------------------'
| l            | Move one character left.                                   |
'--------------+------------------------------------------------------------'
| w            | Move one word or token right.                              |
'--------------+------------------------------------------------------------'
| b            | Move one word or token left.                               |
'--------------+------------------------------------------------------------'
| W            | Move one non-blank word right.                             |
'--------------+------------------------------------------------------------'
| B            | Move one non-blank word left.                              |
'--------------+------------------------------------------------------------'
| e            | Move to the end of the current word.                       |
'--------------+------------------------------------------------------------'
| E            | Move to the end of the current non-blank word.             |
'--------------+------------------------------------------------------------'
| 0            | Move to the beginning of line                              |
'--------------+------------------------------------------------------------'
| ^            | Move to the first non-blank character of line.             |
'--------------+------------------------------------------------------------'
| $            | Move to the end of line.                                   |
'--------------+------------------------------------------------------------'
| %            | Move to the corresponding opening/closing bracket.         |
'--------------'------------------------------------------------------------'
| Character Finding Commands (these are also Movement Commands):            |
'--------------.------------------------------------------------------------'
| fc           | Move right to the next occurance of char c.                |
'--------------+------------------------------------------------------------'
| Fc           | Move left to the previous occurance of c.                  |
'--------------+------------------------------------------------------------'
| tc           | Move right to the next occurance of c, then one char       |
|              | backward.                                                  |
'--------------+------------------------------------------------------------'
| Tc           | Move left to the previous occurance of c, then one char    |
|              | forward.                                                   |
'--------------+------------------------------------------------------------'
| ;            | Redo the last character finding command.                   |
'--------------+------------------------------------------------------------'
| ,            | Redo the last character finding command in opposite        |
|              | direction.                                                 |
'--------------+------------------------------------------------------------'
| |            | Move to the n-th column (you may specify the argument n by |
|              | typing it on number keys, for example, 20|)                |
'--------------'------------------------------------------------------------'
| Deletion Commands:                                                        |
'--------------.------------------------------------------------------------'
| x            | Delete a single character under the cursor.                |
'--------------+------------------------------------------------------------'
| X            | Delete a character before the cursor.                      |
'--------------+------------------------------------------------------------'
| d<mov. comm> | Delete text of a movement command <mov. comm> (see above). |
'--------------+------------------------------------------------------------'
| D            | Delete to the end of the line (equivalent to d$).          |
'--------------+------------------------------------------------------------'
| dd           | Delete current line (equivalent to 0d$).                   |
'--------------+------------------------------------------------------------'
| CTRL-w       | Delete the previous word.                                  |
'--------------+------------------------------------------------------------'
| CTRL-u       | Delete from the cursor to the beginning of line.           |
'--------------'------------------------------------------------------------'
| Undo, Redo and Copy/Paste Commands:                                       |
'--------------.------------------------------------------------------------'
| u            | Undo previous text modification.                           |
'--------------+------------------------------------------------------------'
| U            | Undo all previous text modifications.                      |
'--------------+------------------------------------------------------------'
| .            | Redo the last text modification.                           |
'--------------+------------------------------------------------------------'
| y<mov. comm> | Yank a movement into buffer (copy).                        |
'--------------+------------------------------------------------------------'
| yy           | Yank the whole line.                                       |
'--------------+------------------------------------------------------------'
| p            | Insert the yanked text at the cursor.                      |
'--------------+------------------------------------------------------------'
| P            | Insert the yanked text before the cursor.                  |
'--------------'------------------------------------------------------------'
| Commands for Command History:                                             |
'--------------.------------------------------------------------------------'
| k            | Insert the yanked text before the cursor.                  |
'--------------+------------------------------------------------------------'
| j            | Insert the yanked text before the cursor.                  |
'--------------+------------------------------------------------------------'
| G            | Insert the yanked text before the cursor.                  |
'--------------+------------------------------------------------------------'
| /string or   | Search history backward for a command matching string.     |
| CTRL-r       |                                                            |
'--------------+------------------------------------------------------------'
| ?string or   | Search history forward for a command matching string.      |
| CTRL-s       | (Note that on most machines Ctrl-s STOPS the terminal      |
|              | output, change it with `stty' (Ctrl-q to resume)).         |
'--------------+------------------------------------------------------------'
| n            | Repeat search in the same direction as previous.           |
'--------------+------------------------------------------------------------'
| N            | Repeat search in the opposite direction as previous.       |
'--------------'------------------------------------------------------------'
| Completion commands:                                                      |
'--------------.------------------------------------------------------------'
| TAB or = or  | List all possible completions.                             |
| CTRL-i       |                                                            |
'--------------+------------------------------------------------------------'
| *            | Insert all possible completions.                           |
'--------------'------------------------------------------------------------'
| Miscellaneous commands:                                                   |
'--------------.------------------------------------------------------------'
| ~            | Invert case of the character under cursor and move a       |
|              | character right.                                           |
'--------------+------------------------------------------------------------'
| #            | Prepend '#' (comment character) to the line and send it to |
|              | the history.                                               |
'--------------+------------------------------------------------------------'
| _            | Inserts the n-th word of the previous command in the       |
|              | current line.                                              |
'--------------+------------------------------------------------------------'
| 0, 1, 2, ... | Sets the numeric argument.                                 |
'--------------+------------------------------------------------------------'
| CTRL-v       | Insert a character literally (quoted insert).              |
'--------------+------------------------------------------------------------'
| CTRL-r       | Transpose (exchange) two characters.                       |
'--------------'------------------------------------------------------------'

Also if you dont have linux / unix machine and still want to practice VI then check Henrik Huttunen has created an online site called Open Vim. The site teaches a Vi beginner how to use this seemingly arcane albeit very powerful text editor.

Open Vim supports most of the basic Vi commands, and then a few more. It is not exactly a complete Vi editor yet however, the author of “OpenVim.com” claims it is still a functional clone of Vim that can aid Vi beginners to master the rudimentary skills in using Vi.

Ubuntu Compile Apache from Source

Before compiling apache ensure that gcc is installed on your machine. To confirm just run,

gcc

If you get the following output then gcc is installed on your machine

gcc: fatal error: no input files
compilation terminated.

In case if you get command not found then either you have to install gcc or it is already install you just have to set in your home path. By default in ubuntu gcc get installed at /usr/bin/gcc. So to set it in your PATH run,

export PATH=/usr/bin/gcc:$PATH

Or you can add the above command in your profile

To install gcc on ubuntu run

sudo apt-get install gcc

Now we will download and compile the apache on our machine. I am downloading apache in my home directory.

cd ~/myapps/
wget http://www.fightrice.com/mirrors/apache/httpd/httpd-2.2.21.tar.gz

Extract the downloaded file

tar -zxvf httpd-2.2.21.tar.gz

Now we will install apache in /home/vidyadhar/myapps/apache. You can give whatever directory you want by just modifying PREFIX attribute. For more options just run ./configure –help

cd httpd-2.2.21/
./configure --prefix=/home/vidyadhar/myapps/apache

Now we have to run make and make install to complete the procedure.

make
make install

After a successfull installation you have to modify httpd.conf file and do the basic settings.

In this installation we are going to run apache on 8081 port and we will be using our local user i.e vidyadhar to start and stop the apahce server. For server name we have to modify ServerName tag and have to put hostname over there.

Go to /home/vidyadhar/myapps/apache/conf

cd /home/vidyadhar/myapps/apache/conf

Open httpd.conf file

vi httpd.conf

Modify following settings

Listen 8081
 
User vidyadhar
Group vidyadhar
 
ServerName ubuntu.home.network:8081

Now we will start apache, to do the same run

cd /home/vidyadhar/myapps/apache/bin
./apachectl -k start

To confirm apache is running on not, run following command

netstat -an | grep 8081

You should get output someting like this

tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN

Now just open your browser and enjoy your apache installation. The URL would be http://server_ip:8081/

Create hotspot in Ubuntu 11.10

Recently I need to access my Internet from my blackberry device. I already using Connectify to run my windows machine as a wifi-hotspot, but due to some reason on my laptop windows was not working. So I thought I should find some alternative to create a wifi hotspot in Ubuntu.

Ubuntu 11.10 gives user easy way to turn their computer into hotspot. You can simply do it without installing any application.

To get started got to the Application > System Tools > System Settings > Network Setting > Wireless. You will see the following screen in your Computer.

Click on Use as Hotspot. You hotspot will be immediately create with the SSID name “UBUNTU”. If you want to change it go to configure

1st field is for assigning a name for a connection. 2nd field is for enabling security in hotspot connection. 3rd field is for assigning SSID as a unique name. 4th field is for cloning your MAC address.

To Configure wireless security, select different security mode of your desire and put your desired password.

That’s it. Your wifi hotspot is ready in Ubuntu.
If you are using any other software or method please let us know the same.

How to generate a CSR for IBM IHS Server

Note: The following instructions are for IBM IHS 7.0x. You can use them for older versions of Websphere as well as for IHS but there are some small interface differences.

The first step is to create a keystore, a file that contains the certificates and private key. You will create the keystore with IBM’s Key Management Utility, which comes installed with IHS Server:

1. Start the Key Management Utility (iKeyman).
Go to IBM IHS server bin directory and run ikeyman. In our case it is /app/IBM/HTTPServer/bin

cd /app/IBM/HTTPServer/bin
./ikeyman

2. In the IBM Key Management Utility, click on Key Database File and then New.

3. Choose Key database type and select CMS. Give the keystore a name such as key.kdb.

4. Click the Browse button. Go to /app/IBM/HTTPServer/certificates or to a different location where you want to store your keystore file.

5. Click OK.

6. After saving the key database file to the location specified, you are prompted to enter a password. This is the password that will be used to open the key database file in iKeyman in the future.

7. Make sure check box Stash the password to a file is enabled. this saves the encrypted password file as a .sth file in the same directory as the key database file. Now click OK

Your Key Database file is Ready.

8. Click Create then New Certificate Request to bring up the Create New Key and Certificate Request dialog.

9. Type a Key Label, Common Name, Organization, Locality, State, and select a Country. Select 2048 for Key Size. For common name enter the fully qualified domain name for the site you are securing (e.g. www.yourdomain.com). If you are generating a Websphere CSR for a Wildcard SSL Certificate make sure your common name starts with an asterisk (e.g. *.example.com).

8. Browse for a location and enter a name for the file such as certreq.arm and click OK.

9. You can now open that file in a text editor and send it to Certificate Authority to order your SSL certificate.

Make sure to remember where your kdb file is as it will be required later when installing your SSL certificate in IBM IHS / Websphere.

Page 6 of 27« First...«456789»1020...Last »
rss twitter facbook

Categories

Archives