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.
-
AuthorPosts
-
October 23, 2019 at 12:50 pm #28464Member
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/manand rebooted.
And nothing. Opened a terminalecho $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbinBut 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/sbinWhat is going on?
October 23, 2019 at 1:10 pm #28465Forum Admin
anticapitalista
::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.
October 23, 2019 at 8:46 pm #28473MemberRaziel408
::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-ignoredSo 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.
October 23, 2019 at 8:53 pm #28476Forum Admin
Dave
::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
October 24, 2019 at 7:26 pm #28529MemberRaziel408
::I asume this line:
raziel:x:1000:1000::/home/raziel:/bin/bashmeans 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.
October 25, 2019 at 5:48 pm #28570Forum Admin
Dave
::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
October 25, 2019 at 10:23 pm #28581Member
wildstar84
::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
October 28, 2019 at 10:35 am #28697MemberRaziel408
::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.
October 28, 2019 at 1:29 pm #28705Moderator
Brian Masinick
::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 -
AuthorPosts
- You must be logged in to reply to this topic.