LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2010, 04:42 AM   #1
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Rep: Reputation: 34
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?

Last edited by konzo; 01-30-2010 at 03:41 AM.
 
Old 01-13-2010, 04:58 AM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,307
Blog Entries: 61

Rep: Reputation: Disabled
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.

Last edited by brianL; 01-13-2010 at 05:00 AM.
 
Old 01-13-2010, 05:28 AM   #3
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 34
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?

Last edited by konzo; 01-13-2010 at 05:30 AM.
 
Old 01-13-2010, 06:31 AM   #4
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 34
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 ?
 
Old 01-13-2010, 06:35 AM   #5
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,307
Blog Entries: 61

Rep: Reputation: Disabled
Are you logging in as root, then trying kdesu? Log in as your regular user to use kdesu mousepad (or whatever GUI).
 
Old 01-14-2010, 04:32 PM   #6
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 34
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't switch to TTY or run level 3 from run level 5 reemfz Fedora 3 06-01-2009 08:06 AM
set your default run level so you will boot to a default run level - vga console Adam555 Linux - Newbie 1 01-21-2008 04:55 PM
emacs in run level 3 then switch to X (level 7) then back to level 3 dsoliver Slackware 3 09-01-2006 03:31 AM
apache2 error message in run level hiplainsdrifter Linux - Networking 3 04-21-2004 01:18 PM
Run Level Failure Message Chijtska Linux - General 5 02-10-2002 08:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration