Logitech K400r and the missing middle mouse button

Recently I bought me a new wireless keyboard. Reason was the advice of my physiotherapist to improve my sitting posture at work, so she told me to place the monitor in eye level and the keyboard and mouse near the edge of the desk. But this is not really easy with a notebook. Therefore I searched for a lightweight keyboard with an integrated touchpad: Logitech K400r won the selection.
The keyboard is small so I need to getting used to it but it worked out of the box even on my new installed linux arch distribution. Only one thing was annoying: the missing middle mouse button. I need this little helper so much on a linux system, think only about the handy copy&paste function …

After asking google for help I was a little bit disappointed, because “neojam” [1] wasn’t able to activate/find a way to use the middle mouse button. But I was willing to find a way.

First of all I thought about the possibility to map keys with xmodmap. So I started xev to realize the proper code for the middle mouse button. This approach led to nowhere, because clicking both mouse buttons on my laptop was indicated as “button2″ but not on the K400r, there I got only “button1″ and “button3″. So I searched for a possibility to map the simultanouse clicking of both buttons. I found the hint to use the “Emulate3Buttons”-Option in the xorg.conf. The default set of this configuration is disabled, but I didn’t want to enable it for the generic mouse InputDevice. This site [2] helped me to remember the “MatchProduct”-Option for special configuration of InputClasses in the xorg.conf. With the xinput list command I got this output:

$ xinput list
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                  id=10    [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                       id=11    [slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless PID:4024    id=13    [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
    ↳ Power Button                                id=6    [slave  keyboard (3)]
    ↳ Video Bus                                   id=7    [slave  keyboard (3)]
    ↳ Sleep Button                                id=8    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=9    [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                      id=12    [slave  keyboard (3)]

So I only had to add this stuff to my xorg.conf:

Section "InputClass"
    Identifier      "Logitech K400r"
    MatchProduct    "Logitech Unifying Device. Wireless PID:4024"
    Option          "Emulate3Buttons" "yes"
EndSection

And finally my precious middle mouse button worked also on my new keyboard 8-)

[1] http://forums.logitech.com/t5/Keyboards-and-Keyboard-Mice/Disappointed-with-my-new-K400r-keyboard/td-p/948530
[2] https://wiki.archlinux.org/index.php/Xorg

splash screen with plymouth on xubuntu 12.10

there were some troubles configuring the splash screen. here is a possible solution based on the listed links below:

vim /etc/default/grub
>>
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_GFXMODE=1280x1024
GRUB_GFXPAYLOAD_LINUX="1280x1024"

grub-update

vim /etc/initramfs-tools/conf.d/splash
>>
FRAMEBUFFER=y

update-alternatives --config default.plymouth
update-initramfs -u

http://ubuntuforums.org/archive/index.php/t-2066656.html
http://askubuntu.com/questions/202764/plymouth-not-showing-after-upgrading-to-ubuntu-12-10
http://askubuntu.com/questions/98022/startup-shutting-down-screen-showing-xubuntus-bootsplash-and-not-ubuntus

awn taskmanager shows an ugly, useless green plus sign

after installing xubuntu 12.10 alpha on my notebook, awn (avant-window-navigator) wasn’t the same again even though i dropped my .gconf directory to new installed user drive. the reason was the new config directory of awn ~/.config/desktop-agnostic.

so i found the solution at the bug report #990774:

apt-get build-dep avant-window-navigator
apt-get -b source avant-window-navigator
sudo dpkg -i *.deb

hope it works for you too!

simple c++ client/server encryption corba example

hey folks,

my students are running crazy :mrgreen:
they have to understand corba, based on this great example [1]. but they fail on using orbacus [2] and/or omniorb. so i have to help them.

first of all i want to make one thing clear: i don’t want to implement this stuff on windows. two years ago i made it, and that should be enough. it is much easier to implement and make it work under linux than with windows! so keep it simple stupid! i’ll now explain the installation of orbacus, because omniorb is out of the box: apt-get install omniorb

download orbacus for both languages (there will be an additional task: write a java client/server and let them intercommunicate). i don’t know why, but use the zip file instead of the tar.gz – there were some missing header files … unzip it to the desired location (i used $HOME/bin/orbacus_cpp) and the game can begin!

  1. change to the path and run the pre-configuration script: ./runconfig
  2. pick up the corresponding answers to the questions (e.g. b->bash; 5->GCC 3.4.x/4.1.x/4.3.x; yes; no; yes; [ ]; [ ]; [ ]; [ ]; /home/mike/bin/orbacus_cpp)
  3. then start the config script with: . ./go
  4. after everything went fine, fire up the compilation process with make and head for a coffee …
  5. finish the installation with make install as superuser
  6. now edit your $HOME/.bashrc file (the LD_LIBRARY_PATH is for the binaries of orbacus, e.g. the idl compiler):
    if [ -d "$HOME/bin/orbacus_cpp" ] ; then export PATH=”$PATH:$HOME/bin/orbacus_cpp/bin” && export LD_LIBRARY_PATH=”$LD_LIBRARY_PATH:$HOME/bin/orbacus_cpp/lib” ; fi
  7. it is possible to add the “LIBRARY_PATH” also to the bashrc, but we will check this in the Makefile! now we have to download the sourcecode of Carlos …
  8. use this makefile to successfully compile the code! for omniorb you have to change the -I and -L arguments ;)

after compiling the code you can adopt the */ini*.bat files for running the example! et voila …

wish you happy coding!

[1] A Simple C++ Client/Server in CORBA, Carlos Jiménez de Parga, Sep 2009, Online: http://www.codeproject.com/Articles/24863/A-Simple-C-Client-Server-in-CORBA;
[2] Orbacus, Progress Software, Online: http://www.progress.com/en/orbacus/orbacus_index.html;

administer windows servers

hey folks,

i know, something went terribly wrong, but at the moment i have to administer a couple of windows servers. first of all i needed access to the windows network over vpn and then use a rdp client software. vpn was quite easy to configure:

  • pptp
  • vpn addresses only with the proper dns and domain
  • user name with DOMAIN\user
  • advanced settings: “use point-to-point encryption”

afterwards it was a little bit tricky to get a remotedesktop client which was able to connect to the servers without changing their security level. the newest version of freeRDP [1] was the winner, which is providing the nla-security protocol. it was necessary to compile the current version, but it worked out of the box with this description [2].

the next hurdle will be to install a new exchange instance … please keep your fingers crossed!

[1] http://www.freerdp.com/
[2] https://github.com/FreeRDP/FreeRDP/wiki/Compilation