gksyn

gksyn: a gkrellm panel to control synaptics touchpads

Please notice: recent GNOME panels use gconf to control the touchpad behaviour, so that gksyn do not work anymore. I suggest you use instead the very nice touchpad_indicator by atareao.

 

gksyn screenshot

gksyn is a GKrellm plugin to control synaptics touchpad behaviour.

Basically, the purpose of this plugin is to select if the touchpad is active or not. The rationale of this is that, when typing on the keyboard, too much often you can touch the active touchpad area an find yourself typing in a completed unwanted position or window.

After enabled, in your gkrellm you will have a new panel with an icon (a grey square with a green check in it) and the word “On” on the rigth. That means that your touchpad is enabled (see image to the right).

If you click on the word “on”, it will change to “Auto”. Now your touchpad will be enabled only if you are not typing for at least 2 seconds (default value that can be changed with the configuration tab of the plugin). When you type, the touchpad will be disabled and the icon will change to a grey square with a red cross on it.

If you click again on the “Auto” label, the touchpad will be put in a continuos “Off” status. This could be handy when you have an external mouse connected, but quite bad if not… so if the plugin does not detect an external mouse it will not let you switch to Off.

gksyn is basically a wrapper for the syndaemon utility that comes with the synaptics package, with an added graphic interface and interactivity that gives you a nice feedback.

In the summer of 2005, Pietro Franchi proposed a cute patch to extend its funcionality (adding starting state configurability) and enhance the look. That lead to a 1.1.1 release. Moreover, now the software unpacks on its own subdirectory, as suggested by several users.

After trying to track the synaptics daemon, I decided to substantially change  the approach, especially after the decision to disable SHM by default. So the version 2 should be independent (well, more independent) from the driver.

Convinced? So, download gksyn.

To build gksyn, you have to:

  1. have gkrellm 2.2 or better installed, included development library;
  2. have synaptics driver installed. In debian-based linux distribution that means install the xserver-xorg-input-synaptic package.
  3. Uncompress the archive with tar xvzf gksyn-x.y.z.tar.gz
  4. do cd gksyn
  5. then ./build_gksyn
  6. move gksyn.so and setlb.so to your plugin directory ($HOME/.gkrellm/plugins)
  7. restart gkrellm, enable plugin and enjoy.

I hope you enjoy the plugin; please drop me a note if you did.

CAVEATS AND THE GORY DETAILS.

gksyn v2 uses the standard synaptics utilities.

This version of the gksyn plugin uses (spawns) the commands synclient and syndaemon, which do the real work of speaking with the touchpad. That way, gksyn will be independent from updates (I hope) of the underlying drivers. Basically, if symdaemon works for you, gksyn should too.

One of the collateral effect of this is the necessity of using a LD_PRELOAD trick to call the syndaemon program. That program, infact, uses standard output to tell the user the status of the touchpad. Unfortunately, the buffering rules in Unix pipes make it impossible to use it as a subprocess and at the same time reading the output in real time: being not connect to a tty, the libc changes the stdout buffering to full mode… so I used a little trick to change that. The problem is that gksyn have to find the preload library, and that means that if your plugin directory is not the default one, you have to modify the source (search for the start_daemon() function).

the “off” status.

The off status is very dangerous. If you switch off the touchpad you can be stuck. To solve this, the plugin tries hard to guess if there is another mouse in the laptop, by looking at /proc/bus/input/devices. In case of doubt, gksyn refuses to switch to off state. You can change this, if you want, look at the function update_plugin().
In that case I strongly advise you to define a key to reenable the mouse.  Under gnome, is simply a matter of going to System->Preferences->Keyboard Shortcut and define a new action, with the command “synclient touchpadoff=0“, then assign it to a key combination. It can save your day.

ACKNOWLEDGMENT: (and links)

The software was written by a cut’n’paste and #include exercise of other’s people software, and more explicitly from:

Current version

Current version of gksyn
Filename : gksyn-2-0-0-tar.gz (29 KB)
Caption : Current version of gksyn

Old version

Old (obsolete) version of gksyn
Filename : gksyn-1-1-2-tar.gz (7 KB)
Caption : Old (obsolete) version of gksyn

2 comments to gksyn

  • Blizzard_of_ozz

    Hi,

    Nice plugin but it crashes gkrellm as soon as i try to toggle the button :

    —————
    Can’t access shared memory area. SHMConfig disabled?
    Can’t access shared memory area. SHMConfig disabled?
    Can’t access shared memory area. SHMConfig disabled?
    Can’t access shared memory area. SHMConfig disabled?
    gkrellm: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
    gkrellm: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.

    (gkrellm:31217): GLib-CRITICAL **: g_source_remove: assertion `tag > 0′ failed

    (gkrellm:31268): GLib-CRITICAL **: g_source_remove: assertion `tag > 0′ failed
    ———————-

    I’m using gkrellm-2.3.1 and gksyn-2.0.0 on a thinkpad T61

    Hope u’ll fix the bug ..

    thanks,

    -blizz

  • romano

    Try if syndaemon works alone, from a command line terminal – just type syndaemon. If it works, I will try to look at the plugin as soon as I can (but do not held your breath — I am quite busy on my job now). If it doesn’t work, the problem is at syndaemon level…

    Thanks for the comment.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

This site uses Akismet to reduce spam. Learn how your comment data is processed.