I need to stop the cursor from blinking on an external screen of my raspberry-pi in order to display a home-made interface on /dev/fb0
.
For this purpose I created a group cursor_blink
in which I put my user and changed the permissions of the file /sys/class/graphics/fbcon/cursor_blink
as follow:
chown root:cursor_blink /sys/class/graphics/fbcon/cursor_blink
chmod 664 /sys/class/graphics/fbcon/cursor_blink
So my user in the group cursor_blink
can write 1
or 0
to display and hide the cursor from the screen.
I had this working, but reinstalling it on another system makes that this file is now reset to the default permissions every time I reboot, the mode becomes again 600
and the owner root:root
after reboot instead of 660
and root:cursor_blink
It seems that the file is recreated (some digging in the last edit times with stat
corroborate this element).
Is there a way to keep the permissions as set, and prevent them of being reset ?
For the moment the solution I found is to add a crontab
task to correct the permissions at boot:
crontab -e
# ...
# add this line at the end of the file :
@reboot chown root:cursor_blink /sys/class/graphics/fbcon/cursor_blink && \
chmod 664 /sys/class/graphics/fbcon/cursor_blink
Prerequisite: The group cursor_blink
should be created and the user should be added to it before: usermod -a -G user cursor_blink
.
If you have a better solution, feel free to add.