File ~/.Xmodmap is not sourced on startup in 18.04 Announcing the arrival of Valued Associate...

Is there a documented rationale why the House Ways and Means chairman can demand tax info?

How can I make names more distinctive without making them longer?

Why is "Consequences inflicted." not a sentence?

If a contract sometimes uses the wrong name, is it still valid?

How to deal with a team lead who never gives me credit?

What do you call a plan that's an alternative plan in case your initial plan fails?

Should I call the interviewer directly, if HR aren't responding?

If Jon Snow became King of the Seven Kingdoms what would his regnal number be?

Sorting numerically

When to stop saving and start investing?

Did Xerox really develop the first LAN?

Can Pao de Queijo, and similar foods, be kosher for Passover?

Disable hyphenation for an entire paragraph

Single word antonym of "flightless"

How to find all the available tools in macOS terminal?

Is the Standard Deduction better than Itemized when both are the same amount?

How to recreate this effect in Photoshop?

Antler Helmet: Can it work?

Why was the term "discrete" used in discrete logarithm?

How can I fade player when goes inside or outside of the area?

Doubts about chords

Is 1 ppb equal to 1 μg/kg?

If 'B is more likely given A', then 'A is more likely given B'

How does cp -a work



File ~/.Xmodmap is not sourced on startup in 18.04



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How do I set Xmodmap on login?Diagnosing xmodmap errors.Xmodmap works only when automatic login disabled?remap right alt to behave as right ctrlSetting Xmodmap on login in Lubuntu 13.10alt-f2 stops working and other issues when using a mac keyboard on 12.04Insert a unicode character via keyboard shortcut, xmodmap chooser not workingRun a command every time a change in keyboard hardware is detectedHow to remap XF86Sleep key to space---xmodmap, xkbcomp & udev failImp Pt (Screenshot) key not recognized / not working - Ubuntu 17.10Failed update to 18.04, no GNOME or any desktop





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







4















I have a custom key mapping in the file ~/.Xmodmap which can be activated by running xmodmap ~/.Xmodmap.



However, I want this to happen automatically when I login. I have tried the following without success:





  • ~/.xinitrc with content xmodmap ~/.Xmodmap, as suggested here


  • ~/.xsession with content xmodmap ~/.Xmodmap, as suggested here


  • ~/.xsessionrc with content xmodmap ~/.Xmodmap, as suggested here


Obviously something is going wrong, but what? And how can I fix this?










