One-click shutdown and restart

Having updated from Linux Mint 13 to Mint 17, primarily to fix a problem with custom application launchers (see previous post), it’s ironic that one of the things that doesn’t work after the upgrade is the application launcher(s) in question! However, it turns out that there is an easy fix.

I use custom application launchers to both shutdown my machine and to restart it when I want to use the dual-boot (Linux-Windows) capability. Creating an application launcher is easy. Simply right-click on the desktop and select Create Launcher. In the pop-up dialogue box enter Name = Shutdown, Command = shutdown -P now, and Comment = Shutdown the computer. (The command for the restart launcher is shutdown -r now).

I also like to use a different icon for each launcher (rather than the default “spring”). This is done by left-clicking on the default icon and navigating through the file system to select an icon file of choice. (I use the same shutdown and restart icons that I have on my Windows 8.1 box – for consistency – and also because they are pretty red- and green-coloured icons!)

However, the problem with all of the above was that, after re-installing the Mint OS and creating new application launchers, the launchers didn’t do anything! I was in the very same situation before I started the updating process.

My usual search on Google eventually identified a viable solution. It is necessary to change the permissions on the shutdown program so that a regular user can run the file as though they are the owner of the file. To do this, in Terminal, enter the following command:

sudo chmod u+s /sbin/shutdown

The custom application launchers that call the shutdown program now work as before. (Perhaps I could have run this command earlier and had no need to update my entire operating system!)


How to Add a Shutdown (Power Off) Button to Your Desktop

Power Options in Windows 8.1

Other Power Shut Down Metro Icon

Setting the SUID/SGID bits: Giving a program YOUR permissions when it runs

This entry was posted in Commands, Mint, Tweaks. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s