Find the answer to your Linux question:
Results 1 to 4 of 4
I'm using lxde on a netbook and it's working ok but it seems to have a bug concerning the keyboardmap. No matter what I do it will stick to the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    5

    startup script keyboardmap


    I'm using lxde on a netbook and it's working ok but it seems to have a bug concerning the keyboardmap. No matter what I do it will stick to the preconfigured keyboardmap es. I need en-intl and I already wrote a script which changes this quickly. But I'm tired of typing it in from the CLI and editing my .bashrc works but seems to be a crappy solution.
    I have been trying to set up a startup script following advice on the net and the man page (update-rc.d) but my system simply keeps ignoring the script. As I said it works if I call it from the CLI, it has the correct permission 755 and looks like this:

    Code:
    #!/bin/bash
    
    ### BEGIN INIT INFO
    # Provides:          keyboardscript 
    # Required-Start:    $remote_fs $syslog
    # Required-Stop:     $remote_fs $syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Start daemon at boot time
    # Description:       Enable service provided by daemon.
    ### END INIT INFO
    
    setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us -variant intl
    I called update-rc.d with defaults and it inserts the links as S03keyboardscript in rc2 to rc5 and as K01keyboardscript in rc0 rc1 and rc6. So everything seems to be fine but it shows no effect.
    I'm wondering if there is some other script loaded afterwards which changes the keymap to es again (don't know where it does this).
    I tried to manually place my script at the end (S09keyboardscript) in rc2 (in the default runlevel only) but again to no avail.
    What is the problem here?

  2. #2
    Linux User
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    345
    On my system (very old) it's in /etc/init.d/keytable and /etc/sysconfig/keyboard. And yeah, initially my system loads some default stuff to get through early boot, then loads the stuff I want later, just before coming to a rest. So I think you're probably loading your script to early and it's being overwritten.

    It would be better to hack the script that actually does your keyboard mapping instead of installing your own script. S03 seems way too early.

    It's a good opportunity to rifle through /etc and figure out the Debian boot process. I don't use Debian, so I cannot help you there.

    Peace and Cheer.

  3. #3
    Just Joined!
    Join Date
    Jan 2010
    Posts
    5
    Thanks for your reply, Miven.
    As I said before I tried putting my script at the end and it didn't work. I actually would like to alter the original script which sets my keyboard initially but I can't find the place where it does that. That's why I wrote my own.
    Anyway, I'd really like to know why my script is not recognized by the system.
    Any further suggestions anyone?

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    hey,

    maybe try searching thru /etc/ for files that call keyboard commands, whatever those might be, e.g.:

    Code:
    find /etc/ -type f -exec grep -Hi setxkbmap {} \;
    or more forgiving, but more false-positives:
    Code:
    find /etc/ -type f -exec grep -Hi *kb* {} \;
    NOTE: run the find as root, so that you have permissions to examine all the files, or you'll get a bunch of permission denied errors.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •