Results 1 to 9 of 9

Thread: Ubuntu 11.x, Trendnet KVM and numlockx

  1. #1
    Join Date
    Oct 2011
    Beans
    4

    Question Ubuntu 11.x, Trendnet KVM and numlockx

    There's been a long standing issue with Ubuntu 11.x, Trendnet KVM switches and using Numlock key no longer works in toggling the KVM switch.

    I did read about the workaround to switch to the console, and then you could use the standard keyboard shortcuts to toggle the KVM switch (See: http://beitis.net/ubuntu-kvm-switches-and-scroll-lock/), but this solution takes too long back and forth.

    I then found if you installed numlockx
    Code:
    sudo apt-get install numlockx
    I can then setup a bash script shortcut on my desktop that executes the command to toggle the KVM:
    Code:
    #!/bin/bash
    numlockx off; sleep 1;  numlockx on; sleep 1; numlockx off
    Is it possible to map the numlock key on my keyboard to a numlockx command so I can just use the keyboard instead of the shortcut command? I've googled around for a bit and couldn't find a solution.

  2. #2
    Join Date
    Oct 2011
    Beans
    4

    Lightbulb Re: Ubuntu 11.x, Trendnet KVM and numlockx

    I've figured out a solution, in case anyone is interested:

    1. Install numlockx
    Code:
    sudo apt-get install numlockx
    2. Create a script on desktop (KVM.sh)
    Code:
    #!/bin/bash
    numlockx on;
    sleep 1; 
    numlockx off;
    sleep 1; 
    numlockx on
    3. Create a custom keyboard shortcut to point to KVM.sh script (I used the key <SUPER>+K to execute this script)

  3. #3
    Join Date
    Apr 2007
    Location
    Eastern USA
    Beans
    416
    Distro
    Ubuntu

    Re: Ubuntu 11.x, Trendnet KVM and numlockx

    Thank you!

    Can you mark this as solved?


    I also invite you to provide this solution for others at askubuntu.com (since that's the first search result):
    http://askubuntu.com/questions/67769...o-longer-works

  4. #4
    Join Date
    Mar 2012
    Beans
    2

    Re: Ubuntu 11.x, Trendnet KVM and numlockx

    Could you please write in more details how to create a keyboard shortcut to point to the script?

  5. #5
    Join Date
    Apr 2007
    Location
    Eastern USA
    Beans
    416
    Distro
    Ubuntu

    Re: Ubuntu 11.x, Trendnet KVM and numlockx

    - Write the script with gedit. Save.
    - Right click on the file, and go to properties. Change to the permissions tab, and check Execute for at least "Owner".
    - Open up Keyboard Shortcuts (in unity search for keyboard, and choose "keyboard" not "Keyboard layout", I'm unsure the method without unity)
    - Go to the shortcuts tab. choose "Custom Shortcuts"
    - click the "+" button. choose a name, and find the path to the file (you can get the path from the file properties)
    - Now that the command is "installed", set a keyboard shortcut


    Was that detailed enough?

  6. #6
    Join Date
    Mar 2012
    Beans
    2

    Re: Ubuntu 11.x, Trendnet KVM and numlockx

    Thank you very much for the explanation. I tried the solution and got the NumLock blinking when hit the shortcut, but this didn't make kvm to switch..(Ubuntu 11.04 64bit Classic desktop). Trendnet TK214i
    The following script works fine for me:
    #!/bin/bash
    xset -led named "Scroll Lock";
    sleep 1;
    xset led named "Scroll Lock";
    sleep 1;
    xset -led named "Scroll Lock"
    Last edited by blackcatt; March 26th, 2012 at 05:30 PM.

  7. #7
    Join Date
    Dec 2011
    Beans
    2

    Re: Ubuntu 11.x, Trendnet KVM and numlockx

    Quote Originally Posted by cong06 View Post
    - Write the script with gedit. Save.
    - Right click on the file, and go to properties. Change to the permissions tab, and check Execute for at least "Owner".
    - Open up Keyboard Shortcuts (in unity search for keyboard, and choose "keyboard" not "Keyboard layout", I'm unsure the method without unity)
    - Go to the shortcuts tab. choose "Custom Shortcuts"
    - click the "+" button. choose a name, and find the path to the file (you can get the path from the file properties)
    - Now that the command is "installed", set a keyboard shortcut


    Was that detailed enough?
    Running kubuntu and this worked great for me.
    Searched keyboard, opened custom shortcuts and then just followed the instructions.

    Thanks

  8. #8
    Join Date
    Feb 2007
    Beans
    11

    Re: Ubuntu 11.x, Trendnet KVM and numlockx

    Just fyi..

    I am using Rosewill RKV-2U switch between WinXP & ArchBang.

    tleish's solution (comment # 2), worked perfectly for me.

    P.S. sorry if this comment on an old thread causes unwanted notification for someone, but I thought it might be helpful for anybody who lands here via google.

  9. #9
    Join Date
    Dec 2011
    Beans
    2

    Re: Ubuntu 11.x, Trendnet KVM and numlockx

    Quote Originally Posted by kysdaddy View Post
    Running kubuntu and this worked great for me.
    Searched keyboard, opened custom shortcuts and then just followed the instructions.

    Thanks

    OK I just moved to Ubuntu 12.10 (clean install) so I had to do this again, this time I had to use /system settings/keyboard/shortcuts/custom shortcuts and xbindkeys config to get it working.

    I created the shortcut in keyboard and then got it working with xbindkeys.

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
  •