View previous topic :: View next topic |
Author |
Message |
n1maddin n00b
Joined: 11 May 2005 Posts: 51
|
Posted: Sun May 15, 2005 1:42 pm Post subject: xmodmap when starting kde with kdm |
|
|
hi guys,
I always have to run
xmodmap -e "pointer = 1 2 3 6 7 4 5"
in console to get my mous to work the way I want her to. But I am not able to get kde (kdm) do to this automatically, i have tried to put it in xprofile and xsession but nothing worked, please help.
And i always have to change something on my keyboard settings in kde to get my @-symbole to work, i do not have to change something special, just anything and than it will work, any clues why?
please help in newbie languange, since i am one
thank in advance |
|
Back to top |
|
|
boniek Guru
Joined: 26 Mar 2005 Posts: 373
|
|
Back to top |
|
|
n1maddin n00b
Joined: 11 May 2005 Posts: 51
|
Posted: Sun May 15, 2005 6:34 pm Post subject: |
|
|
Hi guys, I just can not get it work...
i figured out the /.xsession is not being executed at all, so i changed my /etc/X11/Sessions/kde-3.4 to look like this:
#!/bin/sh
~/.xsession
exec /usr/kde/3.4/bin/startk
and my ~/.xsession to look like this:
xmodmap -e "pointer = 1 2 3 6 7 4 5"
also tried :
exec xmodmap -e "pointer = 1 2 3 6 7 4 5"
and
pointer = 1 2 3 6 7 4 5
no succes... i always have to type it per hand.... any ideas?? |
|
Back to top |
|
|
n1maddin n00b
Joined: 11 May 2005 Posts: 51
|
Posted: Tue May 17, 2005 4:17 pm Post subject: |
|
|
boniek wrote: | create .Xmodmap file in your home directory and add: pointer = 1 2 3 6 7 4 5 to it. |
did not work |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Tue May 17, 2005 4:24 pm Post subject: |
|
|
n1maddin wrote: | boniek wrote: | create .Xmodmap file in your home directory and add: pointer = 1 2 3 6 7 4 5 to it. |
did not work |
If you use KDE put your xmodmap entry in /usr/kde/3.4/share/config/kdm/Xsession |
|
Back to top |
|
|
furanku l33t
Joined: 08 May 2003 Posts: 905 Location: Hamburg, Germany
|
Posted: Tue May 17, 2005 9:00 pm Post subject: |
|
|
Headrush wrote: | If you use KDE put your xmodmap entry in /usr/kde/3.4/share/config/kdm/Xsession |
Thanks for that tip! I've been looking for the right place to put my xmodmaps for a long while.
If you look at the contents of /usr/kde/3.4/share/config/kdm/Xsession, you'll find that it parses two files:
Code: | [ -f /etc/xprofile ] && . /etc/xprofile
[ -f $HOME/.xprofile ] && . $HOME/.xprofile
|
So I created a file ~/.xprofile, containing the line Code: | xmodmap -e "pointer = 1 2 3 6 7 4 5"
|
and finally it works without modifing a KDE distributed file and on per user basis! |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Tue May 17, 2005 9:11 pm Post subject: |
|
|
Those should be .profile not .xprofile
Code: | [ -f /etc/profile ] && . /etc/profile
[ -f $HOME/.profile ] && . $HOME/.profile |
|
|
Back to top |
|
|
furanku l33t
Joined: 08 May 2003 Posts: 905 Location: Hamburg, Germany
|
Posted: Tue May 17, 2005 9:33 pm Post subject: |
|
|
Headrush wrote: | Those should be .profile not .xprofile
Code: | [ -f /etc/profile ] && . /etc/profile
[ -f $HOME/.profile ] && . $HOME/.profile |
|
Well, I haven't modified the contents of /usr/kde/3.4/share/config/kdm/Xsession and it says .xprofile, you might take a look at your own copy of that file. .profile wouldn't also make so much sense, as this is a generic configuration file and has no special meaning to xdm, kdm or X11 in general. |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Tue May 17, 2005 9:52 pm Post subject: |
|
|
furanku wrote: | Well, I haven't modified the contents of /usr/kde/3.4/share/config/kdm/Xsession and it says .xprofile, you might take a look at your own copy of that file. |
We're looking at different parts of the file.
The script checks to see which shell the user is running and then sources the appropriate files.
I'm guessing the majority of users are using bash and hence the location I suggested would work.
I see further down in the file where xprofile and .xprofile are also sourced. I have never seen xprofile used anywhere else, but you are correct and it should work fine too.
furanku wrote: | .profile wouldn't also make so much sense, as this is a generic configuration file and has no special meaning to xdm, kdm or X11 in general. |
Not sure what that means, but .profile is also sourced if shell is bash, as is zprofile is shell is zsh. |
|
Back to top |
|
|
n1maddin n00b
Joined: 11 May 2005 Posts: 51
|
Posted: Tue May 17, 2005 10:00 pm Post subject: |
|
|
hi,
I have tried both and neather the one nor the other is working for me ... this is what I have done:
#nano ~/.profile
and enter this :
xmodmap -e "pointer = 1 2 3 6 7 4 5"
saved it and rebooted... no effect |
|
Back to top |
|
|
furanku l33t
Joined: 08 May 2003 Posts: 905 Location: Hamburg, Germany
|
Posted: Tue May 17, 2005 10:22 pm Post subject: |
|
|
Headrush wrote: |
furanku wrote: | .profile wouldn't also make so much sense, as this is a generic configuration file and has no special meaning to xdm, kdm or X11 in general. |
Not sure what that means, but .profile is also sourced if shell is bash, as is zprofile is shell is zsh. |
I never used .xprofile before, because with XFree setting the modmaps with .xmodmap worked. Since AFAIK .profile is executed by every interactive bash (in fact, it's a bit more compilcated, see man page), each xterm or konsole you'ld start would execute your xmodmap call, even worse: even if no X11 is running and you log in in a console xmodmap would be executed if you put that call into .profile. So I guess .xprofile is some kind of kdm's extension to that scheme of login scripts. It's a file that is just once executed when you log in to your xsession.
At least gdm also cares about that file and /usr/portage/gnome-base/gdm/files/2.6.0/Xsession has the comment Code: | # Second read /etc/xprofile and .xprofile for X specific setup | .
At a Slackware Xsession description I found the following comment concering the .xprofile fille Code: | # These files (if they exist) are used to set up the X related environment. We used to
# exec .xsession at this location, but that can interfere with choosing a session type
# through XDM/KDM/GDM so it was moved to after a requested session is started. Since
# that means that .xsession might never be run at all when using XDM/KDM/GDM, support
# for the xprofile was added to allow a way for the user to customize the X environment.
if [ -r /etc/xprofile ]; then
source /etc/xprofile
fi
if [ -r ~/.xprofile ]; then
source ~/.xprofile
fi |
So to me it looks like with al the different shells, login managers, Xorg vs. Xfree there seems nowaday to be no more real standard which files should be executed in which order.
Putting the xmodmap command in .xprofile at least works for me... |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Tue May 17, 2005 10:23 pm Post subject: |
|
|
n1maddin wrote: | hi,
I have tried both and neather the one nor the other is working for me ... this is what I have done:
#nano ~/.profile
and enter this :
xmodmap -e "pointer = 1 2 3 6 7 4 5"
saved it and rebooted... no effect |
You can try putting the full path to xmodmap: /usr/bin/xmodmap though I doubt that is the problem.
Are you sure you weren't root user when you did that?
You are using kdm right?
furanku,
I switched to using ~/.xprofile.
Your explanation was good and although I never had problems using /usr/kde/3.4/share/config/kdm/Xsession, using ~/.xprofile seems better and I won't have to worry about any changes with an update to kde.
Just made a .xprofile file in /etc/skel with those entries and all new users accounts should pick it up
Last edited by Headrush on Tue May 17, 2005 10:36 pm; edited 3 times in total |
|
Back to top |
|
|
furanku l33t
Joined: 08 May 2003 Posts: 905 Location: Hamburg, Germany
|
Posted: Tue May 17, 2005 10:28 pm Post subject: |
|
|
n1maddin wrote: | hi,
I have tried both and neather the one nor the other is working for me ... this is what I have done:
#nano ~/.profile
and enter this :
xmodmap -e "pointer = 1 2 3 6 7 4 5"
saved it and rebooted... no effect |
It works for me if I put it into a file named .xprofile in the home directory of the user that want's to use the mouse wheel. From the '#' in the begining of the line #nano ~/.profile, I would guess that you create a file named .profile in the home directory of the superuser root. Is that really what you want to do?
If not, try as a normal user and insert the mentioned command. You also don't need to reboot, just end your KDE session and log in again. |
|
Back to top |
|
|
n1maddin n00b
Joined: 11 May 2005 Posts: 51
|
Posted: Tue May 17, 2005 10:39 pm Post subject: |
|
|
furanku wrote: |
From the '#' in the begining of the line #nano ~/.profile, I would guess that you create a file named .profile in the home directory of the superuser root. Is that really what you want to do?
If not, try as a normal user and insert the mentioned command |
Thats it, that solved my problem... thx allot!!
...
well, since we are talking about problems ... i allways have to change something on my keyboard setting in the controll-center to get my AT-symbole and ~-symbol working... it does not matter what is being changed, anything will work... but something has to be changed in order to get it work... any clues? |
|
Back to top |
|
|
furanku l33t
Joined: 08 May 2003 Posts: 905 Location: Hamburg, Germany
|
Posted: Wed May 18, 2005 12:27 pm Post subject: |
|
|
n1maddin wrote: | Thats it, that solved my problem... thx allot!! | Fine!
n1maddin wrote: | well, since we are talking about problems ... i allways have to change something on my keyboard setting in the controll-center to get my AT-symbole and ~-symbol working... it does not matter what is being changed, anything will work... but something has to be changed in order to get it work... any clues? |
I'm a bit surprised that once you changed the keyboard settings in KDE's control center and saved these changes you still have to redo the changes after the next login. But, anyway, my guess is that you use a wrong keyboard layout in your /etc/X11/xorg.conf or /etc/X11/XF86config. Take a look at the section for the keyboard, it could look loke that:
Code: | Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
|
You can lookup a list of supported keyboard layouts in /usr/X11R6/lib/X11/xkb/rules/xfree86.lst (I hope xorg still comes with that file, I'm at work on an old xfree system at the moment.) I don't know what kind of keyboard you have, but most standard keyboards are one of these Code: | pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
| So, my advice would be to try these in the line 'Option "XkbModel" "pc104"'. You also don't need to reboot your computer for the changes to get in effect, just restart your X Server. Also be sure to select the right language specific layout.
Hope to help,
Frank |
|
Back to top |
|
|
amzuk Tux's lil' helper
Joined: 30 Apr 2005 Posts: 79 Location: RF/Krasnodar
|
Posted: Wed May 18, 2005 1:31 pm Post subject: |
|
|
does somebody know how to do that for gdm?
thanks in advance! _________________ When your problem is resolved, put [SOLVED] in the topic. |
|
Back to top |
|
|
koroumel Guru
Joined: 17 Jun 2004 Posts: 339 Location: Athens, Greece
|
Posted: Wed May 18, 2005 1:51 pm Post subject: |
|
|
for gdm, create a file in /etc/X11/xinit/ called Xmodmap. It it type : -e "pointer = 1 2 3 6 7 4 5", or whatever your configuration is. I recall it from memory, as I did it a while ago and deleted it recenlty (moved to kde). _________________ "Yep linux is an alternative. Windows on the other hand isn't even an option"
Registered Linux User No #242616 |
|
Back to top |
|
|
koroumel Guru
Joined: 17 Jun 2004 Posts: 339 Location: Athens, Greece
|
Posted: Wed May 18, 2005 2:01 pm Post subject: |
|
|
Correction,
in file /etc/X11/xinit/Xmodmap, you need to have :
pointer = 1 2 3 6 7 4 5
and not -e "pointer = 1 2 3 6 7 4 5" _________________ "Yep linux is an alternative. Windows on the other hand isn't even an option"
Registered Linux User No #242616 |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Wed May 18, 2005 2:22 pm Post subject: |
|
|
koroumel, you can edit the previous post to fix mistake too. Helps clean up forums and reduce noob problem who might not read next post. |
|
Back to top |
|
|
koroumel Guru
Joined: 17 Jun 2004 Posts: 339 Location: Athens, Greece
|
Posted: Wed May 18, 2005 3:04 pm Post subject: |
|
|
I'm at work and my brain is not really working for anything right now (too many lines of code in one day).. thnx for reminding me though _________________ "Yep linux is an alternative. Windows on the other hand isn't even an option"
Registered Linux User No #242616 |
|
Back to top |
|
|
furanku l33t
Joined: 08 May 2003 Posts: 905 Location: Hamburg, Germany
|
Posted: Wed May 18, 2005 3:13 pm Post subject: |
|
|
I don't have gnome/gdm installed, but the line in /usr/portage/gnome-base/gdm/files/2.6.0/Xsession looks like gdm also takes care of ~/.xprofile or /etc/xprofile. It's not that I think that that solution is the best way (yet another config file...), but if it works under kdm and gdm, maybe one should respect that the gentoo KDE and Gnome maintainers agreed at least on one file where to set up your X11 configuration?
Could anyone of the Gnome users test if the xmodmap command can be also put in ~/.xprofile or /etc/xprofile?
Thanks,
Frank |
|
Back to top |
|
|
amzuk Tux's lil' helper
Joined: 30 Apr 2005 Posts: 79 Location: RF/Krasnodar
|
Posted: Wed May 18, 2005 8:00 pm Post subject: |
|
|
got it working
/etc/X11/Xmodmap - the correct one (i guess for both) _________________ When your problem is resolved, put [SOLVED] in the topic. |
|
Back to top |
|
|
n1maddin n00b
Joined: 11 May 2005 Posts: 51
|
Posted: Wed May 18, 2005 10:10 pm Post subject: |
|
|
furanku wrote: | n1maddin wrote: | Thats it, that solved my problem... thx allot!! | Fine!
n1maddin wrote: | well, since we are talking about problems ... i allways have to change something on my keyboard setting in the controll-center to get my AT-symbole and ~-symbol working... it does not matter what is being changed, anything will work... but something has to be changed in order to get it work... any clues? |
I'm a bit surprised that once you changed the keyboard settings in KDE's control center and saved these changes you still have to redo the changes after the next login. But, anyway, my guess is that you use a wrong keyboard layout in your /etc/X11/xorg.conf or /etc/X11/XF86config. Take a look at the section for the keyboard, it could look loke that:
Code: | Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
|
You can lookup a list of supported keyboard layouts in /usr/X11R6/lib/X11/xkb/rules/xfree86.lst (I hope xorg still comes with that file, I'm at work on an old xfree system at the moment.) I don't know what kind of keyboard you have, but most standard keyboards are one of these Code: | pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
| So, my advice would be to try these in the line 'Option "XkbModel" "pc104"'. You also don't need to reboot your computer for the changes to get in effect, just restart your X Server. Also be sure to select the right language specific layout.
Hope to help,
Frank |
well, kde is saving my settings, at least it appears so, and I dont think it is setting that is causing my problem, since it is not important what is being changed... anything will work, but a change has to be made..
this is my xorg.conf (the important section):
Section "InputDevice"
Identifier "Keyboard1"
Driver "keyboard"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "de"
Option "XkbOptions" "grp:toggle,lv3:switch,grp_led:scroll,altwin:meta_alt"
EndSection |
|
Back to top |
|
|
|