LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-13-2017, 06:05 PM   #1
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 247

Rep: Reputation: 19
14.2/x86_64: xmodmap not run when X starts


All my systems remap the left ctrl and caps lock keys using ~/.Xmodmap. On my desktop ~/.xinitrc contains the lines:

usermodmap=$HOME/.Xmodmap
/usr/bin/modmap $HOME/.Xmodmap
userresources=$HOME/.Xresources
sysmodmap=$HOME/.Xmodmap

just to cover all bases. It works well here.

But, on a couple of laptops the same set of commands fail to work; I need to manually enter them on the CLI to invoke the change.

I would appreciate your thoughts on what might cause this. Is it hardware related? It's been a continuing issue for a long time and I would like to resolve it.
 
Old 11-13-2017, 06:38 PM   #2
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware, Crux, NetBSD
Posts: 1,318

Rep: Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784
Quote:
Originally Posted by rshepard View Post
/usr/bin/modmap $HOME/.Xmodmap
I take it that's a typo?
 
Old 11-14-2017, 09:23 AM   #3
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 247

Original Poster
Rep: Reputation: 19
Gerard,

Yes, it was a typo. The command is xmodmap.

Rich
 
Old 11-14-2017, 09:52 AM   #4
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 178

Rep: Reputation: 119Reputation: 119
Hi,

Quote:
Originally Posted by rshepard View Post
All my systems remap the left ctrl and caps lock keys using ~/.Xmodmap. On my desktop ~/.xinitrc contains the lines:

usermodmap=$HOME/.Xmodmap
/usr/bin/modmap $HOME/.Xmodmap
userresources=$HOME/.Xresources
sysmodmap=$HOME/.Xmodmap

just to cover all bases. It works well here.

But, on a couple of laptops the same set of commands fail to work; I need to manually enter them on the CLI to invoke the change.

I would appreciate your thoughts on what might cause this. Is it hardware related? It's been a continuing issue for a long time and I would like to resolve it.
I have the same issue (remap Caps Lock) since slackware-14.1. I never found a solution so I manually execute xmodmap after starting X (fluxbox).
 
Old 11-14-2017, 10:19 AM   #5
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware, Crux, NetBSD
Posts: 1,318

Rep: Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784
If you're booting to runlevel 4 and, therefore, not using startx, ~/.xinitrc won't be sourced unless you source it in ~/.xsession

Last edited by Gerard Lally; 11-14-2017 at 10:22 AM.
 
Old 11-14-2017, 10:26 AM   #6
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 178

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by Gerard Lally View Post
If you're not using startx then ~/.xinitrc won't be sourced unless you source it in ~/.xsession
I don't know if you ask me or rshepard. I use startx to launch X. All commands in ~/.xinitrc are executed. My problem is remapping Caps Lock because xmodmap is executed successfully with startx if I don't remap Caps Lock but fails if I remap it. It works only manually after startx. I never knew why.

Last edited by Thom1b; 11-14-2017 at 10:27 AM. Reason: forgot a word
 
Old 11-15-2017, 09:43 AM   #7
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 247

Original Poster
Rep: Reputation: 19
I'll clarify: all my systems start in runlevel 3. Most of the time I'll use startx (an alias for startxfce4). Some times I'll work in a console.

On my desktop, xmodkeys loads ~/.Xmodkeys consistently. On the laptops it does not do this. Three laptops involved: Dell Latitude E5410, Dell Latitude 2100, and Lenovo ThinkPad X200.
 
Old 11-15-2017, 03:17 PM   #8
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware, Crux, NetBSD
Posts: 1,318

Rep: Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784
Quote:
Originally Posted by rshepard View Post
I'll clarify: all my systems start in runlevel 3. Most of the time I'll use startx (an alias for startxfce4). Some times I'll work in a console.

On my desktop, xmodkeys loads ~/.Xmodkeys consistently. On the laptops it does not do this. Three laptops involved: Dell Latitude E5410, Dell Latitude 2100, and Lenovo ThinkPad X200.
Strange one. Does it work if you plug the desktop keyboard into one of the laptops?
 
Old 11-19-2017, 11:00 AM   #9
navigium
Member
 
Registered: Aug 2014
Location: Switzerland
Distribution: Slackware, Debian, FreeBSD
Posts: 91

Rep: Reputation: 48
One problem I occasionally run into: The xmodmap command only affects the keyboards that are present when you run the command. If you later plug in an external keyboard or even if you unplug the external keyboard and reconnect it, the changes are lost. You need to re-run xmodmap.
 
  


Reply

Tags
laptops, 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
[SOLVED] 14.1: ~/.Xmodmap Not Implemented When X Starts; Fails During Use rshepard Slackware 21 04-27-2014 12:03 AM
[SOLVED] Slackware-14.0/x86_64: .~/Xmodmap no longer runs within ~/.xinitrc rshepard Slackware 4 04-10-2013 01:11 PM
[SOLVED] Best way to run xmodmap on mint 10 Tim Johnson Linux Mint 9 02-09-2011 02:44 PM
How to run xmodmap at the start of an X session? johnsfine MEPIS 4 06-02-2009 10:00 AM
[SOLVED] Upgrade to -12.1 and xmodmap is not run rshepard Slackware - Installation 0 12-09-2008 01:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:19 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration