communicate to pc by bluetooth on Linux

Hello,
I have an Arduino Bluetooth. I am able to upload sketch on board successfully. I try to execute Massimo Banzi's sketch in the page arduino.cc/en/Main/ArduinoBTInitializationSketch to try to communicate width my pc. But the word "ciao" does't appear. When I open the "Serial Monitor", it write:

processing.app.SerialException: Serial port '/dev/rfcomm0' not found. Did you select the right one from the Tools > Serial Port menu?

On Linux the menu Tools > Serial Port don't have the device /dev/rfcomm0, I added it into ~/.arduino/preferences.txt

I try also to run the command

tail -f /dev/rfcomm0

but nothing happen.
This is my ~/.arduino/preferences.txt :

editor.literal2.style=#cc0000,plain
export.application.fullscreen=false
console.output.color=#ccccbb
editor.external.bgcolor=#168299
editor.font.macosx=Monaco,plain,10
preproc.web_colors=true
sketchbook.auto_clean=true
export.application.platform=true
update.check=true
last.sketch.path=/home/mazzetta/sketchbook/sketch_test_bluetooth/sketch_test_blu
etooth.pde
default.window.width=500
editor.fgcolor=#000000
update.id=-8721999720314685083
editor.indent=true
serial.stopbits=1
serial.databits=8
editor.literal1.style=#cc0000,plain
editor.font=Monospaced,plain,12
run.options.memory=false
preproc.jdk_version=1.1
preproc.imports=java.applet,java.awt,java.awt.image,java.awt.event,java.io,java.
net,java.text,java.util,java.util.zip,java.util.regex
editor.divider.size=0
editor.brackethighlight=true
default.window.height=600
last.divider.location=425
editor.caret.blink=true
preproc.color_datatype=true
export.applet.separate_jar_files=false
header.text.font=SansSerif,plain,12
preproc.output_parse_tree=false
status.error.bgcolor=#662000
run.window.bgcolor=#dfdfdf
console.lines=4
upload.using=bootloader
header.text.unselected.color=#ffffff
console.error.file=stderr.txt
editor.keyword3.style=#993300,bold
run.options.memory.maximum=256
editor.tabs.expand=true
parallel.port=0x378
buttons.status.color=#FFFFFF
board=bt
run.window.height.minimum=120
editor.selection.color=#ffcc00
buttons.status.font=SansSerif,plain,12
console=true
run.present.exclusive.macosx=true
serial.parity=N
editor.tabs.size=2
linestatus.height=20
console.length=500
console.font.macosx=Monaco,plain,10
last.window.y=212
history.recording=true
last.window.x=390
serial.port=/dev/rfcomm0
run.options=
editor.eolmarkers.color=#99991A
status.font=SansSerif,plain,12
console.auto_clear=true
status.error.fgcolor=#ffffff
update.last=1253438057153
build.verbose=false
linestatus.color=#ffffff
run.present.exclusive=false
editor.label.style=#7E7E00,bold
export.application.platform.linux=true
editor.comment2.style=#777755,plain
editor.keyword2.style=#996600,plain
console.color=#000000
run.present.bgcolor=#666666
export.application.platform.windows=true
last.window.height=600
run.options.memory.initial=64
apple.laf.useScreenMenuBar=true
editor.eolmarkers=false
console.output.file=stdout.txt
preproc.substitute_unicode=true
editor.linehighlight=true
status.prompt.bgcolor=#cc9900
run.present.stop.color=#cccccc
editor.keyword1.style=#cc6600,plain
editor.external=false
last.screen.height=1024
last.window.width=500
editor.linehighlight.color=#ddddbb
last.sketch.count=0
linestatus.font=SansSerif,plain,10
export.delete_target_folder=true
editor.comment1.style=#777755,plain
preproc.substitute_floats=true
editor.brackethighlight.color=#000000
status.notice.fgcolor=#ffffff
browser.linux=mozilla
editor.caret.color=#333300
editor.invalid=false
settings.path.fallback=data
editor.operator.style=#000000,plain
serial.debug_rate=115200
launcher.linux=gnome-open
browser=mozilla
sketchbook.path=/home/mazzetta/sketchbook
export.application.stop=true
editor.bgcolor=#ffffff
editor.invalid.style=#7E7E00,bold
export.library=false
preproc.imports.jdk14=javax.xml.parsers,javax.xml.transform,javax.xml.transform.
dom,javax.xml.transform.sax,javax.xml.transform.stream,org.xml.sax,org.xml.sax.e
xt,org.xml.sax.helpers
preproc.imports.jdk13=javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,
javax.sound.sampled.spi
sketchbook.prompt=false
preproc.imports.jdk11=java.applet,java.awt,java.awt.image,java.awt.event,java.io
,java.net,java.text,java.util,java.util.zip
console.font=Monospaced,plain,11
header.text.selected.color=#1A1A00
editor.divider.size.windows=2
status.prompt.fgcolor=#000000
sketchbook.path.fallback=sketchbook
preproc.enhanced_casting=true
serial.burn_rate=115200
run.display=1
run.window.width.minimum=120
launcher=gnome-open
platform.auto_file_type_associations=true
editor.antialias=false
upload.verbose=false
console.error.color=#ff3000
preproc.save_build_files=false
last.screen.width=1280
export.application.platform.macosx=true

Please help me.
Bye

I had a similar problem and this is what I did:
$ hcitool scanThen I get a list of BT devices with their MAC addresses, so I choose the one that says ARDUINOBT.
Then I check that it is alive:l2ping 01:23:45:67:89:01Last but not least, I connect:

sudo rfcomm connect 01:23:45:67:89:01 on

It will tell you to Ctrl-C to finish the connection. Not my case. Last but not least open an output stream with your Arduino BT:
cat /dev/rfcomm0 # or rfcomm1, depends on your setupand send text to the Arduino with
echo -ne "blah\r" > /dev/rfcommX Notice that I use an AVR ISP mkII for programming the Arduino (not the GUI), and that you may need to shut down your Bluetooth services in your Linux box.

I do agree that there may be far more elegant and prettier solutions out there, but I was also in your situation an hour ago and I can't put more time on this.

Hope it helps.