2020-03-21, 04:48 PM
Okay, now you got me interested! Here's how you would create a shortcut on the desktop to shut down:
Open a terminal.
1. Create a bash script:
insert this:
and save with ctrl-x, y.
2. Make it executable:
3. Now go to your desktop and create a desktopĀ file:
Here is what worked for me. You can adjust things like the icon and that sort of thing later if you wish.
Insert:
Save with ctrl-x y
Lastly, open your file manager. Go to Edit - Preferences - General. Check "Don't ask options on launch of executable file".
That should do it for you.
Open a terminal.
1. Create a bash script:
Code:
cd /usr/local/bin/
nano quickshutdown.sh
insert this:
Code:
#!/bin/bash
sudo /sbin/shutdown -h now
2. Make it executable:
Code:
sudo chmod +x quickshutdown.sh
3. Now go to your desktop and create a desktopĀ file:
Code:
cd ~/Desktop/
nano quickshutdown.desktop
Insert:
Code:
[Desktop Entry]
Name=Quick Shutdown
Comment=Some comment
Icon=/usr/share/pixmaps/squeak.png
Exec=/usr/local/bin/quickshutdown.sh
Type=Application
Encoding=UTF-8
Terminal=true
Lastly, open your file manager. Go to Edit - Preferences - General. Check "Don't ask options on launch of executable file".
That should do it for you.