Re: Where to put .Xmodmap ?
On Thu, Oct 24, 2002 at 02:20:32AM +0200, Vincent Lefevre wrote:
> On Thu, Oct 24, 2002 at 00:09:00 +0100, John Keniry wrote:
> > I would like xmodmap .Xmodmap to run every time I startx. I did think
> > that simply placing the .Xmodmap in my $HOME would be enough but the X
> > scripts don't use it.
>
> I run it from my .xinitrc:
>
> [ -e $HOME/.xmodmaprc ] && xmodmap $HOME/.xmodmaprc
Right. As I've discovered, if you create an .xinitrc the global
Xsessions script doesn't run so you get responsibility for the whole WM
startup, which I would prefer not to have just for the sake of one command.
Still,
> #! /bin/sh
> PATH=$HOME/bin:$PATH
> failsafe="xterm -ls -T Failsafe -geometry 80x24-0-0"
> trap "exec $failsafe" EXIT SIGHUP SIGINT SIGPIPE SIGTERM SIGIO
>
> [some commands]
This is where you put your xmodmap command right?
> if [ "$1" = "-vnc" ]; then
[snip]
> and is executable.
Thanks for that. I know a little more now, but I'm still puzzled as to how
this is (not) working. I know that if I create an .xinitrc then I must
"do what Xsessions does" or my WM won't start, yet if I include the
xmodmap before all that in the script it has no effect. My .xinitrc:
$cat .xinitrc
#!/bin/sh
[ -e $HOME/.Xmodmap ] && xmodmap $HOME/.Xmodmap
# invoke global X session script
/etc/X11/Xsession
Now I startx and try pressing the key I want to xmodmap to change, and
find the key is unaltered. If I cut and paste the whole xmodmap line
above into a terminal and run it then try the key again the new mapping
is applied as it should be. So it didn't work in the script.
It makes no difference if I reverse the order in the .xinitrc script,
i.e. invoke Xsession first - the keymap is still unaltered when X
starts.
--
John Keniry
Reply to: