On your desktop create a text file using your favourite text editor.
Paste the following inside the file:
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Type=Application
Name=Shut Down
Comment=Shut off this machine
Categories=System;
Exec=sudo halt
Icon=system-shutdown
Terminal=false
StartupNotify=true
Path=
Save the file as shutdown.desktop
If necessary check the properties and make it executable. You will see a red circular icon on your desktop, just click on it.
That's it, you have a Shutdown button on your desktop. It works perfectly for me. Let me know if it works for you.
Create shutdown button on Desktop
Re: Create shutdown button on Desktop
Thank you.
Just .. "halt" may not always mean "poweroff" (like this laptop) .. therefore the command may be better as sudo init 0 or sudo shutdown -Ph now for a real shutdown.
Just .. "halt" may not always mean "poweroff" (like this laptop) .. therefore the command may be better as sudo init 0 or sudo shutdown -Ph now for a real shutdown.
Re: Create shutdown button on Desktop
Does this work on all 3 versions of MX LInux? (hint, hint)
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: Create shutdown button on Desktop
Have you tried "Compact Shutdown" widget for KDE and "Action Buttons" for XFCE panel?Jerry3904 wrote: Tue Nov 08, 2022 10:59 am Does this work on all 3 versions of MX LInux? (hint, hint)
Re: Create shutdown button on Desktop
Not talking about those two ...
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: Create shutdown button on Desktop
Should work on all MX/antiX install using "poweroff"Jerry3904 wrote: Tue Nov 08, 2022 10:59 am Does this work on all 3 versions of MX LInux? (hint, hint)
Code: Select all
[Desktop Entry]
# Filename: system-shutdown.desktop
Type=Application
Name=Shut Down
Comment=Power off the machine
Categories=System;
Exec=sudo poweroff
Icon=system-shutdown
Terminal=false
StartupNotify=false
Categories=System;
the other one's recommended above like "sudo init 0" or "sudo shutdown ..."
won't work, as sudo would ask for password for those.
Works in MX Linux: Kde, Xfce and Fluxbox
Re: Create shutdown button on Desktop
I was trying to suggest that it probably wouldn't work with MX Fluxbox.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: Create shutdown button on Desktop
After placing the desktop file into applications directory (either ~/.local/share/applications or system wide /usr/share/applications) it would be available in the menu(s) and ready to power off MX Fluxbox, too.Jerry3904 wrote: Tue Nov 08, 2022 12:15 pm I was trying to suggest that it probably wouldn't work with MX Fluxbox.
Re: Create shutdown button on Desktop
Sure, but that makes no sense for MX Fluxbox:
1) MXFB already has a rootMenu entry for shutdown and has no need for another
2) no button appears on the desktop (unless of course the user goes through idesk).
So my original not-well-expressed point was: OP's solution is valid for Xfce and KDE only.
1) MXFB already has a rootMenu entry for shutdown and has no need for another
2) no button appears on the desktop (unless of course the user goes through idesk).
So my original not-well-expressed point was: OP's solution is valid for Xfce and KDE only.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin