Wednesday, December 7, 2011

Sound Troubleshooting in Linux

wazzup! So today we will troubleshoot Linux sounds.
I know this sucks when you are logged in as root in linux ubuntu and you can not listen the songs. So all you gotta do is to enable pulseaudio. Actually pulseaudio is (formerly Polypaudio) is a cross-platform, networked sound server commonly used on Linux and FreeBSD operating systems. So to enable this feature you need to enter following command at your terminal
/usr/bin/pulseaudio and then do not close the terminal. So now you can check whether your sounds are working or not. To test sounds you can enter this command
aplay /usr/share/sounds/alsa/Front_Center.wav
If it is still not working then you might need to check the settings to check some input output setting enter this command gnome-volume-control

If it is still not working then you have to click on output tab of gnome-volume-control panel you can try other detected available output media.

And now you are free to use sounds on Linux ubuntu. If you are using your root account daily then you can use this on startup of your linux. If it is ubuntu go to system>>preferences>>Startup applications click on Add button to add this command.

Enjoy & be open.
long live linux.

Sunday, November 6, 2011

Run google chrome as root in ubuntu

Today we will run google chrome with root account. Actually it is strictly advised that you should not play with but anyway who cares...
To start the google chrome with root account follow the following steps.

1) Go to /opt/google/chrome
2) Open google-chrome file. Find exec -a "$0" "$HERE/chrome" "$@"
3) Replace it to exec -a "$0" "$HERE/chrome" "$@" --user-data-dir $HOME
    Now open google chrome from Application>>Internet>>Google Chrome   
    bang Its done!! :)

Enjoy & be open.
long live linux.

Sunday, September 18, 2011

XAMPP on 64 Unix Operating Systems

hello all,

If you have a 64-bit unix like operating system you cant run the Xampp because Xampp currently doesn’t have a 64-bit compiled version. Now what will you do in this condition ?
When you are trying to start a lampp from terminal you might be getting this kind of error:: XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system. Dont worry this is just a simple validation code in /opt/lampp in lampp file on line number 86. Now we will run the xampp under 64-bit operating system even though it is not supporting the 64-bit compiled version.
Please follow the steps in order to start your xampp with 64-bit operating system.

1) Comment the lines in /opt/lampp lampp file from 78 to 90.

     which will now look like this

# XAMPP is currently 32 bit only
#case `uname -m` in
#    *_64)
#    if /opt/lampp/bin/php -v > /dev/null 2>&1
#    then
#        :
#    else
#        $de && echo "XAMPP gibt es zur Zeit nur als 32-Bit Applikation. Bitte verwende eine 32-Bit Kompatibilitaetsbibliothek fuer Dein System."
#        $de || echo "XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system."
#        exit
#    fi
#    ;;

2) Open your terminal (if it is ubuntu 10.10 go to Appllication>>Accessories>>Terminal enter this command sudo apt-get install ia32-libs if it is asking for root password then enter the password, wait till it downloads all of the 32-bit libs.

Once it is done just enter the following command at the terminal /opt/lampp/lampp start

Thats It!!! now you are free to use the xampp under 64-bit operating system.

Enjoy & be open.
long live linux

Friday, March 25, 2011

Run Python script in Linux

Hello everyone,

Now its time to give it a try for python. Pythons is general-purpose high level programming language. The python's syntax is very clear and human readable.
The interesting fact about python is, It never forces programmer to write a code in OOPS style like java or in structural style like in c. It is all up to programmer how he/she wants to implement it.
Python is influenced by ABC, ALGOL 68, C, C++, Java, Haskell, Pearl etc.
Python can be run on multiple platforms.

Now lets begin with our first program i.e. how to print hello world. For that just go to your terminal
from Applications>>Accessories>>Terminal

step 1. Just type python
it will show you

Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)

[GCC 4.4.5] on linux2

Type "help", "copyright", "credits" or "license" for more information.


step 2. This is nothing but your python version installed on the system.

Step 3. Now you are in python mode. Means not at primary prompt. i.e. >>>

step 4. Just write print “hello world” and hit enter. Thats it , yes you are done. It will show you
the output at next line like 'hello world'

1. you can also use python as desktop calculator at go to terminal just type python and at python prompt (which is >>>) just type 5+2 and it will give you the answer.

2. You can also edit bigger python code in your favorite text editor with following command
gedit and hit enter you will see new file open in gedit which is default
text editor for linux.

3. Remember .py is file extention of python files but some times we also uses .pyw, .pyc, .pyo, .pyd

4. If you are python prompt (which is after typing python at primary prompt) you can terminate
any operation by pressing the CTRL+C

5. If you want to terminate everything from the terminal and go back to the primary prompt
then simply type CTRL+D

6. As python is influenced from C language so you can write the same code except curly
braces ( {} ) are not welcome here instead use proper indentation.

7. Python also requires proper indentation while programming if not it will generate
indentation error
like e.g.

if a==2:
print “a is equal to two”

the above code will generate indentation error so right way is to do is put a tab of space before
print statement
Right way is



... print "a is equal to two"

... else:

... print "a is not equal to two"

now the output will be

a is equal to two

If you want the beginners python pdf you can get it from here.

So bye for now and feel free to comment on any of my post.

Enjoy & be open.
long live linux

Saturday, March 19, 2011

Run C programs in Linux

Hello friends,
Before we proceed I would like to thanks MR.Richard Stallman (founder of GNU project) for free software movement.
I will now demonstrate you the steps that you can follow to run C PROGRAMS on any linux distribution like ubuntu,Linux 10 mint,OPEN SUSE,fedora etc.

You might have used microsoft c,Turbo c or Borland c compiler but, GNU compiler is little different from all of it as it compiles c programs faster and produces the output at the terminal.

You can also create, compile and run your any C PROGRAMS. All you have to do is get any linux distribution installed on your computer machine.

1)To create your c program go to your Terminal from Applications >> Accessories >> Terminal
2)Just Type gedit hello.c &
Now here gedit is command to open Linux's default text editor afterwards hello.c is your filename. Now just hit enter.
3)Now You will see one brand new file open next to your eyes. Now just type any your first c program or copy paste following code:

#include< stdio.h >
int a,b,c;
printf("Enter two number for an addition\n");
printf("Total of two number is %d\n",c);

4)before main() I have included standard input output files so that printf scanf function works
(note: please remove white spaces which is before the stdio.h and after stdio.h word because right now google is treating it as html tag )

5)Now Save the file.
6)Go back to terminal just type gcc -o hello hello.c
and hit enter.
7)Now you can type ./hello and hit the enter and see the output.

This is how you can run any c programs in linux operating system. At the next tutorial we will see how to run python programs in linux operating system.

so bye for now,

Enjoy & be open.
long live linux

Friday, January 14, 2011

Download linux 10 mint now

Hi everyone,
My name is amit naik. I have been using linux mint 10 julia since one month. It is very cool I think every one should try this operating system.
I tell you why to use Linux mint 10.
i)You can get free updates to your system.
ii)No virus.(what ? yes believe me)
iii)Free community support.(Go Here )
iv)Bunch of open source software available like Open office,GIMP image editor,Brasero disc burner etc.

So just go to Linux mint website and download brand new version.

Linux Mint 10 Julia gets a perfect 10!

Enjoy & be open.
long live linux