Habilitando botões desligar e reiniciar no XFCE
Dica publicada em Linux / Introdução
Habilitando botões desligar e reiniciar no XFCE
Pesquisei muito para achar esta matéria e finalmente consegui encontrá-la. A matéria mostra como habilitar os botões de reiniciar e desligar do xfce.
É só editar o arquivo /etc/sudoers, adicionando o usuário e liberando pra ele a execução do xfsm-shutdown-helper, como diz o site do XFCE. Ou seja, foi só eu fazer isso:
Abrir o arquivo /etc/sudoers em um editor de texto, como root, e editá-lo:
Sim, foi só adicionar as linhas:
jonathas localhost=NOPASSWD:/usr/sbin/xfsm-shutdown-helper
jonathas localhost=NOPASSWD:/sbin/poweroff,/sbin/reboot,/sbin/halt
no arquivo /etc/sudoers, editando-o como root, claro.
Explicando:
$ sudo xfsm-shutdown-helper
Com isso, vai aparecer:
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.[sudo] password for jonathas:
XFSM_SUDO_DONE
Após isso, os botões de "Desligar" e "Reiniciar" passam a funcionar no XFCE.
Maiores informações aqui.
PS: Tirei a matéria de um blog de um usuário Linux que contém bastante conteúdo produtivo. Para conferir acesse:
Abraço a todos.
É só editar o arquivo /etc/sudoers, adicionando o usuário e liberando pra ele a execução do xfsm-shutdown-helper, como diz o site do XFCE. Ou seja, foi só eu fazer isso:
Abrir o arquivo /etc/sudoers em um editor de texto, como root, e editá-lo:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
# Host alias specification
# User alias specification
jonathas localhost=NOPASSWD:/usr/sbin/xfsm-shutdown-helper
jonathas localhost=NOPASSWD:/sbin/poweroff,/sbin/reboot,/sbin/halt
# Cmnd alias specification# User privilege specification
root ALL=(ALL) ALL
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
# Host alias specification
# User alias specification
jonathas localhost=NOPASSWD:/usr/sbin/xfsm-shutdown-helper
jonathas localhost=NOPASSWD:/sbin/poweroff,/sbin/reboot,/sbin/halt
# Cmnd alias specification# User privilege specification
root ALL=(ALL) ALL
Sim, foi só adicionar as linhas:
jonathas localhost=NOPASSWD:/usr/sbin/xfsm-shutdown-helper
jonathas localhost=NOPASSWD:/sbin/poweroff,/sbin/reboot,/sbin/halt
no arquivo /etc/sudoers, editando-o como root, claro.
Explicando:
- jonathas = nome do usuário;
- localhost = nome do host do usuário
(para descobrir o do seu PC, dê o comando "hostname -f" no terminal); - NOPASSWD = serve para ele não pedir a senha do root antes de desligar ou reiniciar.
$ sudo xfsm-shutdown-helper
Com isso, vai aparecer:
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.[sudo] password for jonathas:
XFSM_SUDO_DONE
Após isso, os botões de "Desligar" e "Reiniciar" passam a funcionar no XFCE.
Maiores informações aqui.
PS: Tirei a matéria de um blog de um usuário Linux que contém bastante conteúdo produtivo. Para conferir acesse:
Abraço a todos.