[9fans] setting up a differnet keyboard - Plan9

This is a discussion on [9fans] setting up a differnet keyboard - Plan9 ; Hi, I want to setup my new plan9 termnial with a UK keyboard. I found kbmap but this appears to be an interactive program. Even if you do kbmap /sys/lib/kbmap/uk it still acts in an interactive manner. Is this right? ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: [9fans] setting up a differnet keyboard

  1. [9fans] setting up a differnet keyboard

    Hi,

    I want to setup my new plan9 termnial with a UK keyboard. I found kbmap
    but this appears to be an interactive program. Even if you do

    kbmap /sys/lib/kbmap/uk

    it still acts in an interactive manner. Is this right?

    A qick glance at the code reveals that

    cp /sys/lib/kbmap/uk /dev/kbmap (put into my
    lib/profile)

    should work too, and it does. But is this the 'correct' way to do it?
    I just want my keyboard to be the right one when when my terminal
    windows start.


    TIA

    Bob


  2. Re: [9fans] setting up a differnet keyboard

    IIRC, putting kbmap=uk
    in plan9.ini should work.


    On Tue, Jul 15, 2008 at 9:47 PM, Robert Hibberdine
    wrote:
    > Hi,
    >
    > I want to setup my new plan9 termnial with a UK keyboard. I found kbmap but
    > this appears to be an interactive program. Even if you do
    >
    > kbmap /sys/lib/kbmap/uk
    >
    > it still acts in an interactive manner. Is this right?
    >
    > A qick glance at the code reveals that
    > cp /sys/lib/kbmap/uk /dev/kbmap (put into my lib/profile)
    >
    > should work too, and it does. But is this the 'correct' way to do it? I
    > just want my keyboard to be the right one when when my terminal windows
    > start.
    >
    >
    > TIA
    >
    > Bob
    >
    >



  3. Re: [9fans] setting up a differnet keyboard

    Thanks for reply.

    putting kbmap=uk into plan9.ini
    gives a message

    boot: can't open kbd map: 'uk' file does not exist.

    So I tried kbmap=/sys/lib//kbmap/uk in plan9.ini This didn't work
    either. I got the message

    boot: can't open kbd map: 'sys' file does not exist.

    Not sure what the next step is, so any help is much appreciated

    Bob



    Francisco J Ballesteros wrote:
    > IIRC, putting kbmap=uk
    > in plan9.ini should work.
    >
    >
    > On Tue, Jul 15, 2008 at 9:47 PM, Robert Hibberdine
    > wrote:
    >
    >> Hi,
    >>
    >> I want to setup my new plan9 termnial with a UK keyboard. I found kbmap but
    >> this appears to be an interactive program. Even if you do
    >>
    >> kbmap /sys/lib/kbmap/uk
    >>
    >> it still acts in an interactive manner. Is this right?
    >>
    >> A qick glance at the code reveals that
    >> cp /sys/lib/kbmap/uk /dev/kbmap (put into my lib/profile)
    >>
    >> should work too, and it does. But is this the 'correct' way to do it? I
    >> just want my keyboard to be the right one when when my terminal windows
    >> start.
    >>
    >>
    >> TIA
    >>
    >> Bob
    >>
    >>
    >>

    >
    >
    >




  4. Re: [9fans] setting up a differnet keyboard

    9fat:
    cp /sys/lib/kbmap/uk /n/9fat

    try again with kbmap=uk and reboot.

    On Jul 16, 2008, at 4:46 PM, Robert Hibberdine wrote:

    > Thanks for reply.
    >
    > putting kbmap=uk into plan9.ini
    > gives a message
    >
    > boot: can't open kbd map: 'uk' file does not exist.
    >
    > So I tried kbmap=/sys/lib//kbmap/uk in plan9.ini This didn't
    > work either. I got the message
    >
    > boot: can't open kbd map: 'sys' file does not exist.
    >
    > Not sure what the next step is, so any help is much appreciated
    >
    > Bob
    >
    >
    >
    > Francisco J Ballesteros wrote:
    >> IIRC, putting kbmap=uk
    >> in plan9.ini should work.
    >>
    >>
    >> On Tue, Jul 15, 2008 at 9:47 PM, Robert Hibberdine
    >> wrote:
    >>
    >>> Hi,
    >>>
    >>> I want to setup my new plan9 termnial with a UK keyboard. I found
    >>> kbmap but
    >>> this appears to be an interactive program. Even if you do
    >>>
    >>> kbmap /sys/lib/kbmap/uk
    >>>
    >>> it still acts in an interactive manner. Is this right?
    >>>
    >>> A qick glance at the code reveals that
    >>> cp /sys/lib/kbmap/uk /dev/kbmap (put into my lib/
    >>> profile)
    >>>
    >>> should work too, and it does. But is this the 'correct' way to
    >>> do it? I
    >>> just want my keyboard to be the right one when when my terminal
    >>> windows
    >>> start.
    >>>
    >>>
    >>> TIA
    >>>
    >>> Bob
    >>>
    >>>
    >>>

    >>
    >>
    >>

    >
    >




  5. Re: [9fans] setting up a differnet keyboard

    I think you need to add the map to the kernel, as a root file so that
    boot could find it before reaching the file server.


    On Wed, Jul 16, 2008 at 10:46 PM, Robert Hibberdine
    wrote:
    > Thanks for reply.
    >
    > putting kbmap=uk into plan9.ini
    > gives a message
    >
    > boot: can't open kbd map: 'uk' file does not exist.
    >
    > So I tried kbmap=/sys/lib//kbmap/uk in plan9.ini This didn't work
    > either. I got the message
    >
    > boot: can't open kbd map: 'sys' file does not exist.
    >
    > Not sure what the next step is, so any help is much appreciated
    >
    > Bob
    >
    >
    >
    > Francisco J Ballesteros wrote:
    >>
    >> IIRC, putting kbmap=uk
    >> in plan9.ini should work.
    >>
    >>
    >> On Tue, Jul 15, 2008 at 9:47 PM, Robert Hibberdine
    >> wrote:
    >>
    >>>
    >>> Hi,
    >>>
    >>> I want to setup my new plan9 termnial with a UK keyboard. I found kbmap
    >>> but
    >>> this appears to be an interactive program. Even if you do
    >>>
    >>> kbmap /sys/lib/kbmap/uk
    >>>
    >>> it still acts in an interactive manner. Is this right?
    >>>
    >>> A qick glance at the code reveals that
    >>> cp /sys/lib/kbmap/uk /dev/kbmap (put into my
    >>> lib/profile)
    >>>
    >>> should work too, and it does. But is this the 'correct' way to do it?
    >>> I
    >>> just want my keyboard to be the right one when when my terminal windows
    >>> start.
    >>>
    >>>
    >>> TIA
    >>>
    >>> Bob
    >>>
    >>>
    >>>

    >>
    >>
    >>

    >
    >
    >



  6. Re: [9fans] setting up a differnet keyboard

    Pietro Gagliardi wrote:
    > 9fat:
    > cp /sys/lib/kbmap/uk /n/9fat
    >
    > try again with kbmap=uk and reboot.
    >

    Yes, I tried that but it didn't work either. This probably because it's
    boot not 9load that's running at this point..

    Francisco J Ballesteros wrote:
    > I think you need to add the map to the kernel, as a root file so that
    > boot could find it before reaching the file server.
    >

    In which case, this doesn't seem to be a very practical mechanism.
    Wouldn't it be beter to attach to the server and then do the kbmap()
    stuff ??


    A related question:
    cp /sys/lib/kbmap/uk /dev/kbmap
    in my lib/profile changes the keyboard, but when put it into
    /bin/termrc (at the end) it doesn't do anything. Can anyone tell me why....

    Many thanks

    Bob


  7. Re: [9fans] setting up a differnet keyboard

    >> I think you need to add the map to the kernel, as a root file so that
    >> boot could find it before reaching the file server.
    >>

    >
    > In which case, this doesn't seem to be a very practical mechanism. Wouldn't
    > it be beter to attach to the server and then do the kbmap() stuff ??


    not when you need to type your password at the console and that
    password contains non-ascii characters. I believe this is the original
    reason kbmap() was added in the boot code (by Francisco Ballesteros,
    if my memory is correct).


  8. Re: [9fans] setting up a differnet keyboard

    > In which case, this doesn't seem to be a very practical mechanism.
    > Wouldn't it be beter to attach to the server and then do the kbmap()
    > stuff ??


    that's a good chicken-and-egg question. at the stage of boot
    where kbmap is run, factotum has not been run and there is no
    fileserver. the advantage to doing the mapping here is that
    passwords can be entered normally. the disadvantage is that
    you can't get the file from the fileserver --- you can't authenticate
    to it.

    if you wait until you have auth set up, you could use files from
    the fs, but you'd have one convention for entering passwords
    and another for entering everything else. (assuming all the
    chars in your password are typable with your keyboard and
    the standard layout interpretation.)

    so the only solution is to build the kbmap into the kernel.

    i'm not going to try this, so i might mess a few details up,
    but this is close to what you want to do.

    1. use "kbmap=/boot/uk"

    2. edit your terminal configuration. generally this is /sys/src/9/pc/pc.
    in the bootdir section add "/sys/lib/kbmap/uk"

    3. make your kernel "mk 'CONF=pc' install"

    4. copy /386/9pc to wherever you boot from. if you're
    changing the name of your kernel, then be sure to edit
    your plan9.ini, too.

    5. reboot. after booting, you can verify that you've got
    it right by
    mount /srv/boot /n/boot
    lc /boot
    you should see a file named "uk" in /boot. (and your
    keyboard should work correctly.)

    - erik



  9. Re: [9fans] setting up a differnet keyboard

    andrey mirtchovski wrote:
    > not when you need to type your password at the console and that
    > password contains non-ascii characters. I believe this is the original
    > reason kbmap() was added in the boot code (by Francisco Ballesteros,
    > if my memory is correct).
    >

    Ahh yes..Good point. I confess to having a shamelessly terminal-centric
    view of Plan9 at the moment...

    Bob



  10. Re: [9fans] setting up a differnet keyboard

    Many thanks for this recipe.
    For the moment, though, I am going to stick with my
    cp /sys/lib/kbmap/uk /dev/kbmap in my profile

    Unless there is a good reason why I shouldn't....?

    Bob

    erik quanstrom wrote:
    >> In which case, this doesn't seem to be a very practical mechanism.
    >> Wouldn't it be beter to attach to the server and then do the kbmap()
    >> stuff ??
    >>

    >
    > that's a good chicken-and-egg question. at the stage of boot
    > where kbmap is run, factotum has not been run and there is no
    > fileserver. the advantage to doing the mapping here is that
    > passwords can be entered normally. the disadvantage is that
    > you can't get the file from the fileserver --- you can't authenticate
    > to it.
    >
    > if you wait until you have auth set up, you could use files from
    > the fs, but you'd have one convention for entering passwords
    > and another for entering everything else. (assuming all the
    > chars in your password are typable with your keyboard and
    > the standard layout interpretation.)
    >
    > so the only solution is to build the kbmap into the kernel.
    >
    > i'm not going to try this, so i might mess a few details up,
    > but this is close to what you want to do.
    >
    > 1. use "kbmap=/boot/uk"
    >
    > 2. edit your terminal configuration. generally this is /sys/src/9/pc/pc.
    > in the bootdir section add "/sys/lib/kbmap/uk"
    >
    > 3. make your kernel "mk 'CONF=pc' install"
    >
    > 4. copy /386/9pc to wherever you boot from. if you're
    > changing the name of your kernel, then be sure to edit
    > your plan9.ini, too.
    >
    > 5. reboot. after booting, you can verify that you've got
    > it right by
    > mount /srv/boot /n/boot
    > lc /boot
    > you should see a file named "uk" in /boot. (and your
    > keyboard should work correctly.)
    >
    > - erik
    >
    >
    >
    >




+ Reply to Thread