0

I edited /usr/share/polkit-1/actions/org.freedesktop.upower.policy in Lubuntu 14.04 and somehow ended up with an empty file being saved. This has disabled hibernation in my computer. Can someone provide me with the contents of the file?

1 Answer 1

0

Please see below for the contents of the default version of this file.

 <?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">
<policyconfig>
  <vendor>The UPower Project</vendor>
  <vendor_url>http://upower.freedesktop.org/</vendor_url>
  <icon_name>system-suspend</icon_name>

  <action id="org.freedesktop.upower.suspend">
    <description>Suspend the system</description>
    <description xml:lang="fr">Mettre le système en veille</description>
    <description xml:lang="it">Sospende il sistema</description>
    <description xml:lang="pl">Wstrzymanie systemu</description>
    <description xml:lang="sv">Försätt systemet i vänteläge</description>
    <message>Authentication is required to suspend the system</message>
    <message xml:lang="fr">Vous devez vous identifier pour mettre le système en veille</message>
    <message xml:lang="it">È richiesto autenticarsi per sospendere il sistema</message>
    <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby wstrzymać system</message>
    <message xml:lang="sv">Autentisering krävs för att försätta systemet i vänteläge</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.upower.hibernate">
    <description>Hibernate the system</description>
    <description xml:lang="fr">Mettre le système en hibernation</description>
    <description xml:lang="it">Iberna il sistema</description>
    <description xml:lang="pl">Hibernacja systemu</description>
    <description xml:lang="sv">Försätt systemet i viloläge</description>
    <message>Authentication is required to hibernate the system</message>
    <message xml:lang="fr">Vous devez vous identifier pour mettre le système en hibernation</message>
    <message xml:lang="it">È richiesto autenticarsi per ibernare il sistema</message>
    <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zahibernować system</message>
    <message xml:lang="sv">Autentisering krävs för att försätta systemet i viloläge</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

</policyconfig>
3
  • Thank you. I saved the file but it did not save as a policy file but as a text document (by the file image and the persistence of the hibernation problem). Would you know how to fix that?
    – user273201
    May 8, 2014 at 5:40
  • Yes open up a terminal and enter the following command nano /usr/share/polkit-1/actions/org.freedesktop.upower.policy paste this entire file into nano (which is a text editor, sorry If you already knew that :)) Save the file and it should save it as a policy file instead of a text file. Nano may ask you if you want to overwrite the existing file, just say yes.
    – levlaz
    May 8, 2014 at 22:05
  • OK. Sorry, I just had the idea to copy another policy file from the same folder and just replace its content with the text you gave me and rename the file. It did not work, but I realized that there was a difference between the two files: there is a space right at the beginning of the code you gave me that is not found in the other file I used. I deleted that space and now it is working! Thank you for your response though. What you can do is edit your answer to remove that space, and if you want, we can delete these comments altogether. Thanks again.
    – user273201
    May 8, 2014 at 22:34

You must log in to answer this question.