How to add Shutdown button to LXPanel and make it work?

16,065

Solution 1

I created a file that works.

Used the line Exec=/usr/bin/lxsession-logout.

Called the file Shutdown-lubuntu.desktop with these lines:

[Desktop Entry]
Name=ShutdownLubuntu
Comment=Shutdown or Reboot
Icon=system-shutdown-panel
Exec=/usr/bin/lxsession-logout
Categories=GTK;System;Settings;
Type=Application

and put it in usr/share/applications. This made it appear in main menu under System Tools and could be added in lxpanel in an application launch bar.

Solution 2

I opened the config file:

gnome-open ~/.config/lxpanel/Lubuntu/panels/panel

and added these lines at the end:

Plugin {
    type = launchbar
    Config {
      Button {
            id=/usr/share/applications/lubuntu-logout.desktop  
      }
    }
}

This added the logout menu to the lxpanel.

Share:
16,065

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I cannot seem to be able to add a shutdown button to my LXPanel. In /usr/share/applications there is a Shutdown (lubuntu-logout.desktop) containing the line Exec=lubuntu-logout but it would not run.

    It contains the following

    [Desktop Entry]
    Name=Shutdown
    Comment=Shutdown or Reboot
    Icon=system-shutdown-panel
    Exec=lubuntu-logout
    Path=
    Terminal=false
    StartupNotify=false
    Categories=Utility;Settings;System;GTK
    NoDisplay=false
    

    In usr/bin there is a shell script called lubuntu-logout:

    #!/bin/sh
    lxsession-logout --banner "/usr/share/lubuntu/images/logout-banner.png" --side=top
    

    Creating a desktop file that will contain the line Exec=lxsession-logout should also work. But it does not!

    Trying to make it executable, trying to find permissions in pcmanfm - properties:

    enter image description here

    In Thunar I can find the settings to make it executable:

    enter image description here

    But then running it I get

    enter image description here

    How should I edit it to make it run and then visible in menus so to add it to the panel?

    OR: What is the correct content of the shutdown.desktop file?

    • Uri Herrera
      Uri Herrera over 11 years
      Do you have this package installed? lubuntu-default-settings
    • Admin
      Admin over 11 years
      @Uri Herrera - lubuntu-default-settings 0.29 was installed all this time