LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-10-2007, 12:52 AM   #1
arun.tayal
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Rep: Reputation: 0
Query regarding execution of script after X Terminal loads


Dear All,

My application requires to run a script at boot-time.This script basically has just two commands.


1.) loadkeys /lib/kbd/keymaps/i386/qwerty/defkeymap.map

This command is used to load the modified map file for keyboards in console mode.Using this command we can make the
keyboard behave in desirable way.


2.) xmodmap /etc/X11/Xmodmap

This command is used to load the modified map file for keyboards in GUI mode.Using this command we can make the
keyboard behave in desirable way.

However, the modified mappings which I load using these commands remain valid until the system is not re-booted.
Once the system is rebooted the default mappings get loaded.

Is there any method , so that these mappings remain valid ,everytime the m/c boots up.
I tried putting these commands in a script and then calling this script through rc.local.
but the xmodmap command is getting failed ,as the X terminal has't loaded at the time of execution of this script.Is there any other way through which I can call these commands after the X terminal gets loaded.

waiting for a timely response

Thanks
Arun Tayal
 
Old 10-10-2007, 06:07 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hi,

and welcome to LQ!

The "how-to" for the xmodmap will depend on your WM/DE. What are you using?
Two kind-of generic forms would be to add the line to ~/.xsession or ~/.xinitrc
(depending on whether you use startx or a graphical login manager). Some DEs
and WMs have mechanisms for loading of scripts on start-up, too.


Cheers,
Tink
 
Old 10-12-2007, 02:21 AM   #3
arun.tayal
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Hi ,
I am using GNOME desktop environment. I have added the xmodmap command in the ~/.xinitrc and it got successfully executed also,
but after the command in ~./xinitrc script

exec /etc/X11/xinit/Xclients

the default keymaps load again. However when I do it in KDE environment everything works fine.Please guide me where exactly should i place the xmodmap command both in ~./xsession and ~./xinitrc so that
my modified keymap gets loaded each time i re-boot the system in GNOME environment.

Waiting for a timely response.

Regards
Arun

Quote:
Originally Posted by Tinkster View Post
Hi,

and welcome to LQ!

The "how-to" for the xmodmap will depend on your WM/DE. What are you using?
Two kind-of generic forms would be to add the line to ~/.xsession or ~/.xinitrc
(depending on whether you use startx or a graphical login manager). Some DEs
and WMs have mechanisms for loading of scripts on start-up, too.


Cheers,
Tink

Last edited by arun.tayal; 10-12-2007 at 07:02 AM.
 
Old 10-12-2007, 07:00 AM   #4
arun.tayal
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Hi ,
I am using GNOME desktop environment. I have added the xmodmap command in the ~/.xinitrc and it got successfully executed also,
but after the command in ~./xinitrc script

exec /etc/X11/xinit/Xclients

the default keymaps load again. However when I do it in KDE environment everything works fine.Please guide me where exactly should i place the xmodmap command both in ~./xsession and ~./xinitrc so that
my modified keymap gets loaded each time i re-boot the system in GNOME environment.

Waiting for a timely response.

Regards
Arun
 
Old 10-12-2007, 01:53 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Sorry, I can't guide you in the usage of Gnome (don't use it,
can't stand it). Maybe someone else can chime in?


And please, don't top-post when you quote. I find it very
irritating in e-Mail, and on the forum it makes even less sense.



Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script execution yakoub Linux - Software 3 11-12-2006 01:26 AM
Script execution salmanucit Linux - Software 1 12-08-2005 08:51 AM
script execution on halt linuxhippy Slackware 4 04-01-2005 07:09 PM
How do I Set MySQL Max Query Execution Time? farmerjoe Linux - General 1 01-26-2005 01:12 PM
script execution Johng Programming 2 08-21-2004 04:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration