Sponsored Content
Top Forums UNIX for Advanced & Expert Users Set Caps and Num lock from within X? Post 302424958 by autotuner on Wednesday 26th of May 2010 06:13:19 PM
Old 05-26-2010
Set Caps and Num lock from within X?

Hello,
Not sure if this is the right place to post it but..
I have a requirement to set Caps lock and/or Num lock on and off via a Cron job.
Now I have working scripts that do the job, but as soon as X starts up the jobs no longer run (well they appear to, but Caps lock and Num lock do not toggle).
Is there a way to acheive this when X is running?
The OS is a couple of versions of Fedora (cersions depend on the hardware type)

In case you are wondering why, this is a display application using browsers, there is no keyboard as such, and Caps and Num locks are used to indicate status etc.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

setting num lock on at boot up

Once I knew how to set up a unix file so that the num lock would automatically be on after booting up. How exactly is that done? Unix has final control on the setting of the num lock from off or on to on at the end of the boot up process. Any help will be appreciated, especially if detailed. Oh... (0 Replies)
Discussion started by: jddxxx
0 Replies

2. Shell Programming and Scripting

Based on num of records in file1 need to check records in file2 to set some condns

Hi All, I have two files say file1 and file2. I want to check the number of records in file1 and if its atleast 2 (i.e., 2 or greater than 2 ) then I have to check records in file2 .If records in file2 is atleast 1 (i.e. if its not empty ) i have to set some conditions . Could you pls... (3 Replies)
Discussion started by: mavesum
3 Replies

3. HP-UX

where I can set login fail ,lock time

where I can set login fail ,lock time thanks (2 Replies)
Discussion started by: alert0919
2 Replies

4. Red Hat

Caps lock dtterm

Hello, We are having a problem with running dtterm off a RHEL server. Logging into an HP-UX server from a RHEL 5.1 desktop, setting DISPLAY and running dtterm, the caps lock does not work. We have been playing with xmodmap & stty but to no avail. Any help appreciated. mgb (1 Reply)
Discussion started by: mgb
1 Replies

5. HP-UX

Caps lock dtterm

Hello, We are having a problem with running dtterm off a RHEL server. Logging into an HP-UX server from a RHEL 5.1 desktop, setting DISPLAY and running dtterm, the caps lock does not work. We have been playing with xmodmap & stty but to no avail. Any help appreciated. mgb (7 Replies)
Discussion started by: mgb
7 Replies

6. Shell Programming and Scripting

sh: Detect key (CTRL/SHIFT/CAPS LOCK) state?

I'm trying to write a shell script that runs periodically and if I'm not at the keyboard, it should do one thing, but if I am at the keyboard, it should do another thing. Therefore I've decided that it would be good if I could press down the CTRL key, (or some other key) and have the shell script... (8 Replies)
Discussion started by: Ilja
8 Replies

7. UNIX for Advanced & Expert Users

Testing privileges -lock lockfile /var/lock/subsys/..- Permission denied

Hi all, I have to test some user priviliges. The goal is to be sure that an unauthorized user can't restart some modules (ssh, mysql etc...). I'm trying to automate it with a shell script but in same cases I got the syslog broadcast message. Is there any way to simply get a return code... (3 Replies)
Discussion started by: Dedalus
3 Replies

8. UNIX for Dummies Questions & Answers

Caps lock problem

hi all this s quite a foolish problem. I seem to hav pressed some keys s.t in unix, my letters are comin in caps and with caps lock on, i am getting lowercase letters. :o Pls help. Also is there any reference or manual where i can check in case such problems arrise? thanx in advance curiosity (4 Replies)
Discussion started by: curiosity
4 Replies

9. Shell Programming and Scripting

Generate all possible word with caps and no caps

With use of sed/awk, how can I print all possible combinations of a word with caps/non-caps. Eg Applying operation on "cap" should generate output as follows. cap CAP Cap cAp caP CAp cAP CaP (12 Replies)
Discussion started by: anil510
12 Replies
simple_lock_try(9r)													       simple_lock_try(9r)

NAME
simple_lock_try - General: Tries to assert a simple lock SYNOPSIS
#include <kern/lock.h> boolean_t simple_lock_try( simple_lock_t slock_ptr ); ARGUMENTS
Specifies a pointer to a simple lock structure. You can declare this simple lock structure by using the decl_simple_lock_data routine. DESCRIPTION
The simple_lock_try routine tries to assert a lock with read and write access for the resource associated with the specified simple lock. The main difference between this routine and simple_lock is that simple_lock_try returns immediately if the resource is already locked, while simple_lock spins until the lock has been obtained. Thus, call simple_lock_try when you need a simple lock but the code cannot spin until the lock is obtained. To release a simple lock successfully asserted by simple_lock_try, call the simple_unlock routine. RETURN VALUES
The simple_lock_try routine returns one of the following values: The simple_lock_try routine successfully asserted the simple lock. The simple_lock_try routine failed to assert the simple lock. FILES
SEE ALSO
Routines: decl_simple_lock_data(9r), simple_lock(9r), simple_lock_init(9r), simple_lock_terminate(9r), simple_unlock(9r) Data Structures: slock(9s) simple_lock_try(9r)
All times are GMT -4. The time now is 03:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy