Skip to content

Control brightness on xubuntu when using i3wm and where xbacklight fails

Notifications You must be signed in to change notification settings

waalge/hacklight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hacklight

Control brightness on xubuntu when using i3wm and where xbacklight fails

Problem

After updating to xubuntu 18.04 I couldn't change brightness when using i3wm. These didn't seem to solve the problem.

Hack method

The brightness can be controlled by a file. For me this was /sys/class/backlight/intel_backlight/brightness.

The script hacklight just edits this file.

To use (with sudoers)

WARNING: Incorrect use of sudoers can be dangerous.

  1. Put hacklight in a path you OS will find it. (See here). Something like e.g /usr/sbin/hacklight

  2. Edit hacklight to point to brightness file by changing variable brightness_file (see default).

  3. Change the owner of this file to root e.g

sudo chown root:root /usr/sbin/hacklight
  1. Let the user run hacklight as root without password. To do this run sudo visudo, and append the line giving the correct permissions. See the sudoers file for an example, and also the man which has examples near the end.

  2. Add the contents of i3config to your i3 config file (likely found at .config/i3/config).

To use (without sudoers)

WARNING: On rebooting file owner of the brighness file seems to reset. For this reason it seems necessary to use sudoer to avoid having to use a password each time. If you don't reboot often, or don't care to use sudoers then...

  1. Change the owner of the brightness file to you e.g.
sudo chown ME brightness

where ME is you. Problem: On rebooting this seems to reset to root. You'd have to do this every time.

  1. Edit hacklight to change the value of the variable brightness_file to the appropriate path.

  2. Put hacklight in a path you OS will find it. (See here)

  3. Add the contents of i3config to your i3 config file (likely found at .config/i3/config). Remove sudo in front of each command.

About

Control brightness on xubuntu when using i3wm and where xbacklight fails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages