Page 2 of 2

sudoers.d Not Working

Posted: 02 Sep 2018, 02:25
by johnywhy
brokenman wrote:
02 Sep 2018, 01:31
use the keyboard to change brightness.
i don't seem to have that option. My laptop has a brightness key with only 3 positions: too bright, too bright,and too dim. Not sure if that key does anything in Porteus, will try.

sudoers.d Not Working

Posted: 02 Sep 2018, 11:01
by brokenman
Ok. Use the above command as root to change the file permissions then save the file into your rootcopy folder to overwrite all other layers.

Code: Select all

cp -a --parents /sys/class/backlight/intel_backlight/max_brightness /mnt/sdXy/porteus/rootcopy
After that guest should be able to write to the file without needing sudo.

sudoers.d Not Working

Posted: 02 Sep 2018, 11:23
by ncmprhnsbl
looked into this a bit further:
your /etc/sudoers.d/brightness should work if you use this command:

Code: Select all

$ echo 9000000 | sudo tee /sys/class/backlight/intel_backlight/brightness
from here: https://www.linuxquestions.org/question ... ost5720420
my test:

Code: Select all

# visudo -f /etc/sudoers.d/test
ALL ALL=(ALL) NOPASSWD: /bin/tee /root/test
:x
$echo 100 | sudo tee /root/test
100
#cat /root/test
100

sudoers.d Not Working

Posted: 02 Sep 2018, 18:01
by johnywhy
thx brokenman and ncmprhnsbl! i will try these as soon as i can get back into Porteus Slim alternative? (Post by johnywhy #66308)

sudoers.d Not Working

Posted: 03 Sep 2018, 09:26
by johnywhy
i noticed i can run the power applet without running the power manager.
so i get brightness slider, just for the price of running the panel applet.
not bad!

sudoers.d Not Working

Posted: 06 Sep 2018, 03:34
by johnywhy
brokenman wrote:
02 Sep 2018, 01:31
change the file permissions if you want guest to write to it.

Code: Select all

chmod 666 /sys/class/backlight/intel_backlight/brightness
Great! That worked. tho it would be cool to solve the sudoers issue.

Ed, here's a brightness slider i made that doesn't depend on any background services like Power Manager. Works for me on Porteus 32-bit desktop.
Image

http://murga-linux.com/puppy/viewtopic.php?t=114229

It needs yad, which you can download and convert from here.
http://archive.ubuntu.com/ubuntu/pool/universe/y/yad/

And the user needs write-permission on the brightness file.

Code: Select all

chmod 666 /sys/class/backlight/intel_backlight/brightness
cheers!

sudoers.d Not Working

Posted: 06 Sep 2018, 04:12
by Ed_P
Interesting. And thanks. :)

You can get yad from Porteus's USM.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# usm -i yad

 The following items were found.
 Choose an number to confirm. 
 ctrl+c to quit

1) yad-0.40.0-x86_64-1_slonly.txz
2) phpmyadmin-4.8.2-noarch-1_slonly.txz
3) yadifa-2.2.4-x86_64-1_slonly.txz
#? 
But why can't the user use the keyboard's Alt+F12 or Alt+F11 to raise or lower the brightness of their screen? :%)

sudoers.d Not Working

Posted: 06 Sep 2018, 04:50
by johnywhy
ALT-F11 and ALT-F12 seem to affect my Porteus panel and windows. Seems to set z-order or focus or something.

I found yad in the USM. But before downloading, i updated all the repos. Now it no longer comes up in USM search! And i'm getting:

Code: Select all

root@porteus:/home/guest# usm -i yad
find: `/tmp/xdg-runtime-guest/gvfs': Permission denied
 Nothing found for:  yad
Hrm....

sudoers.d Not Working

Posted: 06 Sep 2018, 06:00
by Ed_P
:%)

I don't have that problem.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# usm -u all
slackware was updated 31 seconds ago. Skipping.
 Starting slackwarepatches database update 
Downloading: vercheck.txt  DONE
Downloading: CHECKSUMS.md5  DONE
Downloading: MANIFEST.bz2  DONE
Downloading: PACKAGES.TXT  DONE
Downloading: LIBS.TXT.gz  DONE
File verification was good.
Optimizing manifest
 slackwarepatches  database updated. 

 Starting slacky database update 
Downloading: CHECKSUMS.md5.gz  DONE
Downloading: MANIFEST.bz2  DONE
Downloading: PACKAGES.TXT.gz  DONE
Downloading: LIBS.TXT.gz  DONE
File verification was good.
Optimizing manifest
 slacky  database updated. 

 Starting salix database update 
Downloading: CHECKSUMS.md5  DONE
Downloading: PACKAGES.TXT  DONE
Downloading: LIBS.TXT.gz  DONE
Downloading: OPTIFEST.gz  DONE
 salix  database updated. 

 Starting alien database update 
Downloading: CHECKSUMS.md5.gz  DONE
Downloading: MANIFEST.bz2  DONE
Downloading: PACKAGES.TXT.gz  DONE
Downloading: LIBS.TXT.gz  DONE
File verification was good.
Optimizing manifest
 alien  database updated. 

 Starting ponce database update 
Downloading: CHECKSUMS.md5.gz  DONE
Downloading: MANIFEST.bz2  DONE
Downloading: PACKAGES.TXT.gz  DONE
Downloading: LIBS.TXT.gz  DONE
Optimizing manifest
 ponce  database updated. 

 Starting slackonly database update 
Downloading: CHECKSUMS.md5.gz  DONE
Downloading: MANIFEST.bz2  DONE
Downloading: PACKAGES.TXT.gz  DONE
Downloading: LIBS.TXT.gz  DONE
File verification was good.
Optimizing manifest
 slackonly  database updated. 

 Starting sbo database update 
SLACKBUILDS.TXT.gz
Downloading: SLACKBUILDS.TXT.gz  DONE
 sbo  database updated. 


Downloading: extra-deps.txt  DONE
Downloading: ignore-deps.txt  DONE

root@porteus:/home/guest# usm -i yad

 The following items were found.
 Choose an number to confirm. 
 ctrl+c to quit

1) yad-0.40.0-x86_64-1_slonly.txz
2) phpmyadmin-4.8.2-noarch-1_slonly.txz
3) yadifa-2.2.4-x86_64-1_slonly.txz
#? 1

Package:  yad-0.40.0-x86_64-1_slonly.txz  (168 K) [not installed]
yad: yad (displays graphical dialogs from shell scripts or command line)
yad:
yad: Yad (yet another dialog) is a fork of Zenity with many improvements,
yad: including custom buttons, additional dialogs and a pop-up menu in
yad: the notification area.
yad:
yad: There were two main reasons for this fork.  The first was to remove
yad: dependencies on deprecated libraries like libglade and gnome-canvas.
yad: The second was the slow pace of Zenity development including many
yad: unimplemented enhancement suggestions in the GNOME Bugzilla.
yad:

root@porteus:/home/guest#