LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Autoload Xmodmap upon KDM login. (https://www.linuxquestions.org/questions/linux-desktop-74/autoload-xmodmap-upon-kdm-login-527635/)

unreal128 02-11-2007 04:56 PM

Autoload Xmodmap upon KDM login.
 
I am going nuts trying to autoload my Xmodmap file upon login via KDM. I checked out the /usr/kde/<version>/share/config/kdm/Xsession file and it executes /etc/xprofile if present. I went ahead and added the line...
/usr/bin/xmodmap /etc/X11/xmodmap
...but when I restart KDM and login, the keys don't work. I run the same command from Xsession at the prompt as root and it works? KDM runs as root; I am not quite sure why it isn't executing the command successfully.

Please help! I am running KDE 3.5.5 on kernel 2.6.19-gentoo-r5.

Brian1 02-12-2007 04:52 PM

Where is the Xmodmap you wanting to change and have load?

If using the one in /etc/X11 then you spelled it wrong based on your post.
You have /etc/X11/xmodmap
My system has /etc/X11/Xmodmap

Now the one referring to /usr/bin/xmodmap is probably the executable file xmodmap.

Brian

unreal128 02-13-2007 11:39 PM

I created a file in /etc/X11 called xmodmap myself. My problem was that I made it execute xmodmap in xprofile, which is instantiated before xinit starts. I went ahead and made an /etc/X11/Xmodmap file with the key information I want loaded. xinit is supposed to run this file but for some reason it still is not working. :scratch:

Brian1 02-15-2007 04:16 PM

No other ideas at this time. Post the contents of the file.

Brian

unreal128 02-15-2007 08:39 PM

! keycode additions for the forward and backwards buttons
keycode 159 = XF86LaunchA
keycode 233 = F20
keycode 234 = F19

The file works when I run xmodmap /etc/X11/Xmodmap but for some reason xinit isn't executing it even though the xinitrc scripts are setup to execute it. I am wondering if I should add some logging features to the script.

HappyTux 02-15-2007 09:04 PM

Quote:

Originally Posted by unreal128
I am going nuts trying to autoload my Xmodmap file upon login via KDM. I checked out the /usr/kde/<version>/share/config/kdm/Xsession file and it executes /etc/xprofile if present. I went ahead and added the line...
/usr/bin/xmodmap /etc/X11/xmodmap
...but when I restart KDM and login, the keys don't work. I run the same command from Xsession at the prompt as root and it works? KDM runs as root; I am not quite sure why it isn't executing the command successfully.

Please help! I am running KDE 3.5.5 on kernel 2.6.19-gentoo-r5.

Try creating a /home/user_name/.Xmodmap with your settings in it then chmod +x /home/user_name/.Xmodmap to make it executable and it should be run on login.

unreal128 02-18-2007 04:55 PM

I tried that and it still isn't working. When I run startx from console instead of KDM instantiating it, the Xmodmap gets loaded.

HappyTux 02-18-2007 05:46 PM

Quote:

Originally Posted by unreal128
I tried that and it still isn't working. When I run startx from console instead of KDM instantiating it, the Xmodmap gets loaded.

Weird that works in Debian you could always try a couple of lines like this in your ~/.bash_profile.

Code:

# include .Xmodmap if it exists
if [ -f ~/.Xmodmap ]; then
    . ~/.Xmodmap
fi

Or even if your ~/.bashrc is getting sourced.

Code:

xmodmap -e keycode 159 = XF86LaunchA
xmodmap -e keycode 233 = F20
xmodmap -e keycode 234 = F19


unreal128 02-18-2007 07:01 PM

Thanks for the suggestion; this works for now but is pretty ghetto.


All times are GMT -5. The time now is 08:12 PM.