share|improve this question





























    4















    I have a custom key mapping in the file ~/.Xmodmap which can be activated by running xmodmap ~/.Xmodmap.



    However, I want this to happen automatically when I login. I have tried the following without success:





    • ~/.xinitrc with content xmodmap ~/.Xmodmap, as suggested here


    • ~/.xsession with content xmodmap ~/.Xmodmap, as suggested here


    • ~/.xsessionrc with content xmodmap ~/.Xmodmap, as suggested here


    Obviously something is going wrong, but what? And how can I fix this?










    share|improve this question

























      4












      4








      4








      I have a custom key mapping in the file ~/.Xmodmap which can be activated by running xmodmap ~/.Xmodmap.



      However, I want this to happen automatically when I login. I have tried the following without success:





      • ~/.xinitrc with content xmodmap ~/.Xmodmap, as suggested here


      • ~/.xsession with content xmodmap ~/.Xmodmap, as suggested here


      • ~/.xsessionrc with content xmodmap ~/.Xmodmap, as suggested here


      Obviously something is going wrong, but what? And how can I fix this?










      share|improve this question














      I have a custom key mapping in the file ~/.Xmodmap which can be activated by running xmodmap ~/.Xmodmap.



      However, I want this to happen automatically when I login. I have tried the following without success:





      • ~/.xinitrc with content xmodmap ~/.Xmodmap, as suggested here


      • ~/.xsession with content xmodmap ~/.Xmodmap, as suggested here


      • ~/.xsessionrc with content xmodmap ~/.Xmodmap, as suggested here


      Obviously something is going wrong, but what? And how can I fix this?







      18.04 keyboard keyboard-layout xmodmap xinit






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 14 '18 at 10:11









      MuadDevMuadDev

      234




      234






















          3 Answers
          3






          active

          oldest

          votes


















          2














          Apparently for gnome it should be ~/.xprofile, but that file is executed too early for xmodmap to work.



          So I got it to work by creating .config/autostart/xmodmap.desktop



          [Desktop Entry]
          Type=Application
          Exec=/home/tvbox/bin/modmap
          Hidden=false
          X-GNOME-Autostart-enabled=true
          Name=xmodmap
          Comment=xmodmap script


          And in /home/tvbox/bin/modmap, I have:



          xmodmap ~/.Xmodmap





          share|improve this answer


























          • Thanks! Although I solved it eventually using another method: You can change key behaviour in the following file /usr/share/X11/xkb/symbols/pc

            – MuadDev
            Nov 1 '18 at 15:46



















          0














          I tried the solution found here but somehow it didn't work. After a few days searching and experimenting, finally I found the culprit, i.e. Wayland.



          My system is Ubuntu 18.10 and I used to log in per default. However recently I changed to Ubuntu on Wayland at login manager and since then my ~/.Xmodmap stopped working.



          As I read on other sites, Wayland uses xkb instead of xmodmap. However it's still cumbersome to configure xkb. So for an average user like me the temporary solution is to switch back to Ubuntu at login screen. I hope this help other people who experience similar issue.






          share|improve this answer































            0














            ~/.xinitrc with content xmodmap ~/.Xmodmap works in Ubuntu 18.04. Just try rebooting your system and see if it works.



            EDIT

            I noticed that when I boot the Ubuntu my custom keymaps work but when I lock the screen and log back in, it stops to work. I'm trying to figure out the workarounds.






            share|improve this answer


























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "89"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1083637%2ffile-xmodmap-is-not-sourced-on-startup-in-18-04%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              Apparently for gnome it should be ~/.xprofile, but that file is executed too early for xmodmap to work.



              So I got it to work by creating .config/autostart/xmodmap.desktop



              [Desktop Entry]
              Type=Application
              Exec=/home/tvbox/bin/modmap
              Hidden=false
              X-GNOME-Autostart-enabled=true
              Name=xmodmap
              Comment=xmodmap script


              And in /home/tvbox/bin/modmap, I have:



              xmodmap ~/.Xmodmap





              share|improve this answer


























              • Thanks! Although I solved it eventually using another method: You can change key behaviour in the following file /usr/share/X11/xkb/symbols/pc

                – MuadDev
                Nov 1 '18 at 15:46
















              2














              Apparently for gnome it should be ~/.xprofile, but that file is executed too early for xmodmap to work.



              So I got it to work by creating .config/autostart/xmodmap.desktop



              [Desktop Entry]
              Type=Application
              Exec=/home/tvbox/bin/modmap
              Hidden=false
              X-GNOME-Autostart-enabled=true
              Name=xmodmap
              Comment=xmodmap script


              And in /home/tvbox/bin/modmap, I have:



              xmodmap ~/.Xmodmap





              share|improve this answer


























              • Thanks! Although I solved it eventually using another method: You can change key behaviour in the following file /usr/share/X11/xkb/symbols/pc

                – MuadDev
                Nov 1 '18 at 15:46














              2












              2








              2







              Apparently for gnome it should be ~/.xprofile, but that file is executed too early for xmodmap to work.



              So I got it to work by creating .config/autostart/xmodmap.desktop



              [Desktop Entry]
              Type=Application
              Exec=/home/tvbox/bin/modmap
              Hidden=false
              X-GNOME-Autostart-enabled=true
              Name=xmodmap
              Comment=xmodmap script


              And in /home/tvbox/bin/modmap, I have:



              xmodmap ~/.Xmodmap





              share|improve this answer















              Apparently for gnome it should be ~/.xprofile, but that file is executed too early for xmodmap to work.



              So I got it to work by creating .config/autostart/xmodmap.desktop



              [Desktop Entry]
              Type=Application
              Exec=/home/tvbox/bin/modmap
              Hidden=false
              X-GNOME-Autostart-enabled=true
              Name=xmodmap
              Comment=xmodmap script


              And in /home/tvbox/bin/modmap, I have:



              xmodmap ~/.Xmodmap






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Oct 29 '18 at 21:47









              guntbert

              9,516133170




              9,516133170










              answered Oct 29 '18 at 21:14









              erwanerwan

              1363




              1363













              • Thanks! Although I solved it eventually using another method: You can change key behaviour in the following file /usr/share/X11/xkb/symbols/pc

                – MuadDev
                Nov 1 '18 at 15:46



















              • Thanks! Although I solved it eventually using another method: You can change key behaviour in the following file /usr/share/X11/xkb/symbols/pc

                – MuadDev
                Nov 1 '18 at 15:46

















              Thanks! Although I solved it eventually using another method: You can change key behaviour in the following file /usr/share/X11/xkb/symbols/pc

              – MuadDev
              Nov 1 '18 at 15:46





              Thanks! Although I solved it eventually using another method: You can change key behaviour in the following file /usr/share/X11/xkb/symbols/pc

              – MuadDev
              Nov 1 '18 at 15:46













              0














              I tried the solution found here but somehow it didn't work. After a few days searching and experimenting, finally I found the culprit, i.e. Wayland.



              My system is Ubuntu 18.10 and I used to log in per default. However recently I changed to Ubuntu on Wayland at login manager and since then my ~/.Xmodmap stopped working.



              As I read on other sites, Wayland uses xkb instead of xmodmap. However it's still cumbersome to configure xkb. So for an average user like me the temporary solution is to switch back to Ubuntu at login screen. I hope this help other people who experience similar issue.






              share|improve this answer




























                0














                I tried the solution found here but somehow it didn't work. After a few days searching and experimenting, finally I found the culprit, i.e. Wayland.



                My system is Ubuntu 18.10 and I used to log in per default. However recently I changed to Ubuntu on Wayland at login manager and since then my ~/.Xmodmap stopped working.



                As I read on other sites, Wayland uses xkb instead of xmodmap. However it's still cumbersome to configure xkb. So for an average user like me the temporary solution is to switch back to Ubuntu at login screen. I hope this help other people who experience similar issue.






                share|improve this answer


























                  0












                  0








                  0







                  I tried the solution found here but somehow it didn't work. After a few days searching and experimenting, finally I found the culprit, i.e. Wayland.



                  My system is Ubuntu 18.10 and I used to log in per default. However recently I changed to Ubuntu on Wayland at login manager and since then my ~/.Xmodmap stopped working.



                  As I read on other sites, Wayland uses xkb instead of xmodmap. However it's still cumbersome to configure xkb. So for an average user like me the temporary solution is to switch back to Ubuntu at login screen. I hope this help other people who experience similar issue.






                  share|improve this answer













                  I tried the solution found here but somehow it didn't work. After a few days searching and experimenting, finally I found the culprit, i.e. Wayland.



                  My system is Ubuntu 18.10 and I used to log in per default. However recently I changed to Ubuntu on Wayland at login manager and since then my ~/.Xmodmap stopped working.



                  As I read on other sites, Wayland uses xkb instead of xmodmap. However it's still cumbersome to configure xkb. So for an average user like me the temporary solution is to switch back to Ubuntu at login screen. I hope this help other people who experience similar issue.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 26 at 17:29









                  slaiaslaia

                  11




                  11























                      0














                      ~/.xinitrc with content xmodmap ~/.Xmodmap works in Ubuntu 18.04. Just try rebooting your system and see if it works.



                      EDIT

                      I noticed that when I boot the Ubuntu my custom keymaps work but when I lock the screen and log back in, it stops to work. I'm trying to figure out the workarounds.






                      share|improve this answer






























                        0














                        ~/.xinitrc with content xmodmap ~/.Xmodmap works in Ubuntu 18.04. Just try rebooting your system and see if it works.



                        EDIT

                        I noticed that when I boot the Ubuntu my custom keymaps work but when I lock the screen and log back in, it stops to work. I'm trying to figure out the workarounds.






                        share|improve this answer




























                          0












                          0








                          0







                          ~/.xinitrc with content xmodmap ~/.Xmodmap works in Ubuntu 18.04. Just try rebooting your system and see if it works.



                          EDIT

                          I noticed that when I boot the Ubuntu my custom keymaps work but when I lock the screen and log back in, it stops to work. I'm trying to figure out the workarounds.






                          share|improve this answer















                          ~/.xinitrc with content xmodmap ~/.Xmodmap works in Ubuntu 18.04. Just try rebooting your system and see if it works.



                          EDIT

                          I noticed that when I boot the Ubuntu my custom keymaps work but when I lock the screen and log back in, it stops to work. I'm trying to figure out the workarounds.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited 12 mins ago

























                          answered 18 mins ago









                          David JungDavid Jung

                          11




                          11






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Ask Ubuntu!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1083637%2ffile-xmodmap-is-not-sourced-on-startup-in-18-04%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Is there a lightweight tool to crop images quickly?Cropping Images using Command Line Tools OnlyHow to crop...

                              List of shipwrecks in 1808...

                              Unit packagekit.service is masked Announcing the arrival of Valued Associate #679: Cesar...