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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-10-2007, 12:52 AM
|
#1
|
LQ Newbie
Registered: Oct 2007
Posts: 14
Rep:
|
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
|
|
|
10-10-2007, 06:07 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
10-12-2007, 02:21 AM
|
#3
|
LQ Newbie
Registered: Oct 2007
Posts: 14
Original Poster
Rep:
|
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
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.
|
|
|
10-12-2007, 07:00 AM
|
#4
|
LQ Newbie
Registered: Oct 2007
Posts: 14
Original Poster
Rep:
|
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
|
|
|
10-12-2007, 01:53 PM
|
#5
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
All times are GMT -5. The time now is 10:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|