To Add an item in Main Menu

Hello Friends.

If You want to add items in Main menu. We may do it in simple way, instead of adding some items we can also use our own programs. For example am going to show you how to add the python program in the application menu.

The steps as followed:

Step: 1 Choose the program which you want to add in the application menu. For myself here I have chosen Hello World in pygtk.

Step: 2 Go to System -> Preferences ->  Main Menu

Step: 3 Dialog Box will appear

Step: 4 In Applications Tree choose Accessories.  Click New Item Button.

Step: 5 Create Launcher Dialog Box will appears.

Step 6: Fill every options in that Dialog box. For example here is a sample to my program.

In this we can also change the picture to our applications.

Step 7: Note that i have used python keyword for the program to execute the python program. And the path is important we can use the browse button to choose them. Comment is an optional thing.

Default : /home/ubuntu/Desktop/hello.py                       Change : python  /home/ubuntu/Desktop/hello.py

Step 8: Click Close button to save. Now we can run the application from Applications Menu.

For My program

Applications -> Accessories -> Our Application.

Thanks & Regards,

V.Balakrishnan.

To Print a text file in Ubuntu Using cat command

Hi to all.

To print a text file in Ubuntu to a printer. We can use simply cat command for that. We don’t need printer driver files. The command used to print the file is

sudo cat sample.txt > /dev/usb/lp0

Here we want to run the above mentioned command as root user. Also the printer must be connected in USB port.

Then we can use this command. Other wise we want to see any other lpt ports is connected.

Thats it.