Short and sweet, this one. I think nautilus tries to be clever and produce a “send to bluetooth” menu option when you right-click on certain file types. I’ve never had this work terribly well, if at all, so I’ve added the following script to my collection in ~/.gnome2/nautilus-scripts. I called it Send via Bluetooth, but anything’ll do.
Then for any file, I can right-click and select Scripts/Send via Bluetooth and the file gets whipped to my phone.
#!/bin/sh # Send Selected File via Bluetooth. function do_it() { bluetooth-sendto "$@" # gnome-obex-send "$@" } quoted=$(echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | \ awk 'BEGIN { FS = "\n" } { printf "\"%s\" ", $1 }' | \ sed -e s#\"\"##) eval "do_it $quoted"
On my Fedora box, bluetooth-send comes from the gnome-bluetooth package. Previsouly, the tool I had to use was gnome-obex-send , but that’s been superseded.
Leave a Reply