No numlock in screen?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am using a laptop and Putty on a Windows system.



When I connect to my Debian Squeeze server in Bash environment, I can use the "Pos1/Home" or "End" (at the numlock part of the keyboard) to navigate through the commandline I am just writing.



However, when I create a "subshell" using screen, I cannot use Pos1/Home or End anymore. Pressing Num-Lock does not help.










share|improve this question



























    up vote
    0
    down vote

    favorite












    I am using a laptop and Putty on a Windows system.



    When I connect to my Debian Squeeze server in Bash environment, I can use the "Pos1/Home" or "End" (at the numlock part of the keyboard) to navigate through the commandline I am just writing.



    However, when I create a "subshell" using screen, I cannot use Pos1/Home or End anymore. Pressing Num-Lock does not help.










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am using a laptop and Putty on a Windows system.



      When I connect to my Debian Squeeze server in Bash environment, I can use the "Pos1/Home" or "End" (at the numlock part of the keyboard) to navigate through the commandline I am just writing.



      However, when I create a "subshell" using screen, I cannot use Pos1/Home or End anymore. Pressing Num-Lock does not help.










      share|improve this question















      I am using a laptop and Putty on a Windows system.



      When I connect to my Debian Squeeze server in Bash environment, I can use the "Pos1/Home" or "End" (at the numlock part of the keyboard) to navigate through the commandline I am just writing.



      However, when I create a "subshell" using screen, I cannot use Pos1/Home or End anymore. Pressing Num-Lock does not help.







      bash debian gnu-screen putty numlock






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 29 '16 at 2:49









      John Militer

      6542928




      6542928










      asked Jun 2 '14 at 22:05









      Daniel Marschall

      1891213




      1891213




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          The problem can probably be fixed by setting the $TERM variable in screen. Try adding term screen-256color to ~/.screenrc.



          If this does not work, try adding termcapinfo xterm ks@:ke@' to~/.screenrc` as well. This might break some other keys so you should test it thoroughly.






          share|improve this answer






















          • Setting that environment variable in ~/.screenrc or launching screen -T screen-256color does not help. Ctrl+V does not work in Putty. But it does work if I perform the keystroke at the actual machine (I am testing on a VM now). Home/End does always work in screen when I am at the virtual machine, but does not work when I do the same in Putty+Screen.
            – Daniel Marschall
            Jun 3 '14 at 8:43










          • Ctrl+V at the virtual machine showed the keys ^[[1~ and ^[[4~ . Adding these 2 keys in ~/.inputrc does not help. Probably the keycodes passed through PuTTy are different. (However, Putty+Bash does work, but Putty+Screen does not work!) Is it correct entering "^[[1~": begin-of-line in ~/.inputrc or do I need to replace ^ with e or [[ with [? (I tried various)
            – Daniel Marschall
            Jun 3 '14 at 8:44











          • Oh, I somehow completely ignored the part of the question that mentioned you are doing this through putty. I found a working solution, at least one that works on my computer using Putty to SSH to an Arch Linux machine. I will update my answer.
            – arnefm
            Jun 3 '14 at 9:14










          • Thanks. But alas, it does not work - the screen just blinks when I press the Home key. I have changed ~/.screenrc to: term linux . But that does not work. When I execute screen and (inside screen) echo $TERM I will get screen-256color . If I then enter TERM=linux inside screen, it will work. How can I tell screen to do that automatically at each start?
            – Daniel Marschall
            Jun 3 '14 at 9:46











          • I have just found the solution. I changed the terminal type in PuTTy from xterm to linux. This affects both, bash and screen. Thank you all the same for taking time to help me. :-) Your hint with the TERM setting was important to find the problem.
            – Daniel Marschall
            Jun 3 '14 at 10:03

















          up vote
          0
          down vote



          accepted










          I have found the reason why it didn't work.



          In the PuTTy configuration I had to change the session settings as follows:



          Connection -> Data -> Terminal details -> Terminal-type string



          The value was: xterm
          I changed it to linux



          Now I can use the Home+End keys in Bash and in Screen as well.



          echo $TERM will show linux outside screen and screen.linux inside screen.




          UPDATE 23 Oct 2018



          I have found a much easier solution!



          Just start screen with this command:



          TERM=linux screen



          or put this line in your ~/.bashrc :



          alias screen='TERM=linux screen'






          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f134170%2fno-numlock-in-screen%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            The problem can probably be fixed by setting the $TERM variable in screen. Try adding term screen-256color to ~/.screenrc.



            If this does not work, try adding termcapinfo xterm ks@:ke@' to~/.screenrc` as well. This might break some other keys so you should test it thoroughly.






            share|improve this answer






















            • Setting that environment variable in ~/.screenrc or launching screen -T screen-256color does not help. Ctrl+V does not work in Putty. But it does work if I perform the keystroke at the actual machine (I am testing on a VM now). Home/End does always work in screen when I am at the virtual machine, but does not work when I do the same in Putty+Screen.
              – Daniel Marschall
              Jun 3 '14 at 8:43










            • Ctrl+V at the virtual machine showed the keys ^[[1~ and ^[[4~ . Adding these 2 keys in ~/.inputrc does not help. Probably the keycodes passed through PuTTy are different. (However, Putty+Bash does work, but Putty+Screen does not work!) Is it correct entering "^[[1~": begin-of-line in ~/.inputrc or do I need to replace ^ with e or [[ with [? (I tried various)
              – Daniel Marschall
              Jun 3 '14 at 8:44











            • Oh, I somehow completely ignored the part of the question that mentioned you are doing this through putty. I found a working solution, at least one that works on my computer using Putty to SSH to an Arch Linux machine. I will update my answer.
              – arnefm
              Jun 3 '14 at 9:14










            • Thanks. But alas, it does not work - the screen just blinks when I press the Home key. I have changed ~/.screenrc to: term linux . But that does not work. When I execute screen and (inside screen) echo $TERM I will get screen-256color . If I then enter TERM=linux inside screen, it will work. How can I tell screen to do that automatically at each start?
              – Daniel Marschall
              Jun 3 '14 at 9:46











            • I have just found the solution. I changed the terminal type in PuTTy from xterm to linux. This affects both, bash and screen. Thank you all the same for taking time to help me. :-) Your hint with the TERM setting was important to find the problem.
              – Daniel Marschall
              Jun 3 '14 at 10:03














            up vote
            1
            down vote













            The problem can probably be fixed by setting the $TERM variable in screen. Try adding term screen-256color to ~/.screenrc.



            If this does not work, try adding termcapinfo xterm ks@:ke@' to~/.screenrc` as well. This might break some other keys so you should test it thoroughly.






            share|improve this answer






















            • Setting that environment variable in ~/.screenrc or launching screen -T screen-256color does not help. Ctrl+V does not work in Putty. But it does work if I perform the keystroke at the actual machine (I am testing on a VM now). Home/End does always work in screen when I am at the virtual machine, but does not work when I do the same in Putty+Screen.
              – Daniel Marschall
              Jun 3 '14 at 8:43










            • Ctrl+V at the virtual machine showed the keys ^[[1~ and ^[[4~ . Adding these 2 keys in ~/.inputrc does not help. Probably the keycodes passed through PuTTy are different. (However, Putty+Bash does work, but Putty+Screen does not work!) Is it correct entering "^[[1~": begin-of-line in ~/.inputrc or do I need to replace ^ with e or [[ with [? (I tried various)
              – Daniel Marschall
              Jun 3 '14 at 8:44











            • Oh, I somehow completely ignored the part of the question that mentioned you are doing this through putty. I found a working solution, at least one that works on my computer using Putty to SSH to an Arch Linux machine. I will update my answer.
              – arnefm
              Jun 3 '14 at 9:14










            • Thanks. But alas, it does not work - the screen just blinks when I press the Home key. I have changed ~/.screenrc to: term linux . But that does not work. When I execute screen and (inside screen) echo $TERM I will get screen-256color . If I then enter TERM=linux inside screen, it will work. How can I tell screen to do that automatically at each start?
              – Daniel Marschall
              Jun 3 '14 at 9:46











            • I have just found the solution. I changed the terminal type in PuTTy from xterm to linux. This affects both, bash and screen. Thank you all the same for taking time to help me. :-) Your hint with the TERM setting was important to find the problem.
              – Daniel Marschall
              Jun 3 '14 at 10:03












            up vote
            1
            down vote










            up vote
            1
            down vote









            The problem can probably be fixed by setting the $TERM variable in screen. Try adding term screen-256color to ~/.screenrc.



            If this does not work, try adding termcapinfo xterm ks@:ke@' to~/.screenrc` as well. This might break some other keys so you should test it thoroughly.






            share|improve this answer














            The problem can probably be fixed by setting the $TERM variable in screen. Try adding term screen-256color to ~/.screenrc.



            If this does not work, try adding termcapinfo xterm ks@:ke@' to~/.screenrc` as well. This might break some other keys so you should test it thoroughly.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jun 3 '14 at 9:17

























            answered Jun 2 '14 at 22:25









            arnefm

            2,462812




            2,462812











            • Setting that environment variable in ~/.screenrc or launching screen -T screen-256color does not help. Ctrl+V does not work in Putty. But it does work if I perform the keystroke at the actual machine (I am testing on a VM now). Home/End does always work in screen when I am at the virtual machine, but does not work when I do the same in Putty+Screen.
              – Daniel Marschall
              Jun 3 '14 at 8:43










            • Ctrl+V at the virtual machine showed the keys ^[[1~ and ^[[4~ . Adding these 2 keys in ~/.inputrc does not help. Probably the keycodes passed through PuTTy are different. (However, Putty+Bash does work, but Putty+Screen does not work!) Is it correct entering "^[[1~": begin-of-line in ~/.inputrc or do I need to replace ^ with e or [[ with [? (I tried various)
              – Daniel Marschall
              Jun 3 '14 at 8:44











            • Oh, I somehow completely ignored the part of the question that mentioned you are doing this through putty. I found a working solution, at least one that works on my computer using Putty to SSH to an Arch Linux machine. I will update my answer.
              – arnefm
              Jun 3 '14 at 9:14










            • Thanks. But alas, it does not work - the screen just blinks when I press the Home key. I have changed ~/.screenrc to: term linux . But that does not work. When I execute screen and (inside screen) echo $TERM I will get screen-256color . If I then enter TERM=linux inside screen, it will work. How can I tell screen to do that automatically at each start?
              – Daniel Marschall
              Jun 3 '14 at 9:46











            • I have just found the solution. I changed the terminal type in PuTTy from xterm to linux. This affects both, bash and screen. Thank you all the same for taking time to help me. :-) Your hint with the TERM setting was important to find the problem.
              – Daniel Marschall
              Jun 3 '14 at 10:03
















            • Setting that environment variable in ~/.screenrc or launching screen -T screen-256color does not help. Ctrl+V does not work in Putty. But it does work if I perform the keystroke at the actual machine (I am testing on a VM now). Home/End does always work in screen when I am at the virtual machine, but does not work when I do the same in Putty+Screen.
              – Daniel Marschall
              Jun 3 '14 at 8:43










            • Ctrl+V at the virtual machine showed the keys ^[[1~ and ^[[4~ . Adding these 2 keys in ~/.inputrc does not help. Probably the keycodes passed through PuTTy are different. (However, Putty+Bash does work, but Putty+Screen does not work!) Is it correct entering "^[[1~": begin-of-line in ~/.inputrc or do I need to replace ^ with e or [[ with [? (I tried various)
              – Daniel Marschall
              Jun 3 '14 at 8:44











            • Oh, I somehow completely ignored the part of the question that mentioned you are doing this through putty. I found a working solution, at least one that works on my computer using Putty to SSH to an Arch Linux machine. I will update my answer.
              – arnefm
              Jun 3 '14 at 9:14










            • Thanks. But alas, it does not work - the screen just blinks when I press the Home key. I have changed ~/.screenrc to: term linux . But that does not work. When I execute screen and (inside screen) echo $TERM I will get screen-256color . If I then enter TERM=linux inside screen, it will work. How can I tell screen to do that automatically at each start?
              – Daniel Marschall
              Jun 3 '14 at 9:46











            • I have just found the solution. I changed the terminal type in PuTTy from xterm to linux. This affects both, bash and screen. Thank you all the same for taking time to help me. :-) Your hint with the TERM setting was important to find the problem.
              – Daniel Marschall
              Jun 3 '14 at 10:03















            Setting that environment variable in ~/.screenrc or launching screen -T screen-256color does not help. Ctrl+V does not work in Putty. But it does work if I perform the keystroke at the actual machine (I am testing on a VM now). Home/End does always work in screen when I am at the virtual machine, but does not work when I do the same in Putty+Screen.
            – Daniel Marschall
            Jun 3 '14 at 8:43




            Setting that environment variable in ~/.screenrc or launching screen -T screen-256color does not help. Ctrl+V does not work in Putty. But it does work if I perform the keystroke at the actual machine (I am testing on a VM now). Home/End does always work in screen when I am at the virtual machine, but does not work when I do the same in Putty+Screen.
            – Daniel Marschall
            Jun 3 '14 at 8:43












            Ctrl+V at the virtual machine showed the keys ^[[1~ and ^[[4~ . Adding these 2 keys in ~/.inputrc does not help. Probably the keycodes passed through PuTTy are different. (However, Putty+Bash does work, but Putty+Screen does not work!) Is it correct entering "^[[1~": begin-of-line in ~/.inputrc or do I need to replace ^ with e or [[ with [? (I tried various)
            – Daniel Marschall
            Jun 3 '14 at 8:44





            Ctrl+V at the virtual machine showed the keys ^[[1~ and ^[[4~ . Adding these 2 keys in ~/.inputrc does not help. Probably the keycodes passed through PuTTy are different. (However, Putty+Bash does work, but Putty+Screen does not work!) Is it correct entering "^[[1~": begin-of-line in ~/.inputrc or do I need to replace ^ with e or [[ with [? (I tried various)
            – Daniel Marschall
            Jun 3 '14 at 8:44













            Oh, I somehow completely ignored the part of the question that mentioned you are doing this through putty. I found a working solution, at least one that works on my computer using Putty to SSH to an Arch Linux machine. I will update my answer.
            – arnefm
            Jun 3 '14 at 9:14




            Oh, I somehow completely ignored the part of the question that mentioned you are doing this through putty. I found a working solution, at least one that works on my computer using Putty to SSH to an Arch Linux machine. I will update my answer.
            – arnefm
            Jun 3 '14 at 9:14












            Thanks. But alas, it does not work - the screen just blinks when I press the Home key. I have changed ~/.screenrc to: term linux . But that does not work. When I execute screen and (inside screen) echo $TERM I will get screen-256color . If I then enter TERM=linux inside screen, it will work. How can I tell screen to do that automatically at each start?
            – Daniel Marschall
            Jun 3 '14 at 9:46





            Thanks. But alas, it does not work - the screen just blinks when I press the Home key. I have changed ~/.screenrc to: term linux . But that does not work. When I execute screen and (inside screen) echo $TERM I will get screen-256color . If I then enter TERM=linux inside screen, it will work. How can I tell screen to do that automatically at each start?
            – Daniel Marschall
            Jun 3 '14 at 9:46













            I have just found the solution. I changed the terminal type in PuTTy from xterm to linux. This affects both, bash and screen. Thank you all the same for taking time to help me. :-) Your hint with the TERM setting was important to find the problem.
            – Daniel Marschall
            Jun 3 '14 at 10:03




            I have just found the solution. I changed the terminal type in PuTTy from xterm to linux. This affects both, bash and screen. Thank you all the same for taking time to help me. :-) Your hint with the TERM setting was important to find the problem.
            – Daniel Marschall
            Jun 3 '14 at 10:03












            up vote
            0
            down vote



            accepted










            I have found the reason why it didn't work.



            In the PuTTy configuration I had to change the session settings as follows:



            Connection -> Data -> Terminal details -> Terminal-type string



            The value was: xterm
            I changed it to linux



            Now I can use the Home+End keys in Bash and in Screen as well.



            echo $TERM will show linux outside screen and screen.linux inside screen.




            UPDATE 23 Oct 2018



            I have found a much easier solution!



            Just start screen with this command:



            TERM=linux screen



            or put this line in your ~/.bashrc :



            alias screen='TERM=linux screen'






            share|improve this answer


























              up vote
              0
              down vote



              accepted










              I have found the reason why it didn't work.



              In the PuTTy configuration I had to change the session settings as follows:



              Connection -> Data -> Terminal details -> Terminal-type string



              The value was: xterm
              I changed it to linux



              Now I can use the Home+End keys in Bash and in Screen as well.



              echo $TERM will show linux outside screen and screen.linux inside screen.




              UPDATE 23 Oct 2018



              I have found a much easier solution!



              Just start screen with this command:



              TERM=linux screen



              or put this line in your ~/.bashrc :



              alias screen='TERM=linux screen'






              share|improve this answer
























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                I have found the reason why it didn't work.



                In the PuTTy configuration I had to change the session settings as follows:



                Connection -> Data -> Terminal details -> Terminal-type string



                The value was: xterm
                I changed it to linux



                Now I can use the Home+End keys in Bash and in Screen as well.



                echo $TERM will show linux outside screen and screen.linux inside screen.




                UPDATE 23 Oct 2018



                I have found a much easier solution!



                Just start screen with this command:



                TERM=linux screen



                or put this line in your ~/.bashrc :



                alias screen='TERM=linux screen'






                share|improve this answer














                I have found the reason why it didn't work.



                In the PuTTy configuration I had to change the session settings as follows:



                Connection -> Data -> Terminal details -> Terminal-type string



                The value was: xterm
                I changed it to linux



                Now I can use the Home+End keys in Bash and in Screen as well.



                echo $TERM will show linux outside screen and screen.linux inside screen.




                UPDATE 23 Oct 2018



                I have found a much easier solution!



                Just start screen with this command:



                TERM=linux screen



                or put this line in your ~/.bashrc :



                alias screen='TERM=linux screen'







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 mins ago

























                answered Jun 3 '14 at 10:01









                Daniel Marschall

                1891213




                1891213



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f134170%2fno-numlock-in-screen%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)