Tag Archives: linux

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 😎

[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

a little bit paranoid

hey guys,

tomorrow my provider will shutdown my old server. enough reason for me to wipe clean my sensitive data. but how? i was looking around and found some possible solutions [1,2]:

  1. srm – securely remove files or directories
  2. wipe – securely erase files from magnetic media
  3. shred – overwrite a file to hide its contents, and optionally delete it

i’ve decided to use shred. the next thing i have to look after was my ext3 mount option. my luck – it was the default value: “data=ordered”, so shred would work properly! unfortunately shred isn’t able to remove directories, so it was necessary to tweak a little bit. here is the final command [3]:

find -type f -execdir shred -ufzv -n8 {} +

and if you want to remove the current directory and show the others, here we are:

find -type f -execdir shred -ufzv -n8 {} + && rm -rf `pwd` && cd .. && ls -l | grep ^d

hopefully the “bad” guys at my provider won’t get my files now :roll:

[1] Linux : How to delete file securely
[2] Free Secure File and Disk Deletion Utilities
[3] How to shred entire directory (tree)

offline prezi in linux

hey guys,

school is starting and i’m again in the class room. so, we all know how good the internet works if you really need it. therefore i need my prezis offline, but i’m not in the mood to startup every time my virtual machine when presenting a offline prezi (only mac and win is supported). after searching for some seconds in the world wide web i found this very cool information!

here is a short description of the necessary steps:

  • copy the data folder to a wished destination (e.g. ./prezis/topic)
  • copy prezi.app/Contents/Resources/movie.swf to this destination
  • add parent directory as a trust worthy location through the flash settings-manager (here)
  • open the movie.swf file in your flashplayer-capable browser

et voila!

thank you very much, pavol rusnak!

merge a lot of pdfs

hey folks!

i’ve had a problem … a lot of pdfs! and i wasn’t really amazed about using a2ps (wanted multiple pages on one sheet), because of not proper configuration. so i’ve searched for another solution to merge my 60 pdf documents. here i found the solution in one ingenious command:

gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf *.pdf

so long and thanks for all the fish 😉

vmware-tools under ubuntu 9.04

hi folks!

i’ve had a problem with java, netbeans and my ubuntu 9.04 x86_64 system. so, i’ve decided to start my vmware and install a 32bit system – facing another problem: vmware-tools, in particular the mouse and filesharing.

searching for solutions on the web, i found those two sites:
http://www.csi-labor.de/archives/52-Howto-Vmware-Tools-Installation-unter-Ubuntu-9.04.html
http://communities.vmware.com/thread/207410

in short: you have to patch the vmhgfs module and if you are using the gcc-4.3 also the vmware-config-tools.pl script. everything else please read by yourself.

wish you happy compiling 😉

ubuntu update to 9.04 :: missing alt+f2

hi folks!

finally i initiated an update … but there were some problems:

  • lost the possibility to start the “run application” over the alt+f2 shortcut
  • lost the main-menu alt+f1 shortcut
  • no ctrl+alt+bkspc shortcut anymore

so, i started some research action on the www …

  • this page gave me the first hint, but i have had to change following line “event.data.l[1] = (Time)0;” to following “event.data.l[1] = (Time) time(NULL);” to get a auto-focused window!
  • no solution yet for the main-menu (tried to fix metacity, but without success)
  • all the other things found on this page!

happy fixing!

itunes on linux with wine

hi folks!

i’m a little bit angry. angry about proprietary software. especially products you need for your hardware, which were not cheap. i’m talking about my iphone and the software is, yeah you know it already, itunes. i’m not willing to be forced to buy a proprietary operating system for a free tool (itunes) i need to communicate with the purchased hardware (iphone). so i’ve decided to try my best with wine. i’ve heard that wine has solved its teething troubles and it’s now ready for the big world. hehe, you wish … but here the whole story and all my steps to my spoilage:

first i’ve tried the easy way, installing wine from the repository. so i wrote this to my sources.list:

  • deb http://wine.budgetdedicated.com/apt intrepid main

now a simple “apt-get install wine” was everything i need to start up. “download the newest itunes and install it”, was my next thought. but hey, that would be to simple. and for true, “wine iTunesSetup.exe” went completely wrong. the installation process didn’t even really start, and i got the message “the installer encountered errors before itunes could be configured”!?

so it was necessary to gain on some useful informations. this howto [1] helped me to find older versions of itunes. on oldapps [2] i tried some of them. till to the version 7.7.1 i had no success. but this version has no remote function for the iphone, and my first intention was not fulfilled. back to the start.

so i searched at the winehq homepage for more hints, and i found a patch for the current wine version [3,4]. this patch should permit the installation of the newest itunes. after downloading the sources of wine [5], applying the patch and installing all development packages for compiling [6] i’ve started the compiler … i was curious, really expecting the best. but everything turned out differently. it was really odd, the installation process finished successfully, but after executing itunes for the first time – surprise, surprise – there were no icons!!! no play-icon/button, no small icons at the left sidebar, no buttons, nothing. so i tried to change the configuration of direct3D (winecfg), but nothing happened – again no icons appeared!

i’m gutted … 😡 … welcome back, dear vmware!

[1] mini howto – itunes on ubuntu
[2] oldapps
[3] itunes8 on winehq
[4] itunes8.1 on winehq
[5] github wine
[6] building 32-bit wine on a 64-bit system – the easy way