0

I'm really struggling to get something as simple as this to work. I've tried using rc.local, but for some reason the program doesn't seem to be starting, and I believe it would try to start before the desktop is up and running anyway.

I'm using the legacy 32-bit version of Raspberry Pi OS (Debian Bullseye) for a Pi 4.

I'd like a new terminal window to start up with the following command after the desktop has started at reboot time:

sudo /root/cpuminer-multi/cpuminer -parameters for the miner etc

It would be nice to have the terminal window visible, so that I can check on its status via VNC periodically.

Thanks

3
  • If all you're going to do is run this cpuminer command - why are you even running the GUI/X-Windows? Have you considered running your RPi "headless", and just use SSH to log in? This is why your question is so bad - it's like you know absolutely nothing about anything. :-|
    – Seamus
    Commented Mar 26 at 19:39
  • When you sudo a process, it runs, obviously, as a different user (root). Therefore it does not have access to YOUR desktop. This approach won't work.
    – Peter Bill
    Commented Apr 1 at 15:08
  • "I've tried using rc.local, but for some reason the program doesn't seem to be starting" -> That runs in the background, not your GUI session (also, using sudo in rc.local is pointless, it runs as root anyway). You want to use ~/.config/lxsession/LXDE-pi/autostart for this.
    – goldilocks
    Commented May 5 at 20:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.