LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-20-2012, 10:53 AM   #1
kite
Member
 
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 301

Rep: Reputation: 47
Under xfce 4.10, ~/.Xmodmap is not working on login


Code:
bash-4.2$ cat ~/.Xmodmap 
remove control = Control_L
remove mod4 = Super_L Hyper_L
keysym Control_L = Super_L Hyper_L
keysym Super_L = Control_L
add control = Control_L
add mod4 = Super_L Hyper_L
I even tried to put "/usr/bin/xmodmap ~/.Xmodmap" into ~/.profile and ~/.xprofile, or add a autostart in xfce session setting, but no effect.

Manually running "/usr/bin/xmodmap ~/.Xmodmap" after xfce4.10 is started works just fine though.

What could be wrong?
 
Old 11-20-2012, 11:45 AM   #2
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,434

Rep: Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867
if you start on runlevel 3 (text login) and then you start the graphical session with startx, add the xmodmap line on top of your ~/.xinitrc
 
Old 11-20-2012, 09:27 PM   #3
kite
Member
 
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 301

Original Poster
Rep: Reputation: 47
Quote:
Originally Posted by ponce View Post
if you start on runlevel 3 (text login) and then you start the graphical session with startx, add the xmodmap line on top of your ~/.xinitrc
Your proposed approach works for fluxbox, but does not work for xfce4.10. Perhaps xfce4.10 does some reset of mapping.
 
Old 11-21-2012, 04:43 PM   #4
ljb643
Member
 
Registered: Nov 2003
Posts: 269

Rep: Reputation: Disabled
I tried a simple test of this, swapping 2 keys using ~/.Xmodmap, and it worked. This is with Slackware-14, xfce-4.10, xdm login. So I think there is something else going on here. I would try the lines you have above, except I'm not sure what they do or how to test to see if it works for me.

I know ~/.Xmodmap is loaded through /etc/X11/xinit/xinitrc.xfce so unless your login skips that, or something is overriding it, it should work.
 
Old 11-22-2012, 07:39 AM   #5
croxen
Member
 
Registered: May 2002
Posts: 80

Rep: Reputation: 22
Quote:
Originally Posted by kite View Post
Your proposed approach works for fluxbox, but does not work for xfce4.10. Perhaps xfce4.10 does some reset of mapping.
I had this issue off and on for years at least back to Slack 12.2 with various versions of xfce4, which seems almost never to work smoothly with .Xmodmap. I finally stopped worrying about it by incorporating all my keys settings into a small "keys.txt" file and adding
Code:
xmodmap keys.txt
to "Settings" > "Session and Startup" > "Application autostart", so that it still loads automatically when xfce fires up.

This works consistently for me.
 
Old 11-22-2012, 07:48 PM   #6
kite
Member
 
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 301

Original Poster
Rep: Reputation: 47
Quote:
Originally Posted by croxen View Post
I had this issue off and on for years at least back to Slack 12.2 with various versions of xfce4, which seems almost never to work smoothly with .Xmodmap. I finally stopped worrying about it by incorporating all my keys settings into a small "keys.txt" file and adding
Code:
xmodmap keys.txt
to "Settings" > "Session and Startup" > "Application autostart", so that it still loads automatically when xfce fires up.

This works consistently for me.
This method is not working either. Weird. I added xmodmap /home/kite/xmodmap.txt to the xfce autostart. xmodmap.txt contains my keymapping.
 
Old 11-24-2012, 09:08 AM   #7
croxen
Member
 
Registered: May 2002
Posts: 80

Rep: Reputation: 22
Quote:
Originally Posted by kite View Post
This method is not working either. Weird. I added xmodmap /home/kite/xmodmap.txt to the xfce autostart. xmodmap.txt contains my keymapping.
If
Code:
xmodmap xmodmap.txt
works manually from a terminal, and only from a terminal, then perhaps your session startup line should be
Code:
xterm -e xmodmap xmodmap.txt
to run it out of a terminal also at session startup.
 
Old 11-25-2012, 04:28 AM   #8
kite
Member
 
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 301

Original Poster
Rep: Reputation: 47
Quote:
Originally Posted by croxen View Post
If
Code:
xmodmap xmodmap.txt
works manually from a terminal, and only from a terminal, then perhaps your session startup line should be
Code:
xterm -e xmodmap xmodmap.txt
to run it out of a terminal also at session startup.
This method works great. Thanks to all.
 
  


Reply

Tags
.xmodmap, xfce4.10, xmodmap


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
rpm not working from root login but working from user login amar.sree Linux - Newbie 2 08-09-2012 08:53 PM
xfce and .Xmodmap - difference from KDE and other window managers niels.horn Slackware 4 03-16-2009 05:23 AM
Autoload Xmodmap upon KDM login. unreal128 Linux - Desktop 8 02-18-2007 07:01 PM
RedHat 9 & Intellimouse buttons... xmodmap not working? gcwonnery Linux - Hardware 0 04-13-2006 04:52 PM
xmodmap not working in .xinitrc kmeehl Slackware 1 12-03-2004 05:14 PM


All times are GMT -5. The time now is 04:33 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration