Re: xmodmap again - not solved after all



Mumia W.. <paduille.4061.mumia.w+nospam@xxxxxxxxxxxxx>:
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).


--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • xmodmap again - not solved after all
    ... In the last couple of weeks the command is not ... I tried putting the full path to xmodmap, which seemed to work at first ... but it has the undesirable effect of making bash try to run xmodmap even ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Disabling Print Screen key [Solved]
    ... by the "xmodmap -e" command... ... Is that a bug?? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Cannot switch to VT (console)
    ... I don't even know where to look for the problem; xev detects KeyRelease XF86_Switch_VT_1 event, ... xmodmap: up to 3 keys per modifier, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: xmodmap again - not solved after all
    ... In the last couple of weeks the command is not ... I tried putting the full path to xmodmap, which seemed to work at first ... is it possible to store a semaphore on the X server? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Keyboard & Lefthanded Mouse i X.Org
    ... settingsfor my synaptic touchpad. ... touchpad and xmodmap seems to do the same: ... Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)