LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-10-2022, 05:01 PM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
I keep losing my Xmodmap changes


I have my ~/.Xmodmap loaded at startup. I love it. Really, it's a very dear feature/mechanism to me.

However, I keep losing those changes. I wrote a script and set up a keyboard shortcut to reload ~/.Xmodmap because I have to do that multiple times every day. Something keeps killing my custom keyboard layout and reverting it to defaults.

Why does that happen? Is there something I can do about it?

Note: it's a USB keyboard. I've been using Linux for long enough to remember a time when USB media devices would be disconnected at random, including external hard disks during backup sessions. Maybe it's related.

TIA
 
Old 05-10-2022, 08:24 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
A web search for "xmodmap save changes" turns up a number of articles and forum threads that might be helpful.

This one looks like a good place to start: https://unix.stackexchange.com/quest...nges-permanent
 
Old 05-10-2022, 11:06 PM   #3
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by frankbell View Post
A web search for "xmodmap save changes" turns up a number of articles and forum threads that might be helpful.

This one looks like a good place to start: https://unix.stackexchange.com/quest...nges-permanent
That thread is about keeping the changes after sleep/resume. My case does not involve any sleep/resume. In fact, my changes are always intact after sleep/resume. I lose my changes during regular use.
 
Old 05-10-2022, 11:48 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by lucmove View Post
Something keeps killing my custom keyboard layout and reverting it to defaults.
I have similar problems whenever I connect/disconnect an external keyboard - Xorg reverts to the server defaults (set somewhere in /etc/X11). Just like you I had a script that would reapply these settings until I figured out how to make them under /etc/X11 instead.
Code:
$ cat /etc/X11/xorg.conf.d/01-keyboard-layout.conf
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "fi"
        #Option "XkbModel" "pc104"
        #Option "XkbVariant" ",dvorak"
        #Option "XkbOptions" "grp:alt_shift_toggle"
EndSection
# wiki.archlinux.org/index.php/Xorg/Keyboard_configuration#Using_X_configuration_files
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Option to use either `linge-xmodmap` or `camswap-xmodmap` in .bashrc Faki Linux - Newbie 2 03-13-2022 10:00 AM
LXer: Technology Changes Us, Changes Society, and Changes Governments LXer Syndicated Linux News 0 10-10-2016 02:00 PM
losing DSL, losing GRUB controller andreas_skw Linux - Newbie 4 06-14-2008 01:36 AM
losing DSL, losing GRUB controller andreas_skw Linux - Newbie 1 06-10-2008 11:46 AM
keep losing data from /usr bdp Linux - General 4 07-06-2002 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:05 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