How can I enable trusted X11 forwarding on Putty (with Xming) or otherwise get rid of one second delay when...












5














I've noticed one second delay before Midnight Commander or mcedit starts in Putty. It took me a while before I realized it is caused by X11 forwarding enabled. mc -X start immediately.



Unfortunately starting any X11 application has same delay. Maybe I'm nitpicking but it drives me crazy. Especially because some users mentioned cause and solution for this: xming does not support X11 security, so Linux must wait for network timeout. It is on second for me, but 30 seconds for others according to some discussions.



The solution is trusted X11 forwarding enabled by -Y commandline option for ssh. Unfortunately Putty doesn't have this option. Is there any other way to enable trusted forwarding on Putty ?










share|improve this question





























    5














    I've noticed one second delay before Midnight Commander or mcedit starts in Putty. It took me a while before I realized it is caused by X11 forwarding enabled. mc -X start immediately.



    Unfortunately starting any X11 application has same delay. Maybe I'm nitpicking but it drives me crazy. Especially because some users mentioned cause and solution for this: xming does not support X11 security, so Linux must wait for network timeout. It is on second for me, but 30 seconds for others according to some discussions.



    The solution is trusted X11 forwarding enabled by -Y commandline option for ssh. Unfortunately Putty doesn't have this option. Is there any other way to enable trusted forwarding on Putty ?










    share|improve this question



























      5












      5








      5


      1





      I've noticed one second delay before Midnight Commander or mcedit starts in Putty. It took me a while before I realized it is caused by X11 forwarding enabled. mc -X start immediately.



      Unfortunately starting any X11 application has same delay. Maybe I'm nitpicking but it drives me crazy. Especially because some users mentioned cause and solution for this: xming does not support X11 security, so Linux must wait for network timeout. It is on second for me, but 30 seconds for others according to some discussions.



      The solution is trusted X11 forwarding enabled by -Y commandline option for ssh. Unfortunately Putty doesn't have this option. Is there any other way to enable trusted forwarding on Putty ?










      share|improve this question















      I've noticed one second delay before Midnight Commander or mcedit starts in Putty. It took me a while before I realized it is caused by X11 forwarding enabled. mc -X start immediately.



      Unfortunately starting any X11 application has same delay. Maybe I'm nitpicking but it drives me crazy. Especially because some users mentioned cause and solution for this: xming does not support X11 security, so Linux must wait for network timeout. It is on second for me, but 30 seconds for others according to some discussions.



      The solution is trusted X11 forwarding enabled by -Y commandline option for ssh. Unfortunately Putty doesn't have this option. Is there any other way to enable trusted forwarding on Putty ?







      ssh putty xming






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 17 '16 at 6:07

























      asked Mar 16 '16 at 10:44









      martins

      263




      263






















          2 Answers
          2






          active

          oldest

          votes


















          0














          The -Y or ForwardX11Trusted for ssh client disables access control for remote X clients. Putty does not propose it but Xming started with -ac disables access control as well.



          This xming tips page describes 2 ways to disable access control when Xming starts: using -ac parameter or modifying a file.



          Is it better after Xming restart with access control disabled?



          ----





          This first answer is left for reference.



          -C might slow down communication on fast network (see ssh manual page), so I think it will not help in your situation.



          putty 0.67 has both -X (turns on X11 forwarding in SSH) and -C (enable compression) see 3.8.3 Standard command-line options in the documentation.



          Compression improves performance when used with ssh.
          The line below has been tested with a server far far away:



          PUTTY.EXE -X -C -ssh 10.0.0.2


          Let me know if it is better with both -X and -C in your environment?






          share|improve this answer























          • Thanks for your suggestion. I'll try compression, but I did not mentioned I was working on localhost in virtual machine. Unfortunately -X in putty means X11 on, while in linux/cygwin ssh command -X means untrusted and -Y trusted. I've corrected it in my answer.
            – martins
            Mar 17 '16 at 6:06












          • The ForwardX11Trusted for ssh client is disabling control for remote X client. Putty does not allow this but Xming shortcut can be modify to use -ac. It is also equivalent to xhost +.
            – Jay jargot
            Mar 18 '16 at 4:25










          • I have updated the answer. Could you give it a try and tell me if it is better?
            – Jay jargot
            Mar 18 '16 at 9:26








          • 1




            Thanks. I've tried both xming with commandline parameter and xlaunch with additional parameter for xming. There still was one second delay before mc or codeblocks started.
            – martins
            Mar 18 '16 at 12:30










          • What if it is not due to the X11 Trusted? I mean it is worth to sniff packets with wireshark in order to figure out what is going on?
            – Jay jargot
            Mar 18 '16 at 12:34



















          0














          PuTTY is safe enough with X11 forwarding. Please note that it may be necessary to install xauth on your Linux. After SSH login check if DISPLAY variable defined automatically. Its value should be localhost:... or similar. If not you should change to IPv4 only in your /etc/ssh/sshd_config and restart ssh service and try it again.






          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%2f270160%2fhow-can-i-enable-trusted-x11-forwarding-on-putty-with-xming-or-otherwise-get-r%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            The -Y or ForwardX11Trusted for ssh client disables access control for remote X clients. Putty does not propose it but Xming started with -ac disables access control as well.



            This xming tips page describes 2 ways to disable access control when Xming starts: using -ac parameter or modifying a file.



            Is it better after Xming restart with access control disabled?



            ----





            This first answer is left for reference.



            -C might slow down communication on fast network (see ssh manual page), so I think it will not help in your situation.



            putty 0.67 has both -X (turns on X11 forwarding in SSH) and -C (enable compression) see 3.8.3 Standard command-line options in the documentation.



            Compression improves performance when used with ssh.
            The line below has been tested with a server far far away:



            PUTTY.EXE -X -C -ssh 10.0.0.2


            Let me know if it is better with both -X and -C in your environment?






            share|improve this answer























            • Thanks for your suggestion. I'll try compression, but I did not mentioned I was working on localhost in virtual machine. Unfortunately -X in putty means X11 on, while in linux/cygwin ssh command -X means untrusted and -Y trusted. I've corrected it in my answer.
              – martins
              Mar 17 '16 at 6:06












            • The ForwardX11Trusted for ssh client is disabling control for remote X client. Putty does not allow this but Xming shortcut can be modify to use -ac. It is also equivalent to xhost +.
              – Jay jargot
              Mar 18 '16 at 4:25










            • I have updated the answer. Could you give it a try and tell me if it is better?
              – Jay jargot
              Mar 18 '16 at 9:26








            • 1




              Thanks. I've tried both xming with commandline parameter and xlaunch with additional parameter for xming. There still was one second delay before mc or codeblocks started.
              – martins
              Mar 18 '16 at 12:30










            • What if it is not due to the X11 Trusted? I mean it is worth to sniff packets with wireshark in order to figure out what is going on?
              – Jay jargot
              Mar 18 '16 at 12:34
















            0














            The -Y or ForwardX11Trusted for ssh client disables access control for remote X clients. Putty does not propose it but Xming started with -ac disables access control as well.



            This xming tips page describes 2 ways to disable access control when Xming starts: using -ac parameter or modifying a file.



            Is it better after Xming restart with access control disabled?



            ----





            This first answer is left for reference.



            -C might slow down communication on fast network (see ssh manual page), so I think it will not help in your situation.



            putty 0.67 has both -X (turns on X11 forwarding in SSH) and -C (enable compression) see 3.8.3 Standard command-line options in the documentation.



            Compression improves performance when used with ssh.
            The line below has been tested with a server far far away:



            PUTTY.EXE -X -C -ssh 10.0.0.2


            Let me know if it is better with both -X and -C in your environment?






            share|improve this answer























            • Thanks for your suggestion. I'll try compression, but I did not mentioned I was working on localhost in virtual machine. Unfortunately -X in putty means X11 on, while in linux/cygwin ssh command -X means untrusted and -Y trusted. I've corrected it in my answer.
              – martins
              Mar 17 '16 at 6:06












            • The ForwardX11Trusted for ssh client is disabling control for remote X client. Putty does not allow this but Xming shortcut can be modify to use -ac. It is also equivalent to xhost +.
              – Jay jargot
              Mar 18 '16 at 4:25










            • I have updated the answer. Could you give it a try and tell me if it is better?
              – Jay jargot
              Mar 18 '16 at 9:26








            • 1




              Thanks. I've tried both xming with commandline parameter and xlaunch with additional parameter for xming. There still was one second delay before mc or codeblocks started.
              – martins
              Mar 18 '16 at 12:30










            • What if it is not due to the X11 Trusted? I mean it is worth to sniff packets with wireshark in order to figure out what is going on?
              – Jay jargot
              Mar 18 '16 at 12:34














            0












            0








            0






            The -Y or ForwardX11Trusted for ssh client disables access control for remote X clients. Putty does not propose it but Xming started with -ac disables access control as well.



            This xming tips page describes 2 ways to disable access control when Xming starts: using -ac parameter or modifying a file.



            Is it better after Xming restart with access control disabled?



            ----





            This first answer is left for reference.



            -C might slow down communication on fast network (see ssh manual page), so I think it will not help in your situation.



            putty 0.67 has both -X (turns on X11 forwarding in SSH) and -C (enable compression) see 3.8.3 Standard command-line options in the documentation.



            Compression improves performance when used with ssh.
            The line below has been tested with a server far far away:



            PUTTY.EXE -X -C -ssh 10.0.0.2


            Let me know if it is better with both -X and -C in your environment?






            share|improve this answer














            The -Y or ForwardX11Trusted for ssh client disables access control for remote X clients. Putty does not propose it but Xming started with -ac disables access control as well.



            This xming tips page describes 2 ways to disable access control when Xming starts: using -ac parameter or modifying a file.



            Is it better after Xming restart with access control disabled?



            ----





            This first answer is left for reference.



            -C might slow down communication on fast network (see ssh manual page), so I think it will not help in your situation.



            putty 0.67 has both -X (turns on X11 forwarding in SSH) and -C (enable compression) see 3.8.3 Standard command-line options in the documentation.



            Compression improves performance when used with ssh.
            The line below has been tested with a server far far away:



            PUTTY.EXE -X -C -ssh 10.0.0.2


            Let me know if it is better with both -X and -C in your environment?







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 18 '16 at 9:27

























            answered Mar 16 '16 at 18:24









            Jay jargot

            83126




            83126












            • Thanks for your suggestion. I'll try compression, but I did not mentioned I was working on localhost in virtual machine. Unfortunately -X in putty means X11 on, while in linux/cygwin ssh command -X means untrusted and -Y trusted. I've corrected it in my answer.
              – martins
              Mar 17 '16 at 6:06












            • The ForwardX11Trusted for ssh client is disabling control for remote X client. Putty does not allow this but Xming shortcut can be modify to use -ac. It is also equivalent to xhost +.
              – Jay jargot
              Mar 18 '16 at 4:25










            • I have updated the answer. Could you give it a try and tell me if it is better?
              – Jay jargot
              Mar 18 '16 at 9:26








            • 1




              Thanks. I've tried both xming with commandline parameter and xlaunch with additional parameter for xming. There still was one second delay before mc or codeblocks started.
              – martins
              Mar 18 '16 at 12:30










            • What if it is not due to the X11 Trusted? I mean it is worth to sniff packets with wireshark in order to figure out what is going on?
              – Jay jargot
              Mar 18 '16 at 12:34


















            • Thanks for your suggestion. I'll try compression, but I did not mentioned I was working on localhost in virtual machine. Unfortunately -X in putty means X11 on, while in linux/cygwin ssh command -X means untrusted and -Y trusted. I've corrected it in my answer.
              – martins
              Mar 17 '16 at 6:06












            • The ForwardX11Trusted for ssh client is disabling control for remote X client. Putty does not allow this but Xming shortcut can be modify to use -ac. It is also equivalent to xhost +.
              – Jay jargot
              Mar 18 '16 at 4:25










            • I have updated the answer. Could you give it a try and tell me if it is better?
              – Jay jargot
              Mar 18 '16 at 9:26








            • 1




              Thanks. I've tried both xming with commandline parameter and xlaunch with additional parameter for xming. There still was one second delay before mc or codeblocks started.
              – martins
              Mar 18 '16 at 12:30










            • What if it is not due to the X11 Trusted? I mean it is worth to sniff packets with wireshark in order to figure out what is going on?
              – Jay jargot
              Mar 18 '16 at 12:34
















            Thanks for your suggestion. I'll try compression, but I did not mentioned I was working on localhost in virtual machine. Unfortunately -X in putty means X11 on, while in linux/cygwin ssh command -X means untrusted and -Y trusted. I've corrected it in my answer.
            – martins
            Mar 17 '16 at 6:06






            Thanks for your suggestion. I'll try compression, but I did not mentioned I was working on localhost in virtual machine. Unfortunately -X in putty means X11 on, while in linux/cygwin ssh command -X means untrusted and -Y trusted. I've corrected it in my answer.
            – martins
            Mar 17 '16 at 6:06














            The ForwardX11Trusted for ssh client is disabling control for remote X client. Putty does not allow this but Xming shortcut can be modify to use -ac. It is also equivalent to xhost +.
            – Jay jargot
            Mar 18 '16 at 4:25




            The ForwardX11Trusted for ssh client is disabling control for remote X client. Putty does not allow this but Xming shortcut can be modify to use -ac. It is also equivalent to xhost +.
            – Jay jargot
            Mar 18 '16 at 4:25












            I have updated the answer. Could you give it a try and tell me if it is better?
            – Jay jargot
            Mar 18 '16 at 9:26






            I have updated the answer. Could you give it a try and tell me if it is better?
            – Jay jargot
            Mar 18 '16 at 9:26






            1




            1




            Thanks. I've tried both xming with commandline parameter and xlaunch with additional parameter for xming. There still was one second delay before mc or codeblocks started.
            – martins
            Mar 18 '16 at 12:30




            Thanks. I've tried both xming with commandline parameter and xlaunch with additional parameter for xming. There still was one second delay before mc or codeblocks started.
            – martins
            Mar 18 '16 at 12:30












            What if it is not due to the X11 Trusted? I mean it is worth to sniff packets with wireshark in order to figure out what is going on?
            – Jay jargot
            Mar 18 '16 at 12:34




            What if it is not due to the X11 Trusted? I mean it is worth to sniff packets with wireshark in order to figure out what is going on?
            – Jay jargot
            Mar 18 '16 at 12:34













            0














            PuTTY is safe enough with X11 forwarding. Please note that it may be necessary to install xauth on your Linux. After SSH login check if DISPLAY variable defined automatically. Its value should be localhost:... or similar. If not you should change to IPv4 only in your /etc/ssh/sshd_config and restart ssh service and try it again.






            share|improve this answer


























              0














              PuTTY is safe enough with X11 forwarding. Please note that it may be necessary to install xauth on your Linux. After SSH login check if DISPLAY variable defined automatically. Its value should be localhost:... or similar. If not you should change to IPv4 only in your /etc/ssh/sshd_config and restart ssh service and try it again.






              share|improve this answer
























                0












                0








                0






                PuTTY is safe enough with X11 forwarding. Please note that it may be necessary to install xauth on your Linux. After SSH login check if DISPLAY variable defined automatically. Its value should be localhost:... or similar. If not you should change to IPv4 only in your /etc/ssh/sshd_config and restart ssh service and try it again.






                share|improve this answer












                PuTTY is safe enough with X11 forwarding. Please note that it may be necessary to install xauth on your Linux. After SSH login check if DISPLAY variable defined automatically. Its value should be localhost:... or similar. If not you should change to IPv4 only in your /etc/ssh/sshd_config and restart ssh service and try it again.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 8 at 13:07









                Afsin Toparlak

                38114




                38114






























                    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%2f270160%2fhow-can-i-enable-trusted-x11-forwarding-on-putty-with-xming-or-otherwise-get-r%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

                    Morgemoulin

                    Scott Moir

                    Souastre