Unix Technical Forum

key bindings

This is a discussion on key bindings within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> hi! could anyone give me a step-by-step manual to bind a certain command to a key for example I ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 08:14 AM
Harald Kaspari
 
Posts: n/a
Default key bindings

hi!

could anyone give me a step-by-step manual to bind a certain command to a
key

for example I want to bind the command ps -ef to the key F1

SOLARIS 8 with sun keyboard

the setting should take affect for all users which are log in to the
workstation

I have read some manuals but it's to heavy for me

thx

heinz


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 08:14 AM
Alex Balmer
 
Posts: n/a
Default Re: key bindings

Harald Kaspari wrote:
> hi!
>
> could anyone give me a step-by-step manual to bind a certain command to a
> key
>
> for example I want to bind the command ps -ef to the key F1
>
> SOLARIS 8 with sun keyboard
>
> the setting should take affect for all users which are log in to the
> workstation
>
> I have read some manuals but it's to heavy for me
>
> thx
>
> heinz
>
>


This will presume you are using CDE as a desktop environment. The
procudure for gnome/kde will be somewhat different. In the file
$HOME/.dt/$LC_CTYPE/dtwmrc you can edit the actions associated with the
keys. The volume control keys work by executing a program as set in this
file and you can execute any application using a key combination.

make a script such as the following:

#!/bin/sh
ps -ef |less
read

chmod +x psscript.sh

And add/edit the entry to dtwmrc:
<Key>F1 root|icon|window|ifkey f.exec dtterm -e /path/tp/script/psscript.sh

I used the script to pause after executing "ps -ef" (or dtterm just
exits). There is very likely a more direct way to do so but this should
get things working. You may have to log off/on before the new F1 bind
will work but it's possible just restarting the workspace manager will
be sufficient.

Alex.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com