PATH not changing in X?

Forum Forums New users New Users and General Questions PATH not changing in X?

  • This topic has 8 replies, 5 voices, and was last updated Oct 28-1:29 pm by Brian Masinick.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #28464
    Member
    Raziel408

      Hi, I installed texlive in the directory /opt/texlive/2019 and I need to add that directory to my PATH var. I created the script /etc/profile.d/texlive.sh whit the following content:

      
      export PATH=$PATH:/opt/texlive/2019/bin/i386_64-linux
      export MANPATH=$MANPATH:/opt/texlive/2019/texmf-dist/doc/man
      

      and rebooted.
      And nothing. Opened a terminal

      
      echo $PATH
      /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin
      

      But if I try another terminal (e.j. ctr+alt+f2):

      
      echo $PATH
      /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/texlive/2019/bin/i386_64-linux:/sbin:/usr/sbin
      

      What is going on?

      #28465
      Forum Admin
      anticapitalista
        Helpful
        Up
        0
        ::

        antiX-19 defaults to booting into tty2 in live mode

        • This reply was modified 3 years, 6 months ago by anticapitalista.

        Philosophers have interpreted the world in many ways; the point is to change it.

        antiX with runit - leaner and meaner.

        #28473
        Member
        Raziel408
          Helpful
          Up
          0
          ::

          I installed antix and installed a program un the /opt directory. So I need to modify the PATH var for all users. so I created a shell script in the /etc/profile.d directory. But It doesn’t run. It runs in other terminals (tty2 tty3).

          So whit some help I found this post:
          https://askubuntu.com/questions/438150/scripts-in-etc-profile-d-being-ignored

          So I understand that the graphic environment is not running /etc/profile.
          How can I change that? I need it to run it for all users.

          Edit:
          Merged topics as these are of the same issue.

          • This reply was modified 3 years, 6 months ago by Dave.
          • This reply was modified 3 years, 6 months ago by Dave.
          #28476
          Forum Admin
          Dave
            Helpful
            Up
            0
            ::

            Taking a shot in the dark, but perhaps the user shell is not defaulting to bash?

            Maybe check your / etc / passwd file and see if the shell is set as bash

            Aside from this (if you are using the proper shell) I think it might be due to an interactive vs non login/interactive shell instances. In which case sourcing it from ~/.bashrc instead of profile.d should work better.

            Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

            #28529
            Member
            Raziel408
              Helpful
              Up
              0
              ::

              I asume this line:

              
              raziel:x:1000:1000::/home/raziel:/bin/bash
              

              means my shell is set to bash. I’m prety sure is an interactive vs non login/interactive shell instances. And I really would like to learn how to set it up whit a script in /etc/profile.d I find that way more confortable.

              • This reply was modified 3 years, 6 months ago by Raziel408.
              • This reply was modified 3 years, 6 months ago by Raziel408.
              #28570
              Forum Admin
              Dave
                Helpful
                Up
                0
                ::

                Possibly editing the slim login command to specify the -l option to the bash command would work?

                Not certain but I think this is normal bash operations. The path variable iirc is normally set some where in the bashrc by default anyway. So if that comes after the profile source it would likely reset it. (though this is probably not the case as f2 console works). Also after solving it with terminal I am not sure if it will work with apps / scripts (such as the menu) as it would depend on how it is started / called which I think is different than the terminal in most instances.

                Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

                #28581
                Member
                wildstar84
                  Helpful
                  Up
                  0
                  ::

                  Try editing /etc/slim.conf:

                  Look for “default_path ” line, which should have a “:”-separated list of paths, and add your path there, and restart X.

                  Regards,

                  Jim

                  #28697
                  Member
                  Raziel408
                    Helpful
                    Up
                    0
                    ::

                    Try editing /etc/slim.conf:

                    Look for “default_path ” line, which should have a “:”-separated list of paths, and add your path there, and restart X.

                    Regards,

                    Jim

                    This worked, I’m satisfied whit this solution, thanks a lot.

                    #28705
                    Moderator
                    Brian Masinick
                      Helpful
                      Up
                      0
                      ::

                      Try editing /etc/slim.conf:

                      Look for “default_path ” line, which should have a “:”-separated list of paths, and add your path there, and restart X.

                      Regards,

                      Jim

                      This worked, I’m satisfied whit this solution, thanks a lot.

                      BobC and I had a conversation about this recently elsewhere.

                      The .profile, .bashrc, /etc/profile… configuration files all impact the operation of shells that operate from a terminal.

                      The file /etc/slim.conf also has a path; modifying it impacts the executable path of the graphical interface started by the slim login display manager.

                      Other login display managers (LightDM, xdm, etc.) have similar configuration files.

                      --
                      Brian Masinick

                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • You must be logged in to reply to this topic.