Package Details: libx11-ldpreloadnograb 1.6.2-1

Package Base: libx11-ldpreloadnograb
Description: X11 client-side library with LD_PRELOAD method to prevent keyboard and mouse grab
Upstream URL: http://xorg.freedesktop.org/
Category: x11
Licenses: custom
Submitter: Procyon
Maintainer: Procyon
Last Packager: None
Votes: 8
First Submitted: 2012-07-25 09:39
Last Updated: 2013-09-13 13:35

Latest Comments

Comment by Lauer

2014-10-05 02:23

I've installed the package and added
export LD_PRELOAD=libX11-nokey.so
to my .xinitrc. When I run Wargame: Red Dragon my WM no longer receives keystrokes.

Any suggestions?

Comment by Procyon

2012-08-03 15:13

The command being:
sudo chmod u+s /usr/lib/libX11-no*.so

Comment by Procyon

2012-08-03 15:11

It works with suid libraries.

Now should I make the files suid inside the package, or just drop a hint in the post.install saying the user should run the command?

Comment by Procyon

2012-08-03 11:17

The Virtualbox binary is set-user-id.

This doesn't work with LD_PRELOAD or LD_LIBRARY_PATH.

It can work with LD_PRELOAD if the libraries are also set-user-id and are in the default library path (they are).

I don't know if that's a good idea to do.

I'll try it out later to confirm.

Comment by Procyon

2012-08-02 10:37

While it works for Urban Terror, it does NOT work for Virtualbox, as I found out after rebooting.

Did I mess up somewhere? I don't get it. LD_PRELOAD with full path doesn't work either.

When I install libx11-nokeyboardgrab and then launch Virtualbox, it DOES work.

Comment by Procyon

2012-07-25 09:46

This is an alternative to libx11-nokeyboardgrab
https://aur.archlinux.org/packages.php?ID=39351

It is for more fine-grained control of which applications get keyboard and/or mouse grab prevention.

Usage is with LD_PRELOAD environment variable.

Three alternative libraries to libX11 are places in /usr/lib/:
libX11-nokey.so
libX11-nomouse.so
libX11-nokeynomouse.so

You can run a program with
LD_PRELOAD=libX11-nokey.so urbanterror
(the directory isn't necessary)

You can run your entire X11 environment in keyboard grab prevention (like libx11-nokeyboardgrab) by placing the following line in your .xinitrc:
export LD_PRELOAD=libX11-nokey.so