You are not logged in.

#1 2009-03-28 14:10:50

schatzs
Member
Registered: 2009-03-28
Posts: 26

gksu not correctly setting paths?

I've been launching Root Terminal under the gnome applications menu to do most of my sys admin tasks. The window is launched with:

gksu -l gnome-terminal

I've installed many packages using this now without issue until yesterday when I tried to do 'pacman -S postfix'. The install failed becasue this package uses 'useradd' and 'groupadd' which are in /usr/sbin and it turns out this dir is not in the PATH when you launch a terminal using gksu. When I launch 'gnome-terminal' and su root, /usr/sbin is in the path and postfix installs fine.

I noticed that there was no .bash_profile in /root so I created one:

PATH=$PATH:/usr/sbin
export PATH

but after launching the root terminal sbin was still not in the path.

So now, as usuall, I'm confused. How does bash get paths for users and root and how I should correctly control this? Out of the box, shouldn't gksu give root the same path as logging in as root from a console (i.e. Ctl-Alt-F1)?

Steve

Offline

#2 2009-03-28 21:34:47

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: gksu not correctly setting paths?

I had issues with Gnome not applying .bash_profile when it was started by GDM.
Starting via .xinitrc usually did work here.

BTW, I never use the root terminal. Always su - in a user terminal.

Last edited by bernarcher (2009-03-28 21:36:38)


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB