LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Under xfce 4.10, ~/.Xmodmap is not working on login (http://www.linuxquestions.org/questions/slackware-14/under-xfce-4-10-%7E-xmodmap-is-not-working-on-login-4175437978/)

kite 11-20-2012 10:53 AM

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?

ponce 11-20-2012 11:45 AM

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

kite 11-20-2012 09:27 PM

Quote:

Originally Posted by ponce (Post 4833419)
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.

ljb643 11-21-2012 04:43 PM

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.

croxen 11-22-2012 07:39 AM

Quote:

Originally Posted by kite (Post 4833725)
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.

kite 11-22-2012 07:48 PM

Quote:

Originally Posted by croxen (Post 4834776)
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.

croxen 11-24-2012 09:08 AM

Quote:

Originally Posted by kite (Post 4835168)
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.

kite 11-25-2012 04:28 AM

Quote:

Originally Posted by croxen (Post 4836046)
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.


All times are GMT -5. The time now is 09:25 PM.