0

I'm pretty new. I've been a bit stupid: after installing the shutdown button from a tutorial (https://www.youtube.com/watch?v=eBNPm0fa4Do), I have configured it as startup, and now every time I turn on the computer it shuts down when Ubuntu loads (22.04.1 LTS). What I can do? I can't access ubuntu...

2
  • Upvoted your question as it gave me a good laugh :) Putting a program that automatically shuts down your computer into autostart is a really crazy idea :)
    – raj
    Aug 18, 2022 at 14:04
  • The worst thing is that I thought about it: what happens if I do...
    – Markel
    Aug 18, 2022 at 14:28

2 Answers 2

3

Boot into rescue mode and delete that file.

  1. At startup, you see the Grub menu. From that, quickly select Advanced Options.
  2. Select the line that looks like Ubuntu GNU/Linux, with Linux 5.15.0-46-generic (recovery mode)
  3. After a little while, another menu is presented. From this, choose Drop to root shell prompt.
  4. Change to your home directory: cd /home/[username]/. Replace [username] with your actual user name.
  5. Delete the file: rm .local/share/applications/Power_off.desktop (I think that was the correct name of the file. If not, change to the directory with cd .local/share/applications and do an ls to find out the correct name.)
  6. Enter reboot and your system should start up normally.
3
  • I have followed the steps and to my surprise there have been no errors, but the computer continues to shut down. I think by setting it as startup, the 'Power_off.desktop' commands have been copied into some file. It can be? Thanks for the quick response, It is awesome!
    – Markel
    Aug 17, 2022 at 21:24
  • That may be, but these commands just undo exactly what the procedure in the video created.
    – Jos
    Aug 17, 2022 at 21:30
  • After the tutorial, I have configured it as startup, and that is when the problem has arisen. Afterwards, I have created a boot disk, to try to make a backup, but I have not succeeded.
    – Markel
    Aug 17, 2022 at 21:35
1

I finally found the solution. File 'Power_off.desktop' was copied to '.config/autostart/' Therefore, I have gone into root, in the mentioned folder, and used this command to remove it: sudo rm Power_off.desktop

Thank you for all.

Step by step:

Power on the computer

Esc

Choose Advanced options for Ubuntu

Choose Ubuntu ... (recovery mode)

Choose root

Enter

CD home/[name]/

CD .config

CD autostart

sudo rm Power_off.desktop

reboot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .