Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

xmodmap in .xsession

2 views
Skip to first unread message

Bob Tennent

unread,
Dec 17, 2009, 2:08:23 AM12/17/09
to
If I do

$ xmodmap .xmodmaprc

in an xterm, certain key bindings get modified as I want them. But if
I put that command into my .xsession script, the key bindings are not
modified. Why is this? What do I need to do?

Bob T.

Lucas Levrel

unread,
Dec 17, 2009, 6:33:15 AM12/17/09
to

Are you sure your .xsession is executed? Then maybe your Desktop
Environment changes your settings afterwards (it's launched at the end of
.xsession, isn't it?). I put my xmodmap settings in .profile (for bash;
may vary for other shells).

--
LL

Bob Tennent

unread,
Dec 17, 2009, 8:15:00 AM12/17/09
to
On Thu, 17 Dec 2009 12:33:15 +0100, Lucas Levrel wrote:
> Le 17 d�cembre 2009, Bob Tennent a �crit :

>
>> If I do
>>
>> $ xmodmap .xmodmaprc
>>
>> in an xterm, certain key bindings get modified as I want them. But if
>> I put that command into my .xsession script, the key bindings are not
>> modified. Why is this? What do I need to do?
>
> Are you sure your .xsession is executed?

Everything else is.

> Then maybe your Desktop
> Environment changes your settings afterwards (it's launched at the end of
> .xsession, isn't it?).

My "Desktop Environment" is twm but I do a kdeinit to get the libraries
loaded. This might be the problem.

> I put my xmodmap settings in .profile (for bash;
> may vary for other shells).

Then they're executed for every shell (and all but the first one will
actually fail because of the changes). And they'll be executed for
shells started remotely for different keyboards. This is surely not the
right solution.

Lucas Levrel

unread,
Dec 18, 2009, 6:11:02 AM12/18/09
to
Le 17 décembre 2009, Bob Tennent a écrit :

> > I put my xmodmap settings in .profile (for bash;
> > may vary for other shells).
>
> Then they're executed for every shell (and all but the first one will
> actually fail because of the changes).

It should be executed only by login shells.

> And they'll be executed for shells started remotely for different
> keyboards.

Yes. I didn't know if you used remote connections.

> This is surely not the right solution.

Depends on which keyboards you use for your remote sessions ;-)

But you can also use some conditional construct, e.g. test the value of
$DISPLAY


--
LL

0 new messages