This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shutdown procedures
#3
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:

Code:
cd /usr/local/bin/
nano quickshutdown.sh

insert this:

Code:
#!/bin/bash
sudo /sbin/shutdown -h now
and save with ctrl-x, y.

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
Here is what worked for me. You can adjust things like the icon and that sort of thing later if you wish.
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
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.
Reply


Messages In This Thread
Shutdown procedures - by SailorMacSailface - 2020-03-21, 03:24 PM
RE: Shutdown procedures - by abarrow - 2020-03-21, 03:45 PM
RE: Shutdown procedures - by abarrow - 2020-03-21, 04:48 PM
RE: Shutdown procedures - by holgerw - 2020-03-22, 11:14 AM
RE: Shutdown procedures - by abarrow - 2020-03-23, 03:34 PM
RE: Shutdown procedures - by Knoet - 2020-03-22, 02:00 PM
RE: Shutdown procedures - by AlanH - 2020-03-22, 06:54 PM
RE: Shutdown procedures - by PaddyB - 2020-03-23, 01:41 PM
RE: Shutdown procedures - by SailorMacSailface - 2020-03-25, 04:07 PM
RE: Shutdown procedures - by mgrouch - 2020-03-25, 04:17 PM
RE: Shutdown procedures - by SailorMacSailface - 2020-03-25, 06:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)