0

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?

M. Rostami
  • 4,323
  • 1
  • 17
  • 36
  • If you are doing this via rc.local or some other global mechanism there's no point to sudo, it's being run with privileges. You've said it doesn't happen -- first check that rc.local is running with something like date > /tmp/rc-local-check (will leave a timestamp at boot in that file). If it is running, then you need to find out if screen 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:03
  • In this way, after system boot, start running all the commands of the rc.local. So, cat /var/log/syslog and add the error of the command you added to rc.local. It's exactly after screen sudo rfcomm watch /dev/rfcomm0 1 /sbin/agetty rfcomm0 linux 115200. – M. Rostami Jan 15 '20 at 22:53

0 Answers0