Load X resources when KDE starts on Linux Mint












1














I previously was using MATE and XTerm always starts with a black background. I'm not sure why, but when I start XTerm in KDE, I get a white background. This is terrible for me so I want to change this default behaviour.



I have attempted different solutions that are posted online but none of them work for me. Here are some of them:




  • Making a .Xdefaults file in the home directory and setting the options there

  • Making a .XTerm file in the home directory and setting the options there

  • Making a .Xresources file and setting the options there

  • Unchecking "Apply colors to non-KDE4 applications" in the KDE control center


An interesting thing to note is that under MATE, the XTerm background is black and foreground is white, but I'm not even sure why. I can't change the defaults in MATE either.



I also tried using the following command, and this works for the current session, but it seems that it doesn’t stay between sessions, and it gets annoying having to google this command every time I start up my computer



printf 'xterm*background: blacknxterm*foreground: whiten' | xrdb -merge


I am looking for a solution, not a workaround. Workarounds include things like starting xterm and explicitly specifying the background and foreground colors, or using an alias for XTerm, or setting the color after XTerm has started, or running a script before or during the use of XTerm. There has to be a cause to this problem somewhere and I'd like to find out what it is.



I'm using Linux Mint Nadia (13.04).










share|improve this question





























    1














    I previously was using MATE and XTerm always starts with a black background. I'm not sure why, but when I start XTerm in KDE, I get a white background. This is terrible for me so I want to change this default behaviour.



    I have attempted different solutions that are posted online but none of them work for me. Here are some of them:




    • Making a .Xdefaults file in the home directory and setting the options there

    • Making a .XTerm file in the home directory and setting the options there

    • Making a .Xresources file and setting the options there

    • Unchecking "Apply colors to non-KDE4 applications" in the KDE control center


    An interesting thing to note is that under MATE, the XTerm background is black and foreground is white, but I'm not even sure why. I can't change the defaults in MATE either.



    I also tried using the following command, and this works for the current session, but it seems that it doesn’t stay between sessions, and it gets annoying having to google this command every time I start up my computer



    printf 'xterm*background: blacknxterm*foreground: whiten' | xrdb -merge


    I am looking for a solution, not a workaround. Workarounds include things like starting xterm and explicitly specifying the background and foreground colors, or using an alias for XTerm, or setting the color after XTerm has started, or running a script before or during the use of XTerm. There has to be a cause to this problem somewhere and I'd like to find out what it is.



    I'm using Linux Mint Nadia (13.04).










    share|improve this question



























      1












      1








      1







      I previously was using MATE and XTerm always starts with a black background. I'm not sure why, but when I start XTerm in KDE, I get a white background. This is terrible for me so I want to change this default behaviour.



      I have attempted different solutions that are posted online but none of them work for me. Here are some of them:




      • Making a .Xdefaults file in the home directory and setting the options there

      • Making a .XTerm file in the home directory and setting the options there

      • Making a .Xresources file and setting the options there

      • Unchecking "Apply colors to non-KDE4 applications" in the KDE control center


      An interesting thing to note is that under MATE, the XTerm background is black and foreground is white, but I'm not even sure why. I can't change the defaults in MATE either.



      I also tried using the following command, and this works for the current session, but it seems that it doesn’t stay between sessions, and it gets annoying having to google this command every time I start up my computer



      printf 'xterm*background: blacknxterm*foreground: whiten' | xrdb -merge


      I am looking for a solution, not a workaround. Workarounds include things like starting xterm and explicitly specifying the background and foreground colors, or using an alias for XTerm, or setting the color after XTerm has started, or running a script before or during the use of XTerm. There has to be a cause to this problem somewhere and I'd like to find out what it is.



      I'm using Linux Mint Nadia (13.04).










      share|improve this question















      I previously was using MATE and XTerm always starts with a black background. I'm not sure why, but when I start XTerm in KDE, I get a white background. This is terrible for me so I want to change this default behaviour.



      I have attempted different solutions that are posted online but none of them work for me. Here are some of them:




      • Making a .Xdefaults file in the home directory and setting the options there

      • Making a .XTerm file in the home directory and setting the options there

      • Making a .Xresources file and setting the options there

      • Unchecking "Apply colors to non-KDE4 applications" in the KDE control center


      An interesting thing to note is that under MATE, the XTerm background is black and foreground is white, but I'm not even sure why. I can't change the defaults in MATE either.



      I also tried using the following command, and this works for the current session, but it seems that it doesn’t stay between sessions, and it gets annoying having to google this command every time I start up my computer



      printf 'xterm*background: blacknxterm*foreground: whiten' | xrdb -merge


      I am looking for a solution, not a workaround. Workarounds include things like starting xterm and explicitly specifying the background and foreground colors, or using an alias for XTerm, or setting the color after XTerm has started, or running a script before or during the use of XTerm. There has to be a cause to this problem somewhere and I'd like to find out what it is.



      I'm using Linux Mint Nadia (13.04).







      linux-mint session kde4 x-resources






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 2 '14 at 20:17









      Gilles

      530k12810611588




      530k12810611588










      asked Oct 2 '14 at 5:40









      9a3eedi9a3eedi

      1135




      1135






















          3 Answers
          3






          active

          oldest

          votes


















          1














          Do two things:




          • Add to your startup scripts the command xrdb -merge ~/.Xdefaults (or .Xresources, or actually whatever file you want to write your configuration to). Apparently any executable script in the folder $HOME/.kde/Autostart will be executed at startup when you use KDE as your destkop environment; I can't check because I don't use KDE.

          • Add the resources to that file.






          share|improve this answer































            0














            After randomly messing around with KDE themes for an unrelated issue, I have finally realized out why the XTerm background keeps being set as white only under KDE and not under any other desktop environment



            The reason: KDE theme colors.



            If you go to System Settings -> Application Appearance, under Colors, go to the Colors Tab, in the "Common Colors" color set, the "View Background" and the "View Text" determine the background and foreground colors of XTerm.



            Unfortunately, I'm not sure how to make a special case via KDE for XTerm colors, because for other applications do like to keep this color settings. I would appreciate any suggestions.






            share|improve this answer





























              0














              I know your question is for KDE Plasma 4, but the following is the solution at least for Plasma 5:



              Plasma 5 complies with the Freedesktop/XDG specification, including specifically the Desktop Application Autostart spec, meaning that it executes any .desktop files in $XDG_CONFIG_HOME/autostart. Assuming your system doesn't override XDG_CONFIG_HOME, then that directory will be ~/.config/autostart.



              So in my case, I have a file ~/.Xresources that sets my appropriate X resource settings, and I simply need to tell my desktop to load it. To do so, per the Autostart spec referenced above, I put the following file (I called it xrdb.desktop) in ~/.config/autostart:



              [Desktop Entry]
              Type=Application
              Name=X resources loader
              Exec=xrdb -merge .Xresources
              Comment=Load X resource files on startup of DE





              share|improve this answer





















                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "106"
                };
                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: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                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%2funix.stackexchange.com%2fquestions%2f158787%2fload-x-resources-when-kde-starts-on-linux-mint%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









                1














                Do two things:




                • Add to your startup scripts the command xrdb -merge ~/.Xdefaults (or .Xresources, or actually whatever file you want to write your configuration to). Apparently any executable script in the folder $HOME/.kde/Autostart will be executed at startup when you use KDE as your destkop environment; I can't check because I don't use KDE.

                • Add the resources to that file.






                share|improve this answer




























                  1














                  Do two things:




                  • Add to your startup scripts the command xrdb -merge ~/.Xdefaults (or .Xresources, or actually whatever file you want to write your configuration to). Apparently any executable script in the folder $HOME/.kde/Autostart will be executed at startup when you use KDE as your destkop environment; I can't check because I don't use KDE.

                  • Add the resources to that file.






                  share|improve this answer


























                    1












                    1








                    1






                    Do two things:




                    • Add to your startup scripts the command xrdb -merge ~/.Xdefaults (or .Xresources, or actually whatever file you want to write your configuration to). Apparently any executable script in the folder $HOME/.kde/Autostart will be executed at startup when you use KDE as your destkop environment; I can't check because I don't use KDE.

                    • Add the resources to that file.






                    share|improve this answer














                    Do two things:




                    • Add to your startup scripts the command xrdb -merge ~/.Xdefaults (or .Xresources, or actually whatever file you want to write your configuration to). Apparently any executable script in the folder $HOME/.kde/Autostart will be executed at startup when you use KDE as your destkop environment; I can't check because I don't use KDE.

                    • Add the resources to that file.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Oct 2 '14 at 20:17









                    Gilles

                    530k12810611588




                    530k12810611588










                    answered Oct 2 '14 at 11:01









                    celtschkceltschk

                    6,59611118




                    6,59611118

























                        0














                        After randomly messing around with KDE themes for an unrelated issue, I have finally realized out why the XTerm background keeps being set as white only under KDE and not under any other desktop environment



                        The reason: KDE theme colors.



                        If you go to System Settings -> Application Appearance, under Colors, go to the Colors Tab, in the "Common Colors" color set, the "View Background" and the "View Text" determine the background and foreground colors of XTerm.



                        Unfortunately, I'm not sure how to make a special case via KDE for XTerm colors, because for other applications do like to keep this color settings. I would appreciate any suggestions.






                        share|improve this answer


























                          0














                          After randomly messing around with KDE themes for an unrelated issue, I have finally realized out why the XTerm background keeps being set as white only under KDE and not under any other desktop environment



                          The reason: KDE theme colors.



                          If you go to System Settings -> Application Appearance, under Colors, go to the Colors Tab, in the "Common Colors" color set, the "View Background" and the "View Text" determine the background and foreground colors of XTerm.



                          Unfortunately, I'm not sure how to make a special case via KDE for XTerm colors, because for other applications do like to keep this color settings. I would appreciate any suggestions.






                          share|improve this answer
























                            0












                            0








                            0






                            After randomly messing around with KDE themes for an unrelated issue, I have finally realized out why the XTerm background keeps being set as white only under KDE and not under any other desktop environment



                            The reason: KDE theme colors.



                            If you go to System Settings -> Application Appearance, under Colors, go to the Colors Tab, in the "Common Colors" color set, the "View Background" and the "View Text" determine the background and foreground colors of XTerm.



                            Unfortunately, I'm not sure how to make a special case via KDE for XTerm colors, because for other applications do like to keep this color settings. I would appreciate any suggestions.






                            share|improve this answer












                            After randomly messing around with KDE themes for an unrelated issue, I have finally realized out why the XTerm background keeps being set as white only under KDE and not under any other desktop environment



                            The reason: KDE theme colors.



                            If you go to System Settings -> Application Appearance, under Colors, go to the Colors Tab, in the "Common Colors" color set, the "View Background" and the "View Text" determine the background and foreground colors of XTerm.



                            Unfortunately, I'm not sure how to make a special case via KDE for XTerm colors, because for other applications do like to keep this color settings. I would appreciate any suggestions.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Oct 16 '14 at 5:33









                            9a3eedi9a3eedi

                            1135




                            1135























                                0














                                I know your question is for KDE Plasma 4, but the following is the solution at least for Plasma 5:



                                Plasma 5 complies with the Freedesktop/XDG specification, including specifically the Desktop Application Autostart spec, meaning that it executes any .desktop files in $XDG_CONFIG_HOME/autostart. Assuming your system doesn't override XDG_CONFIG_HOME, then that directory will be ~/.config/autostart.



                                So in my case, I have a file ~/.Xresources that sets my appropriate X resource settings, and I simply need to tell my desktop to load it. To do so, per the Autostart spec referenced above, I put the following file (I called it xrdb.desktop) in ~/.config/autostart:



                                [Desktop Entry]
                                Type=Application
                                Name=X resources loader
                                Exec=xrdb -merge .Xresources
                                Comment=Load X resource files on startup of DE





                                share|improve this answer


























                                  0














                                  I know your question is for KDE Plasma 4, but the following is the solution at least for Plasma 5:



                                  Plasma 5 complies with the Freedesktop/XDG specification, including specifically the Desktop Application Autostart spec, meaning that it executes any .desktop files in $XDG_CONFIG_HOME/autostart. Assuming your system doesn't override XDG_CONFIG_HOME, then that directory will be ~/.config/autostart.



                                  So in my case, I have a file ~/.Xresources that sets my appropriate X resource settings, and I simply need to tell my desktop to load it. To do so, per the Autostart spec referenced above, I put the following file (I called it xrdb.desktop) in ~/.config/autostart:



                                  [Desktop Entry]
                                  Type=Application
                                  Name=X resources loader
                                  Exec=xrdb -merge .Xresources
                                  Comment=Load X resource files on startup of DE





                                  share|improve this answer
























                                    0












                                    0








                                    0






                                    I know your question is for KDE Plasma 4, but the following is the solution at least for Plasma 5:



                                    Plasma 5 complies with the Freedesktop/XDG specification, including specifically the Desktop Application Autostart spec, meaning that it executes any .desktop files in $XDG_CONFIG_HOME/autostart. Assuming your system doesn't override XDG_CONFIG_HOME, then that directory will be ~/.config/autostart.



                                    So in my case, I have a file ~/.Xresources that sets my appropriate X resource settings, and I simply need to tell my desktop to load it. To do so, per the Autostart spec referenced above, I put the following file (I called it xrdb.desktop) in ~/.config/autostart:



                                    [Desktop Entry]
                                    Type=Application
                                    Name=X resources loader
                                    Exec=xrdb -merge .Xresources
                                    Comment=Load X resource files on startup of DE





                                    share|improve this answer












                                    I know your question is for KDE Plasma 4, but the following is the solution at least for Plasma 5:



                                    Plasma 5 complies with the Freedesktop/XDG specification, including specifically the Desktop Application Autostart spec, meaning that it executes any .desktop files in $XDG_CONFIG_HOME/autostart. Assuming your system doesn't override XDG_CONFIG_HOME, then that directory will be ~/.config/autostart.



                                    So in my case, I have a file ~/.Xresources that sets my appropriate X resource settings, and I simply need to tell my desktop to load it. To do so, per the Autostart spec referenced above, I put the following file (I called it xrdb.desktop) in ~/.config/autostart:



                                    [Desktop Entry]
                                    Type=Application
                                    Name=X resources loader
                                    Exec=xrdb -merge .Xresources
                                    Comment=Load X resource files on startup of DE






                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered 17 mins ago









                                    villapxvillapx

                                    21028




                                    21028






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                        • 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.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • 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%2funix.stackexchange.com%2fquestions%2f158787%2fload-x-resources-when-kde-starts-on-linux-mint%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

                                        CARDNET

                                        Boot-repair Failure: Unable to locate package grub-common:i386

                                        濃尾地震