LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-11-2007, 04:56 PM   #1
unreal128
Member
 
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207

Rep: Reputation: 30
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.
 
Old 02-12-2007, 04:52 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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
 
Old 02-13-2007, 11:39 PM   #3
unreal128
Member
 
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207

Original Poster
Rep: Reputation: 30
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.
 
Old 02-15-2007, 04:16 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
No other ideas at this time. Post the contents of the file.

Brian
 
Old 02-15-2007, 08:39 PM   #5
unreal128
Member
 
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207

Original Poster
Rep: Reputation: 30
! 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.
 
Old 02-15-2007, 09:04 PM   #6
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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.
 
Old 02-18-2007, 04:55 PM   #7
unreal128
Member
 
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207

Original Poster
Rep: Reputation: 30
I tried that and it still isn't working. When I run startx from console instead of KDM instantiating it, the Xmodmap gets loaded.
 
Old 02-18-2007, 05:46 PM   #8
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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
 
Old 02-18-2007, 07:01 PM   #9
unreal128
Member
 
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207

Original Poster
Rep: Reputation: 30
Thanks for the suggestion; this works for now but is pretty ghetto.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't login as user in KDM login manager mngmd Linux - Newbie 3 12-18-2005 05:55 AM
Can't login using kdm kriidler Slackware 8 07-17-2005 06:45 PM
xmodmap autoload in Slack w. Dropline Gnome Clojster Slackware 3 10-25-2004 02:02 PM
xmodmap & KDM ermic Mandriva 1 09-12-2004 08:08 AM
Cannot login with kdm guygriffiths Linux - Software 1 11-27-2003 04:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 11:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration