No `rc.local` in 16.10, so how can I add a command to set brightness on boot?
Solution 1
The standard way to make permanent changes to access points (they are not really files) in /sys
is to use sysfsutils
rather than /etc/rc.local
. The package is not installed by default in 16.10, so first do:
sudo apt install sysfsutils
now edit the file /etc/sysfs.conf
, for example:
sudo nano /etc/sysfs.conf
and add this line to the end of it:
class/backlight/intel_backlight/brightness = X
This will do the same as your echo
command.
Solution 2
In case you didn't know, rc.local
is disabled by default in Ubuntu 16.10, because new versions of Ubuntu use systemd. Thus make rc.local
considered a service, but you can anytime turn on rc.local
with service command:
sudo systemctl enable rc-local.service
Now that rc.local
is enabled, you can use your old workaround, run following command to add desired brightness level to /etc/rc.local
:
sudo sed -i '13i echo X > /sys/class/backlight/intel_backlight/brightness ' /etc/rc.local
Related videos on Youtube
![Zanna](https://i.stack.imgur.com/poWMH.jpg?s=256&g=1)
Zanna
Updated on September 18, 2022Comments
-
Zanna almost 2 years
I previously solved the problem by adding a command:
echo X > /sys/class/backlight/intel_backlight/brightness
to
/etc/rc.local
on Ubuntu 14.04 . But there is no/etc/rc.local
on Ubuntu 16.10 . I don't know how to solve it now. Is there a new script that replacesrc.local
where I can enter my command?-
Liso over 7 yearsYou can actually enable
rc.local
again using service command
-
-
Zanna over 7 years@ImsJoe great! Glad you fixed it :)