Inviare file tramite bluetooth da crontab

Pubblicità
C'è un altro modo per usare la console che dici? Perché sto usando VNC per accedere lubuntu... Comunque ho provato a mettere nello script:
Codice:
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bluetooth-sendto --device=xx:xx:xx:xx:xx:xx  /home/user/send.txt
e ho eseguito lo script da "sudo crontab -e". Nel file di log ho:
Codice:
/home/user/Desktop/bt.sh: line 2:  3981 Hangup                  pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bluetooth-sendto --device=xx:xx:xx:xx:xx:xx /home/user/send.txt

- - - Updated - - -

Mettendo il crontab senza il sudo, nel log ottengo: Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address
 
Ultima modifica:
Provando quello che ho trovato qui: Bad Request
ho ottenuto:Connecting to session bus failed: Could not connect: Connection refused.
bluetoothctl come funziona?
 
Grazie per la disponbilità. Scrivo qui la soluzione che ho trovato, magari può far comodo a qualcuno.
Codice:
[COLOR=#141414][FONT=&amp]obexftp –-nopath –-noconn –-uuid none –-bluetooth <BTAddr> –-channel <OPUSHChannelNo> –put <FileToPut>
.
E' un comando non grafico e quindi funziona alla perfezione.
Il channel si trova grazie ad un altro comando:
[/FONT][/COLOR]
Codice:
[COLOR=#000000][FONT=Verdana]sdptool browse <BTAddr>
Altri comandi:
[/FONT][/COLOR]https://hanishkvc.wordpress.com/2007/05/16/short-and-simple-commandline-bluetooth-in-any-new-linux-distros/
 
Pubblicità
Pubblicità
Indietro
Top