I need some help...

Hi,
Just wanna ask if it is possible to use a PIR sensor connected to arduino then if the sensor detect a person it will open a file in pc...
in ubuntu enviroment...

Thx in advance...

Yes.
When the sensor detects, send a message on the serial line.
Then on the PC have a program that looks at the serial port and when it sees the message opens the file.

izit the same like C program using exec to open certain file....
because right now I'm planing to open a Java file when it detect people...

You can write yourPC program in any language you like.

I would like to learn more in details if u dont mind teaching me ?

To start the serial system, in setup function put:-

Serial.begin(9600);

Then to send a message to the PC simply use the serial print function:-

Serial.println("GO");

Will sent the string "GO" to the PC.
are carriage return and line feed that tell the PC the string has finished.
And that has sent a message to the PC.

How you receive that message on the PC depends on what language you are programming it in. Most languages can communicate with the serial port or coms port as it is sometimes called.

I have communicate with the PC using
Serial.println("Motion detected!");
and display at serial monitor...
but how or what the command use for opening a file ?

but how or what the command use for opening a file ?

It depends on what language you are programming in on the PC.
You have to have a program, you can not just use the serial monitor.

can i just call a .sh file ?
because i think is easier or there is a easier way to do it ?

xJustMex:
can i just call a .sh file ?

No.
You need some way for your computer to do this. That involves writing or installing software on your computer.
Something like gobetweeno, or apple script.

See Arduino Playground - LinuxTTY if you're trying to script it.

Other language examples are listed on Arduino Playground - InterfacingWithSoftware

sry cant find any idea to do it can u just give me example of when the PIR sensor input high it will open java file....
any code will do if possible C will help
sry still newbie with this arduino

xJustMex:
sry cant find any idea to do it can u just give me example of when the PIR sensor input high it will open java file....
any code will do if possible C will help
sry still newbie with this arduino

This is code on your computer not on the arduino.
What language do you want to program your computer in?
What environment do you have to write this program?

When you say open a file do you mean open it for reading bytes from it or do you mean open it as in run the program it contains?

Is this any more help to you?
http://playground.arduino.cc/Interfacing/GoBetwino

Grumpy_Mike:
This is code on your computer not on the arduino.
What language do you want to program your computer in?
What environment do you have to write this program?

When you say open a file do you mean open it for reading bytes from it or do you mean open it as in run the program it contains?

Is this any more help to you?
Arduino Playground - HomePage

well if can C language will do
in Ubuntu environment
this GoBetwino is only can used in windows right ?

opening a .jar file
running a code also can
-jar "home/linux/netbeansproject/mainmenu.jar

in Ubuntu environment

Sorry I don't do Linux.

if that so just teach me how to do for example writing a C code how to open a simple txt file in windows and i try to change it to Ubuntu if u dont mind...

example writing a C code how to open a simple txt file

That is just:-

FILE *fp;
 fp = fopen("my.txt" , "r");