gdm didn`t read correct PATH variables

Asked by wally on 2012-06-28

When I enter the Xfce desktop, I clicked right mouse button and choose the termianl, I enter "echo $PATH", and get return below":

and my /etc/environment is:

and if I use ctrl + alt + F1 to switch to tty1, and enter "echo $PATH", I got:

I also edit /etc/gdm/gdm.conf, /etc/environment, /etc/login.defs no effect.
but when I use "startx" instead "sudo service gdm start", my $PATH will be correct.

it seems a gdm bug, I install lightdm and don`t have the bug anymore, but if I use gdm or slim instead, the problem will appear.

by the way, how do I change the login manager? when I install gdm, ubuntu 12.04 pop up a purple console, and ask me which manager to use, how do I wake this this purple console again?

Question information

English Edit question
Ubuntu gdm Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:

I suggest you add the path variable in ~/.bashrc and it will apply to any DE.

wally (wally-yeh) said : #2

but if I modified /etc/environment, it should effect all user, right?

You can add it in /etc/bash.bashrc too

wally (wally-yeh) said : #4

Thanks actionparsnip, that solved my question.

wally (wally-yeh) said : #5

so is /etc/environment been abandoned ? if it is, I have to rewrite my program. but thanks, your advise is lots helpful. :)

Not sure, /etc/bash.bashrc is the global bash file for all users.