Mudanças entre as edições de "Permitindo que o computador seja desligado/reiniciado com outros usuário logados"

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
 
(2 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
Deve-se editar o arquivo /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy e adicionar as linhas que contém +++.
+
Deve-se editar o arquivo org.freedesktop.consolekit.policy
 +
vim /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy
  
 +
Em seguida, modificar o arquivo do seguinte modo:.
  
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <?xml version="1.0" encoding="UTF-8"?>
Linha 6: Linha 8:
 
   "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 
   "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 
   "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
 
   "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
 +
 
  <!--
 
  <!--
 
  Policy definitions for ConsoleKit
 
  Policy definitions for ConsoleKit
 
  -->
 
  -->
 +
 
  <policyconfig>
 
  <policyconfig>
 +
 
   <action id="org.freedesktop.consolekit.system.stop">
 
   <action id="org.freedesktop.consolekit.system.stop">
 
     <description>Stop the system</description>
 
     <description>Stop the system</description>
Linha 18: Linha 23:
 
     </defaults>
 
     </defaults>
 
   </action>
 
   </action>
 +
 
   <action id="org.freedesktop.consolekit.system.stop-multiple-users">
 
   <action id="org.freedesktop.consolekit.system.stop-multiple-users">
 
     <description>Stop the system when multiple users are logged in</description>
 
     <description>Stop the system when multiple users are logged in</description>
Linha 24: Linha 30:
 
       <allow_inactive>no</allow_inactive>
 
       <allow_inactive>no</allow_inactive>
 
       <!--<allow_active>auth_admin_keep</allow_active>-->
 
       <!--<allow_active>auth_admin_keep</allow_active>-->
    '''<allow_active>yes</allow_active>'''
+
      '''<allow_active>yes</allow_active>'''
 
     </defaults>
 
     </defaults>
 
   </action>
 
   </action>
 +
 
   <action id="org.freedesktop.consolekit.system.restart">
 
   <action id="org.freedesktop.consolekit.system.restart">
 
     <description>Restart the system</description>
 
     <description>Restart the system</description>
Linha 35: Linha 42:
 
     </defaults>
 
     </defaults>
 
   </action>
 
   </action>
 +
 
   <action id="org.freedesktop.consolekit.system.restart-multiple-users">
 
   <action id="org.freedesktop.consolekit.system.restart-multiple-users">
 
     <description>Restart the system when multiple users are logged in</description>
 
     <description>Restart the system when multiple users are logged in</description>
Linha 41: Linha 49:
 
       <allow_inactive>no</allow_inactive>
 
       <allow_inactive>no</allow_inactive>
 
       <!--<allow_active>auth_admin_keep</allow_active>-->
 
       <!--<allow_active>auth_admin_keep</allow_active>-->
    '''<allow_active>yes</allow_active>'''
+
      '''<allow_active>yes</allow_active>'''
 
     </defaults>
 
     </defaults>
 
   </action>
 
   </action>
 +
 
  </policyconfig>
 
  </policyconfig>
  
 
Fonte: http://www.linuxquestions.org/questions/debian-26/cannot-restart-shutdown-if-logged-in-another-virtual-terminal-887407/
 
Fonte: http://www.linuxquestions.org/questions/debian-26/cannot-restart-shutdown-if-logged-in-another-virtual-terminal-887407/

Edição atual tal como às 10h37min de 25 de junho de 2021

Deve-se editar o arquivo org.freedesktop.consolekit.policy

vim /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy

Em seguida, modificar o arquivo do seguinte modo:.

<?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>

  <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>yes</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>yes</allow_active>
    </defaults>
  </action>

</policyconfig>

Fonte: http://www.linuxquestions.org/questions/debian-26/cannot-restart-shutdown-if-logged-in-another-virtual-terminal-887407/