2

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

Allen W
  • 31

1 Answers1

0

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)