On 03/30/2014 01:14 PM, Anubhav Yadav wrote: > Hi I have created a script called i3exit that allows me to suspend or > hibernate my laptop without having to exit my i3wm thus allowing me to > save my work. > > Here are the contents of my script: [...] > This script is stored in home/neo1691/bin/ directory and the directory > is added in the PATH variable by adding 'export > PATH=${PATH}:/home/neo1691/bin' in my .~/.bashrc file > > I used sudo visudo to edit the /etc/sudoers file and added this line at the end: > neo1691 ALL=(ALL) ALL, NOPASSWD: /home/neo1691/bin/i3exit > > After a restart when I run 'i3exit suspend' from my terminal, I am > still asked for my password. > > To sum it up here are the problems that I want to solve: > 1) How can I run the script without asking for a password? > 2) Is exporting the PATH variable like I had did is the correct way to > add my directory to PATH, if I want the other processes to also access > the scripts in > that folder? > > Thanks! Have you already considered what I suggested in https://lists.debian.org/debian-user/2014/03/msg01409.html ? -- http://masysma.ohost.de/
Attachment:
signature.asc
Description: OpenPGP digital signature