Linux /etc/profile.d/myscript.sh did not run using VNC

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











up vote
0
down vote

favorite












I have a script in /etc/profile.d/setpath.sh



#!/bin/sh
export PATH=$PATH:/sbin


The script is doing simple thing but it does not set my path environment when I use vnc. (Open terminal in vnc)



I read up some information on login shell and non login shell. I am running CentOS environment and I connect through ssh. Then I create vnc session. I can see the path is added in ssh but not in vnc.



Is there any way to have PATH properly set in vnc? Do I need to add that in /etc/bashrc too?



Thanks in advance







share|improve this question
























    up vote
    0
    down vote

    favorite












    I have a script in /etc/profile.d/setpath.sh



    #!/bin/sh
    export PATH=$PATH:/sbin


    The script is doing simple thing but it does not set my path environment when I use vnc. (Open terminal in vnc)



    I read up some information on login shell and non login shell. I am running CentOS environment and I connect through ssh. Then I create vnc session. I can see the path is added in ssh but not in vnc.



    Is there any way to have PATH properly set in vnc? Do I need to add that in /etc/bashrc too?



    Thanks in advance







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a script in /etc/profile.d/setpath.sh



      #!/bin/sh
      export PATH=$PATH:/sbin


      The script is doing simple thing but it does not set my path environment when I use vnc. (Open terminal in vnc)



      I read up some information on login shell and non login shell. I am running CentOS environment and I connect through ssh. Then I create vnc session. I can see the path is added in ssh but not in vnc.



      Is there any way to have PATH properly set in vnc? Do I need to add that in /etc/bashrc too?



      Thanks in advance







      share|improve this question












      I have a script in /etc/profile.d/setpath.sh



      #!/bin/sh
      export PATH=$PATH:/sbin


      The script is doing simple thing but it does not set my path environment when I use vnc. (Open terminal in vnc)



      I read up some information on login shell and non login shell. I am running CentOS environment and I connect through ssh. Then I create vnc session. I can see the path is added in ssh but not in vnc.



      Is there any way to have PATH properly set in vnc? Do I need to add that in /etc/bashrc too?



      Thanks in advance









      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 15 at 23:08









      Allen W

      6




      6




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Did you try out opening the terminal in GUI after connecting through VNC and executing




          source /etc/profile.d/setpath.sh




          or




          . /etc/profile.d/setpath.sh




          (Answering here since I cannot comment)






          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%2f430512%2flinux-etc-profile-d-myscript-sh-did-not-run-using-vnc%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Did you try out opening the terminal in GUI after connecting through VNC and executing




            source /etc/profile.d/setpath.sh




            or




            . /etc/profile.d/setpath.sh




            (Answering here since I cannot comment)






            share|improve this answer
























              up vote
              0
              down vote













              Did you try out opening the terminal in GUI after connecting through VNC and executing




              source /etc/profile.d/setpath.sh




              or




              . /etc/profile.d/setpath.sh




              (Answering here since I cannot comment)






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                Did you try out opening the terminal in GUI after connecting through VNC and executing




                source /etc/profile.d/setpath.sh




                or




                . /etc/profile.d/setpath.sh




                (Answering here since I cannot comment)






                share|improve this answer












                Did you try out opening the terminal in GUI after connecting through VNC and executing




                source /etc/profile.d/setpath.sh




                or




                . /etc/profile.d/setpath.sh




                (Answering here since I cannot comment)







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 16 at 8:56









                Ashwin Geet D'Sa

                32




                32






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430512%2flinux-etc-profile-d-myscript-sh-did-not-run-using-vnc%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?