Choose style:

Author Topic: shutdown (SOLVED)  (Read 1842 times)

0 Members and 1 Guest are viewing this topic.

Offline Tea

  • nOOb
  • *
  • Posts: 12
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
shutdown (SOLVED)
« on: July 27, 2015, 06:08:43 am »
Is there any way to change the task bar power button  to give an immediate shutdown  now (as you can in xfce/mate by changing the items it calls), without calling the shutdown menu and having to confirm the shutdown.

Failing that is there a way to have a desktop icon to do the shutdown - only problem I can see with this, it would require sudo permission...
« Last Edit: July 28, 2015, 12:24:07 pm by Tea »

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26280
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: shutdown
« Reply #1 on: July 27, 2015, 11:41:37 am »
OK, run:
Code: [Select]
sudo gedit /usr/share/applications/peppermint-poweroff.desktop
when a BLANK file opens, make it read
Code: [Select]
[Desktop Entry]
Name=Power Off
Comment=Instantly Power Off the PC
Icon=gnome-logout
Exec=dbus-send --session --type=method_call --dest=org.lxde.SessionManager /org/lxde/SessionManager org.lxde.SessionManager.Shutdown
Categories=GTK;Settings;
NoDisplay=true
SAVE the file and exit gedit

Now edit your panel confg file:
Code: [Select]
gedit ~/.config/lxpanel/Peppermint/panels/panel
and change the last sections from
Code: [Select]
Plugin {
    type = dclock
    Config {
        ClockFmt=%R
        TooltipFmt=%A %x
        BoldFont=0
        IconOnly=0
        CenterText=0
    }
}

Plugin {
    type = launchbar
    Config {
        Button {
            id=peppermint-logout.desktop
        }
    }
}
to
Code: [Select]
Plugin {
    type = dclock
    Config {
        ClockFmt=%R
        TooltipFmt=%A %x
        BoldFont=0
        IconOnly=0
        CenterText=0
    }
}

Plugin {
    type = launchbar
    Config {
        Button {
            id=peppermint-poweroff.desktop
        }
    }
}
SAVE the file and exit gedit

delete the backup file (that was just created) THIS IS IMPORTANT:
Code: [Select]
rm -v ~/.config/lxpanel/Peppermint/panels/panel~
now restart the panel:
Code: [Select]
lxpanelctl restart
the shutdown button far right of the panel will now IMMEDIATELY power off the PC



If for any reason you need to reset the bottom panel to defaults, run:
Code: [Select]
cp -v /usr/share/lxpanel/profile/Peppermint/panels/panel ~/.config/lxpanel/Peppermint/panels/panel
and restart the panel
Code: [Select]
lxpanelctl restart
« Last Edit: July 27, 2015, 11:48:59 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Tea

  • nOOb
  • *
  • Posts: 12
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
Re: shutdown
« Reply #2 on: July 27, 2015, 02:46:06 pm »
Excellent - Thank you for the help. it works perfectly.  :D :D

I did change the icon back to Icon=system-shutdown-panel as the one you used is a metalic logout icon.


Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26280
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: shutdown
« Reply #3 on: July 27, 2015, 04:56:18 pm »
You're welcome :)

If you're happy the solution works, can you please remember to mark the topic (SOLVED), this will help future searchers find a known working solution, as well as informing responders on the forum that the issue has been dealt with.

You can mark the topic (SOLVED) by editing the FIRST posting in the topic and appending "(SOLVED)" to the end of the subject line .. like this:-

Subject: shutdown (SOLVED)

then hitting the "Post" button .. Thanks in advance :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec