PDA

View Full Version : Solution: Scroll Lock in Fedora!



netwinder
19th September 2015, 08:03 PM
Hello Fedorafourm,

A small issue I found upon installation of Fedora 22 was, the scroll lock key dosent work!

For some this is no issue, however my keyboard's back light is controlled via the scroll lock key, and in order to type in the dark the scroll lock key is absolutely essential.

I found various solutions online, and some worked. The only catch was having to enter a command upon login, and every login. That i am much too lazy for. The other type of solution involved making a shell script to be executed on login, or boot.

I found that in order to make it work, you would have to execute a command in a init type script. However the init script would have to be related to the start up of your GUI (in this case Gnome).

So in order to edit the init file for your GUI, substituting vi with the text editor of your choice (nano, gedit, etc)


sudo vi /etc/X11/xinit/xinitrc.d/localuser.sh

You should now be in a file that looks like this


#!/bin/sh
# Copyright (C) 2006 Red Hat, Inc. All rights reserved. This
# copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the
# GNU General Public License version 2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
[ -x /usr/bin/xhost ] && [ -x /usr/bin/id ] &&
xhost +si:localuser:`id -un` >& /dev/null

If you want your scroll lock to be permanently enabled, then at the end of the file add the line:


# Permanently enables scroll lock
xset led named "Scroll Lock"



and then save the file and reboot! The login screen wont have the functionality of the scroll lock key but once you login scroll lock should be working :)

jpollard
19th September 2015, 09:10 PM
Reboot shouldn't have been necessary.

Just logout and login again.

You could also just run the script...

diedburn
17th February 2017, 01:17 AM
Hey got this problem again in Fedora 25 anyone knows how to fix it ?upper stuff doesn't even blink the scroll lock led on my system.;c