This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can not change PATH env. variable

Tags: None
(comma "," separated)
User avatar
blindvic
Registered Member
Posts
157
Karma
0
OS

Can not change PATH env. variable

Sat Apr 27, 2013 5:42 pm
I have this file:
Code: Select all
vic@vic-X202E ~/projects/src » cat ~/.kde/env/kdevelop.sh
#!/bin/sh
export KDEDIRS=$KDEDIRS:/home/vic/apps/kdevelop4
export PATH=$PATH:/home/vic/apps/kdevelop4/bin

After restarting KDE for some reason only KDEDIRS variable is updated, but not PATH:
Code: Select all
vic@vic-X202E ~/projects/src » env
...
PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
KDEDIRS=/usr/share/kubuntu-low-fat-settings/:/usr/share/kubuntu-default-settings/kde4-profile/default/:/home/vic/apps/kdevelop4
...

What could be the reason?

Also, i have a question related to listing of environment variables. Each time i print the list of them i use `env` command, but the printed list is not sorted, so it's difficult to find the variable i need. Command `printenv` prints the same. Is there a reason why the list is not sorted? Is there a simple option to show it sorted?
User avatar
google01103
Manager
Posts
6668
Karma
25
re: sorting
Code: Select all
printenv|sort


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It is possible that PATH is being overridden somewhere else, such as in ~/.bashrc or ~/.profile. Can you check if this is the case?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
blindvic
Registered Member
Posts
157
Karma
0
OS
bcooksley wrote:It is possible that PATH is being overridden somewhere else, such as in ~/.bashrc or ~/.profile. Can you check if this is the case?

You are right! I have installed zsh with oh-my-zsh, and ~/.zshrc sets PATH explicitly.

Thank you!


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]