1 |
#!/bin/sh |
2 |
#--------------------------------------------------------------- |
3 |
# Project : Mandrake |
4 |
# Module : numlock |
5 |
# File : numlock.xinit |
6 |
# Version : $Id: numlock.xinit 241829 2008-04-03 04:15:25Z blino $ |
7 |
# Author : Frederic Lepied |
8 |
# Created On : Wed Apr 12 08:39:24 2000 |
9 |
#--------------------------------------------------------------- |
10 |
|
11 |
# |
12 |
# The following code used to execute enable_numlock if numlock was enabled |
13 |
# on this host. This screwed hosts which did not use numlock (laptops) |
14 |
# but which tried to create XDMCP sessions to this host, as numlock would |
15 |
# be turned on unconditionally. |
16 |
# |
17 |
# The following code detects a $DISPLAY host other than what would be |
18 |
# expected for a local X session on this host, and exempts it from the |
19 |
# automatic execution of numlock. |
20 |
# |
21 |
DISPHOST=${DISPLAY%%:*} |
22 |
if [ "$DISPHOST" = "" -o "$DISPHOST" = "localhost" -o "$DISPHOST" = "$HOSTNAME" ]; then |
23 |
if [ -f /var/lock/subsys/numlock -a -x /usr/bin/enable_X11_numlock ]; then |
24 |
/usr/bin/enable_X11_numlock |
25 |
fi |
26 |
fi |
27 |
|
28 |
# numlock ends here |