4

I decided to install Ubuntu 19 freshly, as it is inevitable, but also that GNOME has promise. However, some things from unity should be inherited without question. One of those things is that you could simply open dash, search the shutdown button, and place that in the dock which is amazing in case of a touchy laptop.

And now years later, a newer system doesn't provide this. You can find the shutdown function in the app menu, but cannot add it as a favorite. Does someone know how to achieve what I want? There are no extensions to be found either.

4

Well, you can create a launcher by hand and add to the dock as a workaround. To do that, follow the steps below.

  1. Create a .desktop file (say shutdown-for-dock.desktop) in ~/.local/share/applications/ directory. You can do that by running the following command in Terminal:

    touch ~/.local/share/applications/shutdown-for-dock.desktop
    
  2. Open the file with a text editor, for example by running

    gedit ~/.local/share/applications/shutdown-for-dock.desktop
    

    Then add the following lines to the file:

    [Desktop Entry]
    Name=Shutdown for Dock
    Exec=gnome-session-quit --power-off
    Comment=Shutdown button for Ubuntu dock
    Terminal=false
    Type=Application
    Icon=system-shutdown
    
  3. Save the file.
  4. Click "Activities" or "Show Applications" and search for "Shutdown for Dock". It should appear.

  5. Right click and add to favourites.

| improve this answer | |
  • superb advice. it works as intended. it is still strange that this work-around is needed. why the standard power off button in the app menu does not show the 'add to favorites' option is beyond me. really hope that gets fixed. would be so much added value. – Angorano Jul 23 '19 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.