Difference between revisions of "Tpb"

From ThinkWiki
Jump to: navigation, search
(Packages)
m (debian: tpb is now in stable. fixed link.)
 
(10 intermediate revisions by 7 users not shown)
Line 5: Line 5:
  
 
With TPB it is possible to bind a program to the ThinkPad, Mail, Home and Search button. TPB can also run a callback program on each state change with the changed state and the new state as options. So it is possible to trigger several actions on different events. TPB has a on-screen display (OSD) to show volume, mute, brightness and some other informations. Furthermore TPB supports a software mixer, as the R series ThinkPads have no hardware mixer to change the volume.
 
With TPB it is possible to bind a program to the ThinkPad, Mail, Home and Search button. TPB can also run a callback program on each state change with the changed state and the new state as options. So it is possible to trigger several actions on different events. TPB has a on-screen display (OSD) to show volume, mute, brightness and some other informations. Furthermore TPB supports a software mixer, as the R series ThinkPads have no hardware mixer to change the volume.
 +
 +
TPB has been ported to KDE, yielding the [[KMilo]] plugin.
 
||
 
||
  
Line 17: Line 19:
  
 
=== Packages ===
 
=== Packages ===
* {{Debian}} packages are available: http://packages.debian.org/unstable/utils/tpb.html
+
* {{Debian}} packages are available: http://packages.debian.org/stable/utils/tpb
 
* {{Gentoo}} ebuild: http://packages.gentoo.org/packages/?category=app-laptop;name=tpb
 
* {{Gentoo}} ebuild: http://packages.gentoo.org/packages/?category=app-laptop;name=tpb
 
* {{Redhat}} packages: http://dag.wieers.com/packages/tpb/
 
* {{Redhat}} packages: http://dag.wieers.com/packages/tpb/
 +
* {{Ubuntu}} packages: http://packages.ubuntu.com/lucid/tpb
  
=== CVS ===
+
=== Subversion ===
The sources can be checked out through anonymous CVS with the following instruction set:
+
The sources can be checked out through anonymous SVN with the following instruction set:
  export CVS_RSH="ssh"
+
  svn co svn://svn.savannah.nongnu.org/tpb/trunk tpb
cvs -d :ext:anoncvs@savannah.nongnu.org:/cvsroot/tpb co tpb  
 
  
 
=== Documentation ===
 
=== Documentation ===
Line 31: Line 33:
 
=== Sample configuration ===
 
=== Sample configuration ===
 
* [http://www.nongnu.org/tpb/doc/tpbrc.html /etc/tpbrc]
 
* [http://www.nongnu.org/tpb/doc/tpbrc.html /etc/tpbrc]
* Note that on some systems the "nvram" module will need to be loaded before tpb will work, as tpb needs to write to this device.  If you run tpb in user-space, you will need write permissions; it is probably best to simply add users to a "nvram" group.
+
* Note that on some systems the "nvram" module will need to be loaded before tpb will work, as tpb needs to write to this device.  If you run tpb in user-space, you will need write permissions (and, possibly, read); it is probably best to simply add users to a "nvram" group. Adding users to the nvram group
 +
* Alternatively if adding groups/users is not to your taste, then you can add some udev.rules to allow user read/write access to nvram. Create a new script file called 10-local.rules in your udev rules definition directory on Gentoo it is /etc/udev/rules.d
 +
# Rule needed for tpb + xosd program
 +
"KERNEL==\"nvram\", MODE=\"664\"
 +
* Also note that using tpb and xmodmap altogether may cause some problems. For example, on a ThinkPad T60p running under Debian GNU/Linux (Etch, Testing), to map the two buttons next to the up arrow to some function, adding the right lines to ~/.Xmodmap may not be sufficient: you need to specify in your /etc/tpbrc (or ~/.tpbrc) the following line:
 +
XEVENTS    OFF
 +
(You just need to uncomment this line in the sample configuration file.)
 +
* To automatically start xmodmap. Create an executable script file called xmodmap.sh
 +
#!/bin/sh
 +
exec xmodmap /home/MyScripts/.Xmodmap
 +
where /home/MyScripts/.Xmodmap contains the new key definitions. For more information on defining the thinkpad special keys see [http://www.thinkwiki.org/wiki/Windows_Keys] or [http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work].
 +
Create a sym link to the above script file from KDE's autostart directory
 +
ln -s /home/MyScripts/xmodmap.sh ~/.kde/Autostart/
 +
* To automatically start tpb under KDE (note its needs X run successfully). Create an executable script file   
 +
#!/bin/sh
 +
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
 +
tpb -d
 +
(Note /usr/local/lib must point to where the library files for Xosd are installed [search for libxosd.*]).
 +
Finally create a sym link to the above script file from KDE's autostart directory
 +
ln -s /home/MyScripts/tpb ~/.kde/Autostart/
  
 
=== Contact ===
 
=== Contact ===

Latest revision as of 08:22, 15 January 2012

tpb - Thinkpad Buttons

TPB is a little program that enables you to use the IBM ThinkPad(tm) special keys.

With TPB it is possible to bind a program to the ThinkPad, Mail, Home and Search button. TPB can also run a callback program on each state change with the changed state and the new state as options. So it is possible to trigger several actions on different events. TPB has a on-screen display (OSD) to show volume, mute, brightness and some other informations. Furthermore TPB supports a software mixer, as the R series ThinkPads have no hardware mixer to change the volume.

TPB has been ported to KDE, yielding the KMilo plugin.

Tpb.jpg

Project Homepage / Availability

http://www.nongnu.org/tpb/

Status

Version 0.6.4

Packages

Subversion

The sources can be checked out through anonymous SVN with the following instruction set:

svn co svn://svn.savannah.nongnu.org/tpb/trunk tpb

Documentation

Sample configuration

  • /etc/tpbrc
  • Note that on some systems the "nvram" module will need to be loaded before tpb will work, as tpb needs to write to this device. If you run tpb in user-space, you will need write permissions (and, possibly, read); it is probably best to simply add users to a "nvram" group. Adding users to the nvram group
  • Alternatively if adding groups/users is not to your taste, then you can add some udev.rules to allow user read/write access to nvram. Create a new script file called 10-local.rules in your udev rules definition directory on Gentoo it is /etc/udev/rules.d
# Rule needed for tpb + xosd program
"KERNEL==\"nvram\", MODE=\"664\"
  • Also note that using tpb and xmodmap altogether may cause some problems. For example, on a ThinkPad T60p running under Debian GNU/Linux (Etch, Testing), to map the two buttons next to the up arrow to some function, adding the right lines to ~/.Xmodmap may not be sufficient: you need to specify in your /etc/tpbrc (or ~/.tpbrc) the following line:
XEVENTS     OFF

(You just need to uncomment this line in the sample configuration file.)

  • To automatically start xmodmap. Create an executable script file called xmodmap.sh
#!/bin/sh
exec xmodmap /home/MyScripts/.Xmodmap

where /home/MyScripts/.Xmodmap contains the new key definitions. For more information on defining the thinkpad special keys see [1] or [2]. Create a sym link to the above script file from KDE's autostart directory

ln -s /home/MyScripts/xmodmap.sh ~/.kde/Autostart/
  • To automatically start tpb under KDE (note its needs X run successfully). Create an executable script file
#!/bin/sh
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
tpb -d

(Note /usr/local/lib must point to where the library files for Xosd are installed [search for libxosd.*]). Finally create a sym link to the above script file from KDE's autostart directory

ln -s /home/MyScripts/tpb ~/.kde/Autostart/

Contact

Contact the author at markus.braun@krawel.de.