Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Shut down menu option not working

  1. #1
    Join Date
    May 2006
    Beans
    126

    Shut down menu option not working

    We have three desktop computers on Dell hardware, installed some 4 years ago. These PC's are for our guest to get online.
    Currently they are running ubuntu 12.04.

    Recently I noticed two of them are having a problem: The Shut Down menu option in Unity does not work. When you select "Shut Down" from the upper right hand corner menu, you will get the pop up window to confirm. When you hit the "Shut down" button there, the pop-up disappears, but nothing happens.

    I can shut down the PC nicely from commandline. But it would be useful to allow the users also to shut down the system when they finish.

    It might be, that one temporary admin had made some changes with lock down editor (perhaps pessulus) as he mentioned planning something along this line, but now Pessulus is depreciated in 12.04 and it is not installed in the system. This person left, and he did not document the changes he made.

    Does this sound like some change he might have made, or is this some strange Ubuntu bug?
    Last edited by Arjunanda; June 18th, 2013 at 12:09 AM. Reason: Solved

  2. #2
    Join Date
    May 2010
    Location
    uk
    Beans
    8,095
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Shut down menu option not working

    Hi

    Quote Originally Posted by Arjunanda View Post
    Does this sound like some change he might have made, or is this some strange Ubuntu bug?
    Could be either.

    Just to get a feel for what is going on, open a terminal and type these different shutdown commands.

    Which ones work - if any ?

    Code:
    gnome-session-quit
    Code:
    /usr/lib/indicator-session/gtk-logout-helper --shutdown
    Code:
    dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
    What do these commands return ?

    Code:
    ls -l /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy
    Code:
    cat /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy
    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

  3. #3
    Join Date
    May 2006
    Beans
    126

    Re: Shut down menu option not working

    Just noticed that it is not only shut down, but also reboot and log out for that user.
    If I switch user from the upper right user switcher, and log in as guest, the log out works for guest account. But shut down from guest session does not, it just returns to login screen.

    Rebooting now. Next will test your commands.
    Last edited by Arjunanda; June 17th, 2013 at 12:02 PM.

  4. #4
    Join Date
    May 2006
    Beans
    126

    Re: Shut down menu option not working

    Hahaa!!! )))

    Thanks - now it is clear.
    gnome-session-quit

    ** (gnome-session-quit:2757): WARNING **: Failed to call logout: Logout has been locked down
    So now checking your other commands.

    /usr/lib/indicator-session/gtk-logout-helper --shutdown
    Gives the log out confirmation pop-up, but hitting the button does nothing, nor any error message.

  5. #5
    Join Date
    May 2006
    Beans
    126

    Re: Shut down menu option not working

    And here is the output for the rest of the commands:

    $ ls -l /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy
    -rw-r--r-- 1 root root 1652 Feb 25 2012 /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy
    $ cat /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE policyconfig PUBLIC
    "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
    "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">

    <!--
    Policy definitions for ConsoleKit
    -->

    <policyconfig>

    <action id="org.freedesktop.consolekit.system.stop">
    <description>Stop the system</description>
    <message>System policy prevents stopping the system</message>
    <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>yes</allow_active>
    </defaults>
    </action>

    <action id="org.freedesktop.consolekit.system.stop-multiple-users">
    <description>Stop the system when multiple users are logged in</description>
    <message>System policy prevents stopping the system when other users are logged in</message>
    <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>auth_admin_keep</allow_active>
    </defaults>
    </action>

    <action id="org.freedesktop.consolekit.system.restart">
    <description>Restart the system</description>
    <message>System policy prevents restarting the system</message>
    <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>yes</allow_active>
    </defaults>
    </action>

    <action id="org.freedesktop.consolekit.system.restart-multiple-users">
    <description>Restart the system when multiple users are logged in</description>
    <message>System policy prevents restarting the system when other users are logged in</message>
    <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>auth_admin_keep</allow_active>
    </defaults>
    </action>

    </policyconfig>
    So it appears this temporary admin did try some lock down features, but did not document his work, did not communicate to me and perhaps also the tool he used was removed in upgrade to 12.04.

    Now just need to find how to re-enable the logout.

    Thanks, great to learn these things

  6. #6
    Join Date
    May 2010
    Location
    uk
    Beans
    8,095
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Shut down menu option not working

    Hi

    Did you try this command ?

    Code:
    dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
    It will call console kit directly, bypassng the session manager and should, and i say should reservedly, shut it down as the polkiy file for console kit looks fine.

    It will not offer the option to save any open documents though, as that is the preserve of the session manager, but it will be a useful confirmation of exactly what has been locked down.

    I'm not sure how it was locked down by that software but i think there are only a number of areas that it can be locked down.

    I will be away until this evening though, so i cannot offer guidance until then.

    In the meantime, if you do find a solution then please post it back here

    EDIT:

    As another check for console kit, can you post the output of

    Code:
    ls -l /usr/lib/ConsoleKit/scripts/ck-system-stop
    and

    Code:
    cat /usr/lib/ConsoleKit/scripts/ck-system-stop
    Kind regards
    Last edited by matt_symes; June 17th, 2013 at 12:35 PM. Reason: Another check
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

  7. #7
    Join Date
    May 2006
    Beans
    126

    Re: Shut down menu option not working

    Yes I did, and it worked - it shut down the system cleanly.

    I think the stuff is in the policy kit file
    /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy
    Looking into that now. The syntax is not the most straight-forward.

  8. #8
    Join Date
    May 2010
    Location
    uk
    Beans
    8,095
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Shut down menu option not working

    Hi

    Quote Originally Posted by Arjunanda View Post
    Yes I did, and it worked - it shut down the system cleanly.

    I think the stuff is in the policy kit file
    Looking into that now. The syntax is not the most straight-forward.
    If that shut it down cleanly then it has been locked down at the session manager level and that is where you'll need to look.

    If you've had no luck by this evening, all look for you.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

  9. #9
    Join Date
    May 2010
    Location
    uk
    Beans
    8,095
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Shut down menu option not working

    Hi

    Try having a look under this key using gconf.

    Code:
    /desktop/gnome/lockdown
    Anything useful under there in your version of Ubuntu ?

    Maybe under this key (if it exists ?)

    Code:
    /org/gnome/desktop/lockdown/
    If not check dconf settings as it may be stored there.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

  10. #10
    Join Date
    May 2006
    Beans
    126

    Re: Shut down menu option not working

    Here is the output of these two commands:

    $ ls -l /usr/lib/ConsoleKit/scripts/ck-system-stop
    -rwxr-xr-x 1 root root 191 Feb 25 2012 /usr/lib/ConsoleKit/scripts/ck-system-stop
    $ cat /usr/lib/ConsoleKit/scripts/ck-system-stop
    #!/bin/sh

    #Try for common tools
    if [ -x "/sbin/shutdown" ] ; then
    /sbin/shutdown -h now
    exit $?
    elif [ -x "/usr/sbin/shutdown" ] ; then
    /usr/sbin/shutdown -h now
    exit $?
    else
    exit 1
    fi
    Now using gconf-editor, but so far not found there nothing that would help here.

    /desktop/gnome/lockdown
    did not have anything related to shut down.

    Now looking into dconf.
    Last edited by Arjunanda; June 17th, 2013 at 11:45 PM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •