lunes, 27 de agosto de 2018

Graphical Shutdown/Reboot in OpenBox: pyshutdown

Pyshutdown 

A graphical interface to Shutdown/reboot. Useful if your favourite WM hasn't that functionality. (i.e. OpenBox). A very good guide to install/configure OpenBox: https://www.emezeta.com/articulos/openbox-personalizar-escritorio-linux


PyShutdown Git Repository

This project starts like a personal needed due I use OpenBox everyday. I had a little bash script to automatize shutdown/reboot but it was ugly and It can't be cancelled.

It uses Tk-inter to the graphical interface. The language is autodetected (only english (default), spanish and german) and it's easy add new translations due to the .po/.mo translations files.

English:

 German:

 Spanish:


Due to debugging needs there is a command line parameter (-l) to write a log in /var/tmp

Dependencies:

tk-inter
#apt-get install python-tk

User grants


User need to be enough privilegies to shutdown/reboot the machine:
Create a new group:
sudo groupadd power
Adding your user to the group power:
sudo usermod -a -G power yourusername
Allow members of group power to shutdown without a password:
sudo visudo

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL
# Allow members of group power to shutdown (or reboot) system
%power  ALL = NOPASSWD: /sbin/shutdown
It is necessary re-login to the changes take effect.


0 comentarios:

Publicar un comentario