Choose style:

Author Topic: Peppermint 7/8 - Shutdown button for the bottom panel  (Read 2629 times)

0 Members and 1 Guest are viewing this topic.

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25931
  • Karma: 2835
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Peppermint 7/8 - Shutdown button for the bottom panel
« on: July 25, 2017, 07:29:12 pm »
Want a SHUTDOWN button on the bottom panel in Peppermint 7 or 8 ?

Right-click on an empty space on the panel and select :-
Panel > Add New Items

Select "Launcher", and click the "Add" button .. then click the "Close" button,

You should now notice a blank file icon to the right of the clock.

Right-click that file and select "Properties"

Click the "Add an empty item" button.

In the resulting "Create Launcher" dialog box, set

Name: Shutdown
Comment: Shut down the PC
Command:

Code: [Select]
dbus-send --session --type=method_call --dest=org.lxde.SessionManager /org/lxde/SessionManager org.lxde.SessionManager.Shutdown
Working Directory: <leave empty>

Now click the "No Icon" button, and wait for the icon browser to launch (it can take a short while)

Personally I chose:-
Select icon from: Action Icons
then picked the
system-shutdown-restart-panel
icon .. then clicked the "OK" button.

Then click the "Create" button.

All done :)



Results:-


This button does NOT throw up the logout options, it just immediately shuts down the PC .. if you'd prefer it to throw up the logout dialog instead, make the command line just read:
Command: peppermint-logout
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Slim.Fatz

  • Trusted User
  • Veteran
  • *****
  • Posts: 1788
  • Karma: 471
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Peppermint 7/8 - Shutdown button for the bottom panel
« Reply #1 on: July 29, 2017, 04:55:06 pm »
Hi PCNetSpec,

I followed your tutorial on several different computers and it works fine except on my newest one:

Code: [Select]
inxi -Fz
System:    Host: B50 Kernel: 4.10.0-28-generic x86_64 (64 bit) Desktop: N/A
           Distro: Peppermint Eight
Machine:   System: LENOVO product: 80QR v: Lenovo B50-10
           Mobo: LENOVO model: Lenovo B50-10 v: No DPK
           Bios: LENOVO v: CCCN20WW(V2.06) date: 08/25/2016
CPU:       Dual core Intel Celeron N2840 (-MCP-) cache: 1024 KB
           clock speeds: max: 2582 MHz 1: 2559 MHz 2: 2582 MHz
Graphics:  Card: Intel Atom Processor Z36xxx/Z37xxx Series Graphics & Display
           Display Server: X.Org 1.19.3 drivers: (unloaded: fbdev,vesa)
           Resolution: 1366x768@60.00hz
           GLX Renderer: Mesa DRI Intel Bay Trail GLX Version: 3.0 Mesa 17.0.2
Audio:     Card Intel Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.10.0-28-generic
Network:   Card-1: Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
           driver: r8169
           IF: enp3s0 state: down mac: <filter>
           Card-2: Realtek RTL8723BE PCIe Wireless Network Adapter
           driver: rtl8723be
           IF: wlp4s0 state: up mac: <filter>
Drives:    HDD Total Size: 128.0GB (9.3% used)
           ID-1: /dev/sda model: SAMSUNG_MZYLF128 size: 128.0GB
Partition: ID-1: / size: 20G used: 5.6G (31%) fs: ext4 dev: /dev/sda2
           ID-2: swap-1 size: 6.29GB used: 0.00GB (0%) fs: swap dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 45.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 166 Uptime: 24 min Memory: 595.8/3834.5MB
           Client: Shell (bash) inxi: 2.2.35

When I hit the button it hangs in the shutdown screen with only a tiny bit of the progress bar showing any "progress". The only way to turn it off is to hold the on/off power button for about 10-12 seconds. Any way to get behind this screen to see what is blocking shutdown?  :-\

Regards,

-- Slim
"Life first -- Peppermint a close 2nd!" -- Zeb

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25931
  • Karma: 2835
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Peppermint 7/8 - Shutdown button for the bottom panel
« Reply #2 on: July 29, 2017, 05:30:51 pm »
Try the "Esc" key.

The other option would be to make the button throw up the normal logout option screen, by making the command read:-

Command:
Code: [Select]
peppermint-logout
« Last Edit: July 29, 2017, 05:33:23 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Slim.Fatz

  • Trusted User
  • Veteran
  • *****
  • Posts: 1788
  • Karma: 471
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Peppermint 7/8 - Shutdown button for the bottom panel
« Reply #3 on: July 30, 2017, 03:43:40 am »
Hi PCNetSpec,

Thanks for the suggestion, but the ESC key does nothing when it blocks at shutdown. I went ahead and changed the command for the button to just be

Code: [Select]
peppermint-logout

and this works, but I do like the way my other machines just simply shutdown immediately when I press the added shutdown button on their panel...

Regards,

-- Slim
"Life first -- Peppermint a close 2nd!" -- Zeb

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25931
  • Karma: 2835
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Peppermint 7/8 - Shutdown button for the bottom panel
« Reply #4 on: July 30, 2017, 10:26:12 am »
Try:-

Command:
Code: [Select]
systemctl poweroff
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Slim.Fatz

  • Trusted User
  • Veteran
  • *****
  • Posts: 1788
  • Karma: 471
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Peppermint 7/8 - Shutdown button for the bottom panel
« Reply #5 on: July 30, 2017, 01:54:07 pm »
Hi PCNetSpec,

That worked perfectly! Thank you very much from myself and my wife.  :)

Regards,

-- Slim
"Life first -- Peppermint a close 2nd!" -- Zeb

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25931
  • Karma: 2835
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Peppermint 7/8 - Shutdown button for the bottom panel
« Reply #6 on: July 30, 2017, 03:52:21 pm »
You're (both) most welcome Slim :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec