Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: lubuntu/lxde keyboard layout switching?

  1. #1
    Join Date
    Jul 2006
    Beans
    21
    Distro
    Ubuntu Development Release

    lubuntu/lxde keyboard layout switching?

    I'm using lubuntu 10.04 beta 2. I've read wikis on xkb and various other topics related to switching keyboard layouts without the use of a dedicated applet (as lxde doesn't seem to yet have one) and really cannot figure out how to set up keyboard layout switching.

    I want to be able to switch keyboard layouts between English and German while holding down the CAPSLOCK key -- in other words, just for typing German characters such as , , , and . I don't want to switch completely to the German keyboard.

    The solution I'm using right now works and is somewhat inelegant: I installed xfce4-panel and xfce4-xkb-plugin, started xfce4-panel, added the keyboard layouts plugin, then removed everything BUT the keyboard layout plugin, set it to "normal width" and "auto-hide." So it just hangs out on the very margin of my screen and lets me switch keyboard layouts like I want to do.

    Is there an easier way to do this natively without using the xfce4 panel? Granted, it's not like a little xfce4 applet takes up a lot of memory.

  2. #2
    Join Date
    Aug 2006
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: lubuntu/lxde keyboard layout switching?

    I've used lxde last summer, not Lubuntu though, and the following worked for switching layouts.
    http://ubuntuforums.org/showthread.php?t=1039107

    It's not quite what you want, but a short in the right direction.

  3. #3
    Join Date
    Jul 2006
    Beans
    21
    Distro
    Ubuntu Development Release

    Re: lubuntu/lxde keyboard layout switching?

    Quote Originally Posted by mikewhatever View Post
    I've used lxde last summer, not Lubuntu though, and the following worked for switching layouts.
    http://ubuntuforums.org/showthread.php?t=1039107

    It's not quite what you want, but a short in the right direction.
    Thanks... I'd seen that one, couldn't really figure out how to get there from here, if you know what I mean. I ended up just doing a minimal netboot install and installed a "minimal-enough" XFCE desktop for my purposes.

  4. #4
    Join Date
    Aug 2006
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: lubuntu/lxde keyboard layout switching?

    Quote Originally Posted by michael.conner View Post
    Thanks... I'd seen that one, couldn't really figure out how to get there from here, if you know what I mean. I ended up just doing a minimal netboot install and installed a "minimal-enough" XFCE desktop for my purposes.
    Should have PM`ed me for clarifications, anyway, hope you're enjoying xfce minimal.
    I've been testing Lubuntu-10.04 in a Virtual Box today, and there is still no straightforward way to switch keyboard layouts. Apparently, after issuing the following command switching English and Hebrew layouts worked:

    Code:
    setxkbmap -option grp:ctrl_shift_toggle "us,il"
    Just some notes:
    I used Ctrl_Shift and not Alt_Shift, because the latter was set too, and switched keyboard layouts on the host machine.
    The layout setting survived several virtual machine restarts.
    Found another way, but it didn't work.
    Last edited by mikewhatever; May 26th, 2012 at 03:17 PM.

  5. #5
    Join Date
    Jul 2008
    Location
    Lithuania
    Beans
    3
    Distro
    Ubuntu

    Re: lubuntu/lxde keyboard layout switching?

    Quote Originally Posted by mikewhatever View Post
    Should have PM`ed me for clarifications, anyway, hope you're enjoying xfce minimal.
    I've been testing Lubuntu-10.04 in a Virtual Box today, and there is still no straightforward way to switch keyboard layouts. Apparently, after issuing the following command switching English and Hebrew layouts worked:

    Code:
    setxkbmap -option grp:ctrl_shift_toggle us,il
    Just some notes:
    I used Ctrl_Shift and not Alt_Shift, because the latter was set to, and switched keyboard layouts on the host machine.
    The layout setting survived several virtual machine restarts.
    Found another way, but it didn't work.
    but this dont work after system restarting... Maybe is better way?

  6. #6
    Join Date
    Feb 2009
    Location
    USA
    Beans
    3,187

    Re: lubuntu/lxde keyboard layout switching?

    You can make that into a script that runs as a startup application. It is a bit more involved in LXDE than say Gnome, but it can be done. Try finding documentation about startup applications under LXDE.

  7. #7
    Join Date
    Oct 2010
    Location
    Sweden
    Beans
    681
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: lubuntu/lxde keyboard layout switching?

    I use a really cool utility called Auto Key to paste in phrases I often use, like my email address or home address.
    The problem is that Auto Key doesn't recognize when I switch keyboard layouts using the panel applet. This results in the in my address, for example, being dropped.

    I need to use setxkbmap

    I can type setxkbmap us or setxkbmap se in a terminal window to change the layouts, but I'd realy like to have a hot key or launcher to do this. How can I set up a hot key or launcher to run the setxkbmap command?

    I know it involves a Bash file, but I'm lost as to the specifics.
    I'm running Gnome in Ubuntu 10.10

    I also noticed that if I just use setxkbmp us all the characters above the number keys (! @ etc) stop working. Any ideas on what I need to change so that these work?



    I'd appreciate any help.
    Thank you,
    GG -----------
    GUI we don't need no stinking GUI: A collection of Bash scripts
    Mutt (email), cmus (music),Google Calendar and Google Tasks cli

  8. #8
    Join Date
    Apr 2009
    Beans
    204

    Re: lubuntu/lxde keyboard layout switching?

    To add a keyboard layout using LXDE (change "jp" for your default, and "ch(fr)" for your second layout):

    Code:
    setxkbmap -layout "jp,ch(fr)" -option "grp:alt_shift_toggle"
    Copy the command at the end of your /home/user/.bashrc file. The file is hidden by default. (see sample below)

    Code:
    # .bashrc
    
    # Source global definitions
    if [ -f /etc/bashrc ]; then
        . /etc/bashrc
    fi
    
    # User specific aliases and functions
    
    setxkbmap -layout "jp,ch(fr)" -option "grp:alt_shift_toggle"
    Log-out/in.

  9. #9
    Join Date
    Oct 2009
    Location
    Reykjavk, sland
    Beans
    9,623
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: lubuntu/lxde keyboard layout switching?

    Thanks Nomnex, it works fine.

    The method extends to more than two languages:

    Code:
    setxkbmap -layout "dk,is,fr" -option "grp:alt_shift_toggle"
    About problems due to upgrading
    Bringing old hardware back to life.
    Please visit Quick Links -> Unanswered Posts

  10. #10
    Join Date
    Apr 2010
    Location
    Lutsk, Ukraine
    Beans
    6
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: lubuntu/lxde keyboard layout switching?

    open file /etc/default/keyboard and add necessary options:

    Code:
    XKBMODEL="pc105"
    XKBLAYOUT="us,ua,ru"
    XKBVARIANT=","
    XKBOPTIONS="grp:ctrl_shift_toggle,grp_led:scroll"
    than restart X session

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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