xset not working on session start
Glynn Clements
glynn at gclements.plus.com
Sun Feb 11 09:27:48 PST 2007
Atom Smasher wrote:
> (
> sleep 10
> xset b 100 440 101 && echo 'bell set'
> xset m 4/1 8 && echo 'mouse set'
> xset dpms 0 0 0 && echo 'dpms set'
> ) &
>
>
> putting that in ~/.xsession works, after a 10 second delay, of course.
>
> now it gets weirder... from time to time the bell, dpms and mouse settings
> are reset to their default values. i've noticed that xine will reset the
> bell (?!?!?) when it starts, but i haven't yet figured out what is
> resetting everything else.
>
> any hints for figuring out this one? is there a way to log changes to
> these settings?
The simplest method which springs immediately to mind is to create a
shared library containing dummy versions of relevant functions (e.g.
DPMSQueryExtension, XF86MiscSetKbdSettings etc) then point LD_PRELOAD
at the library. E.g.:
$ cat hack.c
#define _GNU_SOURCE
#include <errno.h>
#include <stdio.h>
#include <X11/Xlib.h>
Bool DPMSQueryExtension(Display *display, int *event_base, int *error_base)
{
fprintf(stderr, "*** DPMSQueryExtension called by %s\n", program_invocation_name);
return False;
}
$ gcc -c -fPIC hack.c
$ gcc -shared -o libhack.so hack.o
$ export LD_PRELOAD=`pwd`/libhack.so
$ xset q >/dev/null
*** DPMSQueryExtension called by xset
--
Glynn Clements <glynn at gclements.plus.com>
More information about the xorg
mailing list