You are not logged in.

#1 2009-09-05 10:36:33

ZeroCool
Member
From: Bad Münder Germany
Registered: 2009-08-18
Posts: 23

Root in Gnome Terminal has wrong $PATH [Solved]

Hello

wehn i open a Root terminal in gnome the Root user hasn't  the full PATH (only /usr/ucb:/bin:/usr/bin:/etc)

I have no idea what is wrong.

Thanks for every answer.

Last edited by ZeroCool (2009-10-12 21:06:34)

Offline

#2 2009-09-05 10:44:58

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Root in Gnome Terminal has wrong $PATH [Solved]

I don't know why it happens but "su -" would probably be a quick fix.

Last edited by loafer (2009-09-05 10:45:16)


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2009-09-05 11:34:29

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: Root in Gnome Terminal has wrong $PATH [Solved]

Hello ZeroCool!

And Does the PATH variable has generally more location ? Is it okay with normal user ? Is your profiles okay ? Or bashrc in last case ?

Offline

#4 2009-09-07 21:41:14

ZeroCool
Member
From: Bad Münder Germany
Registered: 2009-08-18
Posts: 23

Re: Root in Gnome Terminal has wrong $PATH [Solved]

I don't know why it happens but "su -" would probably be a quick fix.

yes this works when i start over the user terminal. This is ok but not really good  (i my opinion).

And Does the PATH variable has generally more location ? Is it okay with normal user ? Is your profiles okay ? Or bashrc in last case ?

Yes the normal user has the right $PATH

How can i check that the root profile is correct arranged?

Offline

#5 2009-09-08 00:41:03

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Root in Gnome Terminal has wrong $PATH [Solved]

The same happens to me. I just start a normal terminal and "su", but I've no idea what's going on.


Matt

"It is very difficult to educate the educated."

Offline

#6 2009-09-08 20:34:50

ZeroCool
Member
From: Bad Münder Germany
Registered: 2009-08-18
Posts: 23

Re: Root in Gnome Terminal has wrong $PATH [Solved]

mrunion wrote:

The same happens to me. I just start a normal terminal and "su", but I've no idea what's going on.

Now we are two smile I use now also this way. But why is this so when i start directly the root terminal

My big question is : is this a configuration problem or a Bug. I Vote for the First. But is was nice to know.

Offline

#7 2009-09-09 16:32:22

lestoil
Member
Registered: 2005-08-09
Posts: 81

Re: Root in Gnome Terminal has wrong $PATH [Solved]

Check the wiki where it suggests 'su -' then root pw for full root privileges. 'su' then root pw give root privileges in different PATH from su -.  Check it by using path command wih both su and su - steps. Ubuntu,Mandriva and Centos say same. This seems to be a recent change in linux(?)

Offline

#8 2009-09-09 21:15:28

ZeroCool
Member
From: Bad Münder Germany
Registered: 2009-08-18
Posts: 23

Re: Root in Gnome Terminal has wrong $PATH [Solved]

I became the same $PATH as my "normal user"

The thing is, i will start my terminal under gnome with the command

gksu -l gnome-terminal

Or is the a bad idea ???

Su works but it is a other way to came to root in gnome.

Offline

#9 2009-09-09 21:29:21

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Root in Gnome Terminal has wrong $PATH [Solved]

Su will never give you the full root environment, su - will. That's how it work, that's how it's supposed to work.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#10 2009-09-09 22:21:38

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Root in Gnome Terminal has wrong $PATH [Solved]

This bug is confirmed by a user  in german forum. B, you are right, but a normal su should take the environment from the underpriviliged user who switches to root, and not to something insane. Where does this /usr/ucb come from? The path does not even exist.:/

Last edited by Stefan Husmann (2009-09-09 22:23:40)

Offline

#11 2009-09-10 18:02:02

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Root in Gnome Terminal has wrong $PATH [Solved]

I totally missed, the /usr/ucb, you're right, it's kinda pesky...


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#12 2009-09-10 18:57:00

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Root in Gnome Terminal has wrong $PATH [Solved]

/usr/ucb is something Sun put in their OSes, it certainly has no place here.

EDIT:  just started the terminal with "gksudo -l gnome-terminal" and the $PATH was correct.  Maybe the bug is related to gksu.

Last edited by loafer (2009-09-10 19:08:11)


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#13 2009-09-10 20:59:01

ZeroCool
Member
From: Bad Münder Germany
Registered: 2009-08-18
Posts: 23

Re: Root in Gnome Terminal has wrong $PATH [Solved]

Stefan Husmann wrote:

This bug is confirmed by a user  in german forum. B, you are right, but a normal su should take the environment from the underpriviliged user who switches to root, and not to something insane. Where does this /usr/ucb come from? The path does not even exist.:/

Big Thanks for this information smile Now i know what is it.

When i use

gksudo -l gnome-terminal

i became

[zerocool@bruel ~]$ gksudo -l gnome-terminal

(gksudo:15810): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed

(gksudo:15810): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed

(gksudo:15810): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed

(gksudo:15810): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed

Offline

Board footer

Powered by FluxBB