Re: xmodmap again - not solved after all
On 27 Sep 2007, s. keeling wrote:
> Mumia W.. <paduille.4061.mumia.w+nospam@earthlink.net>:
> > On 09/25/2007 09:25 AM, Anthony Campbell wrote:
> > > I've twice thought I'd solved this one but no. To recap: my .xinitrc
> > > contains the line: "xmodmap ~/.Xmodmap". which has worked for many
> > > months or even years. In the last couple of weeks the command is not
> > > being run.
> >
> > Try this in your .bashrc:
> >
> > if [ -n "$DISPLAY" ]; then
> > if (which xmodmap); then
> > xmodmap ~/.Xmodmap
> > fi
> > fi > /dev/null
> >
> > I've never seen it, but I don't assume that xmodmap will automatically
> > be called.
> >
> > Note, the code I wrote has a problem. You need to find a way to test
> > that xmodmap hasn't already been invoked for the X server. To do this,
> > you might test if your key mappings are already in xmodmap before
>
> if [ "$XMODMAP" != "Done" ]; then
> if [ -n "$DISPLAY" ]; then
> if (which xmodmap); then
> xmodmap ~/.Xmodmap
> export XMODMAP=DONE
> fi
> fi > /dev/null
> fi
>
> I just have:
>
> usermodmap=$HOME/.Xmodmap
> if [ -f $usermodmap ]; then
> /usr/bin/xmodmap $usermodmap
> else
> # fix the mouse at the least.
> #
> /usr/bin/xmodmap -e "pointer = 3 2 1"
> fi
>
> in my ~/.xinitrc (I'm a southpaw, btw).
>
>
Unfortunately, neither of these works for me. The problem appears to be
that $DISPLAY is not set. I have tried setting various values for it
(:0.0, :0) but they don't work. Does anyone know what it ought to be?
--
Anthony Campbell - ac@acampbell.org.uk
Microsoft-free zone - Using Linux Gnu-Debian
http://www.acampbell.org.uk (blog, book reviews,
on-line books and sceptical articles)
Reply to: