[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Problems detecting mouse/keyboard with Fedora
- Date: Mon, 24 Aug 2015 11:59:21 -0500
- From: Todd Tannenbaum <tannenba@xxxxxxxxxxx>
- Subject: Re: [HTCondor-users] Problems detecting mouse/keyboard with Fedora
On 8/24/2015 11:03 AM, Antonio Dorta wrote:
Hi Michael and Greg!
We've been doing some tests with Michael's solution. I think it should
work, but it seems that current condor_kbdd has some problems when also
using condor_shared_port... I've also found some people asking the same,
but no replies so far
This incompatibility between condor_kbdd and the condor_shared_port has
been fixed in the v8.3 series, specifically as of v8.3.7. See
This is what I get in kbdd.log:
Daemon Log is logging: D_ALWAYS D_ERROR
DaemonCore: command socket at <126.96.36.199:59273>
DaemonCore: private command socket at <188.8.131.52:59273>
Connected to X server: :0.0
WARNING: UDP does not support connecting to a shared port! (requested
address is <184.108.40.206:9618> with SharedPortID=20022_83d5_3
Stack dump for process 29848 at timestamp 1440430471 (15 frames)
and then a core is created and daemon exits...
Quoting Michael V Pelletier <Michael.V.Pelletier@xxxxxxxxxxxx>:
I'm running Red Hat Enteprise Linux 6 here, and had a similar issue with
our workstations. I had tried running the kbdd as root, but since home
directories are on a root-squashed NFS filesystem, it wasn't able to read
the cookies for the users, and thus was unable to connect to the display
to monitor activity. I'm not sure if it'll be exactly what you need, but
hopefully it'll at least get you closer.
The trick in our case is that the condor_kbdd, in order to detect GNOME
console activity, has to be attached with the user's session, and
the user. This is discussed in section 3.12.5 in the 8.2.9 manual, but it
is a bit short of explicit guidance due to the variety of different
For the RHEL6 GNOME, you need to add an "htcondor-kbdd.sh" script to
/etc/X11/xinit/xinitrc.d to start it up on login, and update
/etc/gdm/PostSession/Default to shut it down on logout.
The gist of the htcondor-kbdd.sh file is:
if [ -x /usr/sbin/condor_kbdd ] ; then
if [ -d $HOME/.kbdd.log ] ; then
/bin/mv -f $HOME/.kbdd.log/KbdLog
if [ -e $HOME/.kbdd.log ] ; then
/bin/rm -f $HOME/.kbdd.log
/usr/sbin/condor_kbdd -l $HOME/.kbdd.log -pidfile $HOME/.kbdd.pid
This does some basic sanity checking as you can see, by rotating the log
file from a previous session and removing any non-directory that might
block the daemon's creation of the directory. The condor_kbdd drops into
the background by itself, so doesn't need an &.
The PostSession/Default script runs as root, and for obvious security
reasons condor_kbdd doesn't want to run as root, so you have to switch to
the session owner to run condor_kbdd -k to kill the daemon. So we have:
if [ -f "$HOME/.kbdd.pid" ] ; then
/bin/su $USER -c \
"/usr/sbin/condor_kbdd -k $HOME/.kbdd.pid ; /bin/rm -f
This approach is preferable to an OS kill because it allows the kbdd to
take itself down 100% gracefully, doing whatever updates it needs to do
After setting this up, the ConsoleIdle and KeyboardIdle attributes showed
the expected responses to keyboard and mouse activity.
More information on these /etc/gdm scripts are here:
It's probably possible to do everything under the /etc/gdm scripots, but
the fact that they run as root led me to use the xinitrc.d options
for startup, in alignment with the general recommendations in the manual.
Feel free to share anything you discover that might simplify things.
Todd Tannenbaum <tannenba@xxxxxxxxxxx> University of Wisconsin-Madison
Center for High Throughput Computing Department of Computer Sciences
HTCondor Technical Lead 1210 W. Dayton St. Rm #4257
Phone: (608) 263-7132 Madison, WI 53706-1685