LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Locale or run level - cannot open display message (https://www.linuxquestions.org/questions/linux-newbie-8/locale-or-run-level-cannot-open-display-message-781908/)

konzo 01-13-2010 04:42 AM

Locale or run level - cannot open display message
 
I try to change locale for a program to run my native language with root. I don't know what I made, but can't open gui programs from konsole with root account. It appear this error:

Code:

root@laptop:/etc/profile.d# mousepad

(process:4284): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
No protocol specified

(mousepad:4284): Gtk-WARNING **: cannot open display: :0.0
root@laptop:/etc/profile.d#


When type locale, it appear:
Code:

root@laptop:/etc/profile.d# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_EN
LC_CTYPE="en_EN"
LC_NUMERIC="en_EN"
LC_TIME="en_EN"
LC_COLLATE=C
LC_MONETARY="en_EN"
LC_MESSAGES="en_EN"
LC_PAPER="en_EN"
LC_NAME="en_EN"
LC_ADDRESS="en_EN"
LC_TELEPHONE="en_EN"
LC_MEASUREMENT="en_EN"
LC_IDENTIFICATION="en_EN"
LC_ALL=
root@laptop:/etc/profile.d#

It seems all ok, because I changed LANG with bg_BG, but there is some problem with monitor "(mousepad:4284): Gtk-WARNING **: cannot open display: :0.0"

Yesterday I make run level 4 to skip typing startx in console, and login directly to KDE.


Could be that the problem?

brianL 01-13-2010 04:58 AM

Try, from your own account:
Code:

kdesu mousepad
then enter root's password.
To change locale, edit /etc/profile.d/lang.sh
change en_US
Code:

export LANG=en_US
to whatever you want.

konzo 01-13-2010 05:28 AM

I want to run gui programs from konsole, as before. I don't know what I do, but can't run mousepad directly with root account. Something messed up. In lang.sh everything seems ok.

How can I fix "Using the fallback 'C' locale." Which locale should I change to what?

konzo 01-13-2010 06:31 AM

I actually found a solution at (the first post of Nikos_M)

http://ubuntuforums.org/archive/index.php/t-166863.html

but after restating it happen again

The error is

Invalid MIT-MAGIC-COOKIE-1 key
(mousepad:3943): Gtk-WARNING **: cannot open display: :0.0



Can I delete that key and make it again or something ?

brianL 01-13-2010 06:35 AM

Are you logging in as root, then trying kdesu? Log in as your regular user to use kdesu mousepad (or whatever GUI).

konzo 01-14-2010 04:32 PM

I log in as user and then su and pass to log in as root to make install or something else. I was able before to mousepad from root account, but after make some locale changes this error appear. I didn't make an image (but I have to) of the previous condition and I now I want to get back as before was.


All times are GMT -5. The time now is 09:46 PM.