I am following this guide to connect to a Raspberry Pi with Bluetooth and I would like the Pi to execute the following command at boot.
screen sudo rfcomm watch /dev/rfcomm0 1 /sbin/agetty rfcomm0 linux 115200
I have tried multiples to achieve it with the 2019.4 Kali Linux release but none of them succeeded.
1) Edit the /etc/rc.local
file with the desired commands
2) Add the desired commands to cron
3) Execute the command with the automated startup in the Settings menu
So here are my questions:
a) Is it a special command that can't be executed at boot or there is something that makes it nonexecutable?
b) What should I do to launch this command at boot?
sudo
, it's being run with privileges. You've said it doesn't happen -- first check that rc.local is running with something likedate > /tmp/rc-local-check
(will leave a timestamp at boot in that file). If it is running, then you need to find out ifscreen
or something puts out any error messages by redirecting them to a file: https://raspberrypi.stackexchange.com/a/40494/5538 – goldilocks Jan 15 '20 at 22:03rc.local
. So,cat /var/log/syslog
and add the error of the command you added torc.local
. It's exactly afterscreen sudo rfcomm watch /dev/rfcomm0 1 /sbin/agetty rfcomm0 linux 115200
. – M. Rostami Jan 15 '20 at 22:53