Results 1 to 5 of 5
I'm new to Linux, so forgive me if this seems too simple. But, I've followed the instructions on many sites that tell me how to do this, but nothing seems ...
- 07-11-2006 #1Just Joined!
- Join Date
- Jul 2006
- Location
- Austin, TX
- Posts
- 3
I've Tried Everthing -- KeyMap Script at Boot Time
I'm new to Linux, so forgive me if this seems too simple. But, I've followed the instructions on many sites that tell me how to do this, but nothing seems to work.
I am trying to get a key re-map script to run at boot time.
First, I made a script called BradNewScriptRemapWinKey.sh and I put it into the /etc/init.d/ folder. Then, I created a link by right clicking and choosing "Make link". I renamed the link S97BradNewScriptRemapWinKey.sh and I put this file into /etc/rc3.d/, /etc/rc2.d/, and /etc/rc1.d/. (actually at first I just put it into rc3.d, but that didn't work, so I added it to all three directories). Anyways, the script contents were modeled after /etc/init.d/skeleton, except I took out anything related to a deamon or a pidfile.
The script simply executes the following command (to remap the windows key on bootup):
/usr/bin/X11/xmodmap /etc/init.d/b_RemapWinKey
The b_RemapWinKey file contains the following to re-map the windows key to Control:
!
! Make the Windows Left Key equal to control (easier for emacs use)
!
!115 = 0x73 = Windows Left Key
keycode 115 = Super_L
add Control = Super_L
If I run the script directly, it will remap the windows key correctly. In fact, if I run the link from the rc3.d directory, either from the command line or by double clicking it, it will remap the key correctly. However, upon boot-up it does not re-map the key correctly.
Does anyone have any ideas? Any debug tips? Thanks for your help in advance.
"Warp computers are the next big thing."
--BBruce
- 07-11-2006 #2Linux User
- Join Date
- Jun 2006
- Posts
- 311
Edit rc.local
Hi bbruce,
You can add a line to the file /etc/rc.d/rc.local, to launch your script from wherever it is located.
With Regards,
Thinker
- 07-13-2006 #3Just Joined!
- Join Date
- Jul 2006
- Location
- Austin, TX
- Posts
- 3
Thx...I'll try that and see what happens
Thanks. I'll try that and see what happens. I don't remember seeing a /etc/rc.d/ directory (I'm on a different computer right now). But, I'll take a look.
Are there any ways to record errors to a log file to see any boot-up script problems?
--BBruce
- 07-13-2006 #4
Debian doesn't have rc.d or rc.local. I suspect what is happening is that the computer boots straight into runlevel 5, so you also need a link in your /etc/rc5.d directory.
The other day I made a script that I wanted to run no matter what runlevel I was in, so I linked to it from rc2.d-rc5.d. It's probably overkill, and you may just want to have the link in the directory for your default runlevel. Check the top of /etc/inittab to see what the default runlevel is (looks like 2 for Etch).Stand up and be counted as a Linux user!
- 07-13-2006 #5Linux User
- Join Date
- Jun 2006
- Posts
- 311
Hi bbruce,
Zelmo is very much right about rc.local. There is no need for rc.local in Debian. I was refering from a RedHat standpoint.
Sorry about the mistake. Thanks Zelmo for bringing it to the notice. I should really check the forum, before posting anything.
With Regards,
Thinker


Reply With Quote
