I'm trying to set up a script to run on startup and I found this quesiton: Running a Python script at startup

I tried adding the script to my rc.local but I can't save the file. Neither can I create another copy somewhere else and overwrite it. I keep getting permission denied.

I should note that I'm doing this from the GUI and I don't know much about debian. How do I get the file to let me add the line?

1 Answer 1


You need to run your text editor (Leafpad, I assume) as the super user (aka root).

In LXTerminal, type sudo leafpad and hit Enter. It will prompt you for your password; after you type it in, Leafpad will start and you will be able to overwrite /etc/rc.local.

  • 1
    2020 update: now sudo mousepad filePath should be used Commented Dec 5, 2020 at 7:55

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.