You are not logged in.

#1 2006-03-07 14:35:02

bercupic
Member
From: Pula, Croatia
Registered: 2006-02-28
Posts: 12

su - in gnome-terminal

When I exec

su - in gnome-terminal

the result  is garbled prompt. Before switch user command I have prompt:

[berni@laptop ~]$

and after su command I have prompt like this:

Ü0;root§laptop:ßÄroot§laptop ßÜ#

When I reset the terminal, the prompt is OK again and I have:

[root@laptop ~]#

In my .bashrc, as in root's .bashrc, I have

PS1='[u@h W]$ '

What could be the problem?

As berni user I have:

[berni@laptop ~]$ locale
LANG=hr_HR
LC_CTYPE="hr_HR"
LC_NUMERIC="hr_HR"
LC_TIME="hr_HR"
LC_COLLATE=C
LC_MONETARY="hr_HR"
LC_MESSAGES="hr_HR"
LC_PAPER="hr_HR"
LC_NAME="hr_HR"
LC_ADDRESS="hr_HR"
LC_TELEPHONE="hr_HR"
LC_MEASUREMENT="hr_HR"
LC_IDENTIFICATION="hr_HR"
LC_ALL=

but as root I have locale:

[root@laptop ~]# locale
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE=C
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=

Could this be the problem? Same thing is at my laptop as at my home desktop PC.

The problem happened before switch to the Xorg7 and I think it is much more related to the gnome upgrade.
I have done pacman -Syu and I dont have [testing] in my repository list.

Regards, Berni.

Offline

#2 2006-03-07 21:56:53

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: su - in gnome-terminal

How you root locale is different than your user locale *-) ??

What is your LOCALE= in /etc/rc.conf ??

Offline

#3 2006-03-07 23:13:40

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: su - in gnome-terminal

Guess this one is related:
http://bugs.archlinux.org/task/3035

Offline

#4 2006-03-08 08:02:14

bercupic
Member
From: Pula, Croatia
Registered: 2006-02-28
Posts: 12

Re: su - in gnome-terminal

_Gandalf_ wrote:

How you root locale is different than your user locale *-) ??

What is your LOCALE= in /etc/rc.conf ??

OK, I didnt set LOCALE in rc.conf and that's why my locale differ from root's locale. I did set languge in gdm chooser.
I have corrected this and now root's locale is the same as berni's.
But that didn't make any difference. I still have to reset my gnome-terminal upon switch to root.

In aterm everything works OK, the prompt is correct.

Offline

#5 2006-03-08 08:14:09

bercupic
Member
From: Pula, Croatia
Registered: 2006-02-28
Posts: 12

Re: su - in gnome-terminal

I have found the cause.

In /etc/profile.d/locale.sh there are 3 lines:

export LANG=hr_HR.UTF-8
echo -ne "e%G"
echo -ne "e(K"

If I comment the last line, everything works fine, upon switch user I have normal prompt.

Anyone knows what these lines are for?

Offline

#6 2006-03-08 13:26:25

raskolnikov
Member
From: France
Registered: 2006-01-08
Posts: 100

Re: su - in gnome-terminal

That's for some Unicode terminals... I opened a bug some time ago for this, it has been fixed (package initscripts) but I think they are in testing repo for now.

You can try to add this in your rc.local, to fix it :

echo export LANG=hr_HR.UTF-8 > /etc/profile.d/locale.sh
echo echo -ne "e%G" >> /etc/profile.d/locale.sh

Excessive showering, grooming, and toothbrushing is not only vain, it wastes valuable coding time.

Offline

#7 2006-03-08 20:01:57

bercupic
Member
From: Pula, Croatia
Registered: 2006-02-28
Posts: 12

Re: su - in gnome-terminal

Yes, this solved the problem. It's been anoying to go to the menu and reset terminal everytime I had to do something using the root account.

Than's everyone.

But, realy, why this happened only for the root user? Why not for the regular user?

Offline

Board footer

Powered by FluxBB