* where to put my .xmodmap?
@ 2004-08-21 14:25 Alexandre Russel
2004-08-21 14:35 ` Björn Lindström
0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Russel @ 2004-08-21 14:25 UTC (permalink / raw)
Hi all,
I use Fedora core 1 with gnome.
After following the thread concerning RSI and Emacs, I decided to use
.xmodmap to add some Control key to my keyboard:
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
keycode 115 = Control_L
add Control = Control_L
keycode 116 = Control_R
add Control = Control_R
It works fine when I do xmodmap .xmodmap. I want to use this map
each time I use Emacs. I tried to add the line:
xmodmap ~/.xmodmap
to my .bashrc. It works fine untill I start another application(ie:
terminal),
then it comes back to the old map(probably because this other app
doesn't use bash).
What can I do for emacs to always this key map?
Cheers,
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: where to put my .xmodmap?
2004-08-21 14:25 where to put my .xmodmap? Alexandre Russel
@ 2004-08-21 14:35 ` Björn Lindström
2004-08-21 14:50 ` Alexandre Russel
0 siblings, 1 reply; 7+ messages in thread
From: Björn Lindström @ 2004-08-21 14:35 UTC (permalink / raw)
"Alexandre Russel" <scandrou@hpo.net> writes:
> It works fine when I do xmodmap .xmodmap. I want to use this map
> each time I use Emacs. I tried to add the line:
>
> xmodmap ~/.xmodmap
>
> to my .bashrc.
You should run xmodmap from the start-up files for X
instead. I.e. ~/.xsession, probably.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: where to put my .xmodmap?
2004-08-21 14:35 ` Björn Lindström
@ 2004-08-21 14:50 ` Alexandre Russel
2004-08-21 16:07 ` Björn Lindström
0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Russel @ 2004-08-21 14:50 UTC (permalink / raw)
bkhl@elektrubadur.se (Björn Lindström) writes:
Thanks for your reply.
> > It works fine when I do xmodmap .xmodmap. I want to use this map
> > each time I use Emacs. I tried to add the line:
> >
> > xmodmap ~/.xmodmap
> >
> > to my .bashrc.
>
> You should run xmodmap from the start-up files for X
> instead. I.e. ~/.xsession, probably.
When I was looking into modmap I have seen this advice so tried it.
First had no .xsession in my home directory so created one and
added:
xmodmap ~/.xmodmap
to it, but it didn't do anything.(considering there was no
.xsession file in the first place I don't think this file is read
anyway). I had a look in all of my . file and couldn't find one
that would be read by X.
Alex.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: where to put my .xmodmap?
2004-08-21 14:50 ` Alexandre Russel
@ 2004-08-21 16:07 ` Björn Lindström
2004-08-21 17:47 ` Alexandre Russel
0 siblings, 1 reply; 7+ messages in thread
From: Björn Lindström @ 2004-08-21 16:07 UTC (permalink / raw)
"Alexandre Russel" <scandrou@hpo.net> writes:
> When I was looking into modmap I have seen this advice so tried it.
> First had no .xsession in my home directory so created one and added:
>
> xmodmap ~/.xmodmap
>
> to it, but it didn't do anything.(considering there was no .xsession
> file in the first place I don't think this file is read anyway). I had
> a look in all of my . file and couldn't find one that would be read by
> X.
It may be that Fedora calls this file by some other name, but probably
you just have to make it executable.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: where to put my .xmodmap?
2004-08-21 16:07 ` Björn Lindström
@ 2004-08-21 17:47 ` Alexandre Russel
2004-08-21 18:00 ` Björn Lindström
0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Russel @ 2004-08-21 17:47 UTC (permalink / raw)
bkhl@elektrubadur.se (Björn Lindström) writes:
> "Alexandre Russel" <scandrou@hpo.net> writes:
>
> > When I was looking into modmap I have seen this advice so tried it.
> > First had no .xsession in my home directory so created one and added:
> >
> > xmodmap ~/.xmodmap
> >
> > to it, but it didn't do anything.(considering there was no .xsession
> > file in the first place I don't think this file is read anyway). I had
> > a look in all of my . file and couldn't find one that would be read by
> > X.
>
> It may be that Fedora calls this file by some other name, but probably
> you just have to make it executable.
really BAD.
If any one reading that thread is using his system only as root
user, do not make your .xsession file executable if it contains
only the:
xmodmap ~/.xmodmap
line, the result is not friendly.
I am using Fedora core 1 with gnome. I have my .xmodmap set up:
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
keycode 115 = Control_L
add Control = Control_L
keycode 116 = Control_R
add Control = Control_R
and following the preceding advice wrote the line:
xmodmap .xmodmap
in my .xsession file and made it executable. I logged out and try
to log in again. I couldn't with the message:
Your session only lasted 10 seconds. If you have not logged out
yourself, this could mean that there is some installation problem
or that you maybe out of disk place. Try login with one of the
failsafe sessions to see if you can fix this problem.
Then I was asked if I wanted to view the details in
/.xsession-errors file with the result:
/etc/X11/gdm/PreSession/Default: Registering your session with wtmp and utm
/etc/X11/gdm/PreSession/Default: running: /usr/bin/X11/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "/var/gdm/: 0.Xservers" -h "" -l":o""xyz"
with xyz standing for my login name(note that the previous line are note cut and paste but wrote down and retyped so there maybe some inconsistence).
I could get out of the situation login in as root user, su with my normal login name, renaming the .xsession in my home directory and login again under my login name. I am not sure I could have done the same thing if I had only a root user on my system.
So X definitely read the .xsession file but mine was not written properly...
Any help welcome,
Cheers,
Alex.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: where to put my .xmodmap?
2004-08-21 17:47 ` Alexandre Russel
@ 2004-08-21 18:00 ` Björn Lindström
2004-08-22 7:01 ` Alexandre Russel
0 siblings, 1 reply; 7+ messages in thread
From: Björn Lindström @ 2004-08-21 18:00 UTC (permalink / raw)
"Alexandre Russel" <scandrou@hpo.net> writes:
> So X definitely read the .xsession file but mine was not written
> properly...
You'll have to start a window manager from the .xsession, since it is
now what xdm/gdm/whatever will run when you login.
I appended mine to the end of my posting. ratpoison is my window
manager, you'll probably want have that line, but replace ratpoison with
whatever wm you're using.
You can check what the rest of the commands are doing by reading the
corresponding man pages.
The first line makes .xsession be executed by zsh, which is to make it
use my ~/.zshenv. You'll probably not need that.
Here it comes:
#!/usr/bin/env zsh
# Initalization
xmodmap ~/.xmodmap
xrdb .Xdefaults
xsetroot -cursor_name left_ptr -solid black
xset b off
# Set mixer
aumix -L
# Start background processes.
unclutter -idle 3 -root &
xscreensaver &
xwrits &
firefox &
xterm -title screen@numerus -e ssh -t numerus.ling.uu.se screen -dR &
xterm -title Emacs -e emacs -nw &
xterm &
exec ratpoison
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: where to put my .xmodmap?
2004-08-21 18:00 ` Björn Lindström
@ 2004-08-22 7:01 ` Alexandre Russel
0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Russel @ 2004-08-22 7:01 UTC (permalink / raw)
bkhl@elektrubadur.se (Björn Lindström) writes:
> You'll have to start a window manager from the .xsession, since it is
> now what xdm/gdm/whatever will run when you login.
>
> I appended mine to the end of my posting. ratpoison is my window
> manager, you'll probably want have that line, but replace ratpoison with
> whatever wm you're using.
>
> You can check what the rest of the commands are doing by reading the
> corresponding man pages.
After a lot of man reading I manage to make it work. I had a very
bad understanding of X, window manager, desktop relationship.
Thanks a lot,
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-08-22 7:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-21 14:25 where to put my .xmodmap? Alexandre Russel
2004-08-21 14:35 ` Björn Lindström
2004-08-21 14:50 ` Alexandre Russel
2004-08-21 16:07 ` Björn Lindström
2004-08-21 17:47 ` Alexandre Russel
2004-08-21 18:00 ` Björn Lindström
2004-08-22 7:01 ` Alexandre Russel
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.