Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Character enconding in konsole, terminal and ntfs3g
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Sun Jan 02, 2011 2:52 pm    Post subject: [SOLVED] Character enconding in konsole, terminal and ntfs3g Reply with quote

Hi guys,
trying to run Polish characters support in my Gentoo. I actually thought that they were up and running until I tried to use Konsole to copy some files to NTFS partition and got an error
Code:

kuba-laptop konsole # cp Powłoka.profile /mnt/usb/
cp: cannot stat `/mnt/usb/Pow\263oka.profile': Invalid or incomplete multibyte or wide character

The mount command that I used was:
Code:

kuba-laptop konsole # mount -t ntfs-3g -o locale=pl_PL.UTF-8 /dev/sdb1 /mnt/usb


I tried a lot of solutions described on the forum and in the localization guides but my system seems to somehow resist them.
Let me now describe other symptoms that I am experiencing:
1) Konsole.
Typing Polish characters is no problem, however when I use ls they don't show up:
Code:

kuba-laptop konsole # ls
Pow?oka.profile  WhiteOnBlack.colorscheme  konsole  konsoleui.rc

Still they show up when I use Tab to complete the file name.
The settings that I use are UTF-8 in Settings -> Edit Current Profile -> Advanced/Encoding.
2) Midnight Commander
Every Polish character is displayed as a question mark (or even two question marks per character), despite having set UTF-8 in Option -> Display Bits and Right -> Encoding.
3) Dolphin
Polish characters are replaced with question marks in the icon names, however I can create files with Polish names using the dialog box, even on the ntfs-3g mounted device.
4) Standard terminal
Here I can type Polish characters, and create files with names containing them even on the ntfs-3g mounted device. Still ls shows question marks instead of them, and Tab completion shows them as shaded blocks.

Ok, thats it for the symptoms. I shall now describe my system wide settings and what I am aiming for.
I would like my system to communicate with me in English (so I am able to google the error messages:), install english versions of all programs but recognize Polish fonts and display numbers, adressess etc in Polish format. Here are my settings I think might be useful:
Code:

kuba-laptop konsole # cat /etc/locale.gen
# /etc/locale.gen: list all of the locales you want to have on your system
#
# The format of each line:
# <locale> <charmap>
#
# Where <locale> is a locale located in /usr/share/i18n/locales/ and
# where <charmap> is a charmap located in /usr/share/i18n/charmaps/.
#
# All blank lines and lines starting with # are ignored.
#
# For the default list of supported combinations, see the file:
# /usr/share/i18n/SUPPORTED
#
# Whenever glibc is emerged, the locales listed here will be automatically
# rebuilt for you.  After updating this file, you can simply run `locale-gen`
# yourself instead of re-emerging glibc.

#en_US ISO-8859-1
en_US.UTF-8 UTF-8
pl_PL.UTF-8 UTF-8
#ja_JP.EUC-JP EUC-JP
#ja_JP.UTF-8 UTF-8
#ja_JP EUC-JP
#en_HK ISO-8859-1
#en_PH ISO-8859-1
#de_DE ISO-8859-1
#de_DE@euro ISO-8859-15
#es_MX ISO-8859-1
#fa_IR UTF-8
#fr_FR ISO-8859-1
#fr_FR@euro ISO-8859-15
#it_IT ISO-8859-1

Code:

kuba-laptop konsole # locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8@euro
LC_CTYPE=pl_PL.utf8
LC_NUMERIC=pl_PL.UTF-8
LC_TIME=pl_PL.UTF-8
LC_COLLATE=C
LC_MONETARY=pl_PL.UTF-8@euro
LC_MESSAGES=C
LC_PAPER=pl_PL.UTF-8@euro
LC_NAME=pl_PL.UTF-8@euro
LC_ADDRESS=pl_PL.UTF-8@euro
LC_TELEPHONE=pl_PL.UTF-8@euro
LC_MEASUREMENT=pl_PL.UTF-8@euro
LC_IDENTIFICATION=pl_PL.UTF-8@euro
LC_ALL=


Any idea where the above error regarding LC_ALL comes from?

Code:

kuba-laptop konsole # cat /etc/env.d/02locale
LANG="en_GB.UTF-8@euro"
LC_COLLATE="C"
LC_CTYPE="pl_PL.utf8"
LC_MONETARY="pl_PL.UTF-8@euro"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_MESSAGES="C"
LC_PAPER="pl_PL.UTF-8@euro"
LC_NAME="pl_PL.UTF-8@euro"
LC_ADDRESS="pl_PL.UTF-8@euro"
LC_TELEPHONE="pl_PL.UTF-8@euro"
LC_MEASUREMENT="pl_PL.UTF-8@euro"
LC_IDENTIFICATION="pl_PL.UTF-8@euro"
LC_ALL=""


Code:

kuba-laptop konsole # cat /etc/conf.d/consolefont
# /etc/conf.d/consolefont

# CONSOLEFONT specifies the default font that you'd like Linux to use on the
# console.  You can find a good selection of fonts in /usr/share/consolefonts;
# you shouldn't specify the trailing ".psf.gz", just the font name below.
# To use the default console font, comment out the CONSOLEFONT setting below.
# This setting is used by the /etc/init.d/consolefont script (NOTE: if you do
# not want to use it, run "rc-update del consolefont" as root).

CONSOLEFONT="lat2a-16"

# CONSOLETRANSLATION is the charset map file to use.  Leave commented to use
# the default one.  Have a look in /usr/share/consoletrans for a selection of
# map files you can use.

CONSOLETRANSLATION="8859-2_to_uni"


and despite
Code:

kuba-laptop konsole # rc-update -s boot
           alsasound | boot
            bootmisc | boot
             checkfs | boot
           checkroot | boot
               clock | boot
         consolefont | boot
            hostname | boot
             hotplug | boot
             keymaps | boot
          localmount | boot
             modules | boot
              net.lo | boot
             urandom | boot


the $CONSOLEFONT is empty
Code:

kuba-laptop konsole # echo $CONSOLEFONT

kuba-laptop konsole #

Code:

kuba-laptop konsole # emerge --info
Portage 2.1.9.24 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.34-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.34-gentoo-r6-x86_64-Intel-R-_Core-TM-2_CPU_T7200_@_2.00GHz-with-gentoo-1.12.14
Timestamp of tree: Fri, 31 Dec 2010 21:45:02 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 1.3.7-r1, 2.1.11-r1
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13::<unknown repository>, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -mfpmath=sse,387 -msse2 -mmmx"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -mfpmath=sse,387 -msse2 -mmmx"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.prz.rzeszow.pl"
LANG="en_GB.UTF-8@euro"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en pl"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac aalib acl acpi aiglx alsa amd64 audiofile avi bash-completion berkdb binary-drivers bluetooth bzip2 cddb cdparanoia cdr cg cli cracklib crypt cups cxx dbus directfb divx4linux djvu doc dri dts dv dvd dvdr dvdread dvi encode exif fame fbcon ffmpeg fftw firefox flac fortran ftp gd-external gdbm gif glut gmp gnokii gphoto2 gpm gtk gtk2 ical iconv ieee1394 imagemagick ipv6 irda jack java javascript jikes jpeg jpeg2k kde libcaca libww lm_sensors mad mime mjpeg mmap mmx mmx2 mng modules mp3 mpeg mplayer mudflap multilib musepack ncurses nls nptl nptlonly nsplugin nvidia offensive ogg openal opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline recode samba sdl session sharedmem slang sockets sox spell sse sse2 ssl subtitles svg sysfs tcpd tiff timidity tk truetype unicode usb vcd vim-syntax vim_with-x vorbis wifi wmf wxwindows x264 xcomposite xine xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keybord mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pl" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


So guys, ideas what am I doing wrong and how can I get those Polish fonts looking nice and smooth?
Any help would be appreciated. Cheers!


Ah... and the last thing
Code:

kuba-laptop konsole # date
Sun Jan  2 14:49:05 GMT 2011

Anybody knows why my time shows as GMT instead of CET despite having Europe/Warsaw set as TZ?Tx


Last edited by Grothendieck on Tue Jan 04, 2011 4:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5985

PostPosted: Sun Jan 02, 2011 5:47 pm    Post subject: Reply with quote

I'd start with dropping '@euro' part, that's only for non-utf8 locales.
Also, if your ntfs3g is decently recent, it shouldn't have 'locale' option, but always mount as utf8.
And be consistent, don't go from utf8 to UTF-8.
Back to top
View user's profile Send private message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Sun Jan 02, 2011 8:53 pm    Post subject: Reply with quote

First of all, thanks for the reply.
I dropped the euro part and it repaired the "locale: Cannot set LC_ALL to default locale: No such file or directory" error. I was aimed at this option by Gentoo Polish localization guide at http://www.gentoo.org/doc/pl/guide-localization.xml which in listing 3.1 states LANG="pl_PL.utf8@euro". I also corrected everything to UTF-8. Any chance for quick explanation of the difference between UTF-8 and utf8?
My ntfs-3g is 2010.8.8 and looks like still is able to recognize '-o locale=' because when I pass some random stuff instead of 'pl_PL.UTF-8' it reacts:

Code:

kuba-laptop konsole # mount -t ntfs-3g -o locale=boogiewoogie /dev/sdb1 /mnt/usb
Invalid locale, encoding to UTF-8
kuba-laptop konsole #


however, the UTF-8 seems to be the default.
So thanks to your help I was able to get rid of one error, but unfortunately other still remain.
Cheers.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5985

PostPosted: Sun Jan 02, 2011 10:39 pm    Post subject: Reply with quote

For utf8 and UTF-8, usually one is an alias for the other.
That output from ntfs3g means that 'locale=' is ignored, as that version is recent enough.

As for the filesystem, you just might be screwed - on linux, files are created with filenames of system encoding,
if those files were created while it was still latin2, you will need something like convmv and a lot of patience to fix it.
(a good test could be output of 'LANG=pl_PL ls <filename>', if that displays correctly, you need to convmv)

Be careful though, the guess algorithm of convmv isn't what you'd call flawless.
Back to top
View user's profile Send private message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Mon Jan 03, 2011 12:01 am    Post subject: Reply with quote

Looks like I messed up with implementing the change suggested by VoidMage and a proper reboot revealed that removing '@euro' solved the fonts under konsole, mc and dolphin (env-update && source /etc/profile and opening new tab in konsole wasnt quite enough...). Now newly created files with Polish names display properly in those programs. What is more, running
Code:

convmv -f latin2 -t UTF-8 --nosmart --notest <filename>

helps with the old files. (--nosmart is necessary, as convmv somehow recognizes that filename is already UTF-8).
So thanks to VoidMage, issues 1,2,3 from my first post are solved.
The current state of affairs is that in the regular terminal (not in KDE) old and new filenames are still displayed incorrectly. All Polish characters are just shaded blocks. However, Polish characters look good on the commandline and if I create a file in the terminal it 'ls'es correctly in the terminal. However it is displayed incorrectly in konsole and dolphin. Looks like konsole and terminal encodings are somewhat incompatible. Maybe it's somehow connected to the CONSOLEFONT issue? Any ideas on the GMT vs CET issue?
Stay tuned.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5985

PostPosted: Mon Jan 03, 2011 1:26 am    Post subject: Reply with quote

There's no CONSOLEFONT issue, that var is exported only in startup script.
Post your full env, not just the vars printed by portage.
And drop that 'LC_ALL=""'.
Back to top
View user's profile Send private message
Chiitoo
Veteran
Veteran


Joined: 28 Feb 2010
Posts: 1007
Location: Here and Away Again

PostPosted: Mon Jan 03, 2011 1:36 am    Post subject: Reply with quote

Grothendieck wrote:
Looks like I messed up with implementing the change suggested by VoidMage and a proper reboot revealed that removing '@euro' solved the fonts under konsole, mc and dolphin (env-update && source /etc/profile and opening new tab in konsole wasnt quite enough...).

Just wanted to point out, some changes such as this need at least a logout/login to take effect.
If I'm not horribly wrong, without some exceptions you only require a re-boot if you have altered your Kernel, or want to boot another Kernel. ^^

As for the issues with Konsole/Dolphin\and such, I can't really help there for I have similar issues but haven't really solved it. It has not been terribly annoying to me so I've been lazy with it.

Here you can find some talk about it, if you're interested.


Good luck!
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Mon Jan 03, 2011 9:51 am    Post subject: Reply with quote

Ok, here goes env:
Code:

kuba-laptop conf.d # env | sort
ANT_HOME=/usr/share/ant
CLASSPATH=.
COLORFGBG=15;0
CONFIG_PROTECT=/usr/share/X11/xkb /var/lib/hsqldb /usr/share/config
CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/env.d/java/ /etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/ca-certificates.conf /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild
CVS_RSH=ssh
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Y6UElKy771,guid=cb0652f1a4b79315d55d80770000006f
DISPLAY=:0.0
EDITOR=/bin/nano
GCC_SPECS=
GDK_USE_XFT=1
GENERATION=2
GS_LIB=/root/.fonts
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/root/.gtkrc-2.0::/root/.kde4/share/config/gtkrc-2.0
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc::/root/.kde4/share/config/gtkrc
GUILE_LOAD_PATH=/usr/share/guile/1.8
HOME=/root
HUSHLOGIN=FALSE
ICAROOT=/opt/ICAClient
INFOPATH=/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.20.1/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.4/info
JAVAC=/etc/java-config-2/current-system-vm/bin/javac
JAVACC_HOME=/usr/share/javacc/
JAVA_HOME=/etc/java-config-2/current-system-vm
JDK_HOME=/etc/java-config-2/current-system-vm
KDE_FULL_SESSION=true
KDE_MULTIHEAD=false
KDE_SESSION_UID=0
KDE_SESSION_VERSION=4
KONSOLE_DBUS_SERVICE=:1.39
KONSOLE_DBUS_SESSION=/Sessions/5
LANG=en_GB.UTF-8
LANGUAGE=
LC_ADDRESS=pl_PL.UTF-8
LC_COLLATE=C
LC_CTYPE=pl_PL.UTF-8
LC_IDENTIFICATION=pl_PL.UTF-8
LC_MEASUREMENT=pl_PL.UTF-8
LC_MESSAGES=C
LC_MONETARY=pl_PL.UTF-8
LC_NAME=pl_PL.UTF-8
LC_NUMERIC=pl_PL.UTF-8
LC_PAPER=pl_PL.UTF-8
LC_TELEPHONE=pl_PL.UTF-8
LC_TIME=pl_PL.UTF-8
LESS=-R -M --shift 5
LESSOPEN=|lesspipe.sh %s
LOGNAME=root
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
MAIL=/var/mail/root
MANPATH=/etc/java-config-2/current-system-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.20.1/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.4/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/lib64/php5/man/
OLDPWD=/root/music
OPENGL_PROFILE=nvidia
PAGER=/usr/bin/less
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.4:/opt/ICAClient:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin
PRELINK_PATH_MASK=/usr/lib64/libfreebl3.so:/usr/lib64/libnssdbm3.so:/usr/lib64/libsoftokn3.so
PROFILEHOME=
PWD=/etc/conf.d
PYTHONDOCS=/usr/share/doc/python-docs-2.6.5/html/library
PYTHONDOCS_2_6=/usr/share/doc/python-docs-2.6.5/html/library
PYTHONDOCS_3_1=/usr/share/doc/python-docs-3.1.2/html/library
QT_PLUGIN_PATH=/root/.kde4/lib64/kde4/plugins/:/usr/lib64/kde4/plugins/
R_HOME=/usr/lib64/R
SANE_CONFIG_DIR=/etc/sane.d
SESSION_MANAGER=local/kuba-laptop:@/tmp/.ICE-unix/5912,unix/kuba-laptop:/tmp/.ICE-unix/5912
SHELL=/bin/bash
SHLVL=4
STRIGI_PLUGIN_PATH=/usr/lib64/strigi:
TERM=xterm
USB_DEVFS_PATH=/dev/bus/usb
USER=root
VBOX_APP_HOME=/opt/VirtualBox
VMHANDLE=blackdown-jdk-1.4.2
WINDOWID=27263013
WINDOWPATH=7
XAUTHORITY=/root/.Xauthority
XCURSOR_THEME=Oxygen_Black
XDG_CONFIG_DIRS=/etc/xdg
XDG_DATA_DIRS=/usr/share:/usr/local/share:/usr/share
XDG_SESSION_COOKIE=f3d79bbd0a55d5114f597000466e76f6-1294128368.443912-374980837
XSESSION=KDE-4
_=/usr/bin/env

TZ=GMT? Where does that come from? [already solved]

Code:

kuba-laptop ~ # cat /etc/conf.d/clock
# /etc/conf.d/clock

# Set CLOCK to "UTC" if your hardware clock is set to UTC (also known as
# Greenwich Mean Time).  If that clock is set to the local time, then
# set CLOCK to "local".
# Note that if you dual boot with Windows, then you should set it to
# "local" because Windows always sets the hardware clock to local time.

CLOCK="UTC"

# Select the proper timezone.  For valid values, peek inside of the
# /usr/share/zoneinfo/ directory.  For example, some common values are
# "America/New_York" or "EST5EDT" or "Europe/Berlin".  If you want to
# manage /etc/localtime yourself, set this to "".

TIMEZONE="Europe/Warsaw"

# If you wish to pass any other arguments to hwclock during bootup,
# you may do so here.

CLOCK_OPTS=""

# If you want to set the Hardware Clock to the current System Time (software
# clock) during shutdown, then say "yes" here.

CLOCK_SYSTOHC="no"


### ALPHA SPECIFIC OPTIONS ###

# If your alpha uses the SRM console, set this to "yes".
SRM="no"

# If your alpha uses the ARC console, set this to "yes".
ARC="no"


@Chiitoo:
Dolphin and konsole now display Polish fonts fine. Dropping @euro did the job. Thanks for the reply anyway.


Last edited by Grothendieck on Tue Jan 04, 2011 1:45 pm; edited 2 times in total
Back to top
View user's profile Send private message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Mon Jan 03, 2011 10:24 am    Post subject: Reply with quote

Ah, /etc/profile.env had a line which set TZ to GMT. Removing it solved the issue of GMT instead of CET. No idea, how GMT made its way to profile.env...
So, only fonts in terminal left to go.
Cheers!
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5985

PostPosted: Mon Jan 03, 2011 10:30 am    Post subject: Reply with quote

What do you mean by "standard terminal" ? console, xterm ?

And you could at least 'env | sort', for easier reading.
Also, that LANGUAGE var is used somehow by KDE, so it should probably be set to a meaningful value or unset.
Back to top
View user's profile Send private message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Mon Jan 03, 2011 10:33 am    Post subject: Reply with quote

I think its called the console. Not the konsole, nor xterm. You know, the old school thing, where you type 'startx':)
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5985

PostPosted: Mon Jan 03, 2011 10:49 am    Post subject: Reply with quote

Personally, when I use lat2a-16, I set consoletranslation="trivial" and unicodemap="lat2u",
as there's something broken about that font.

Mind I'm on baselayout2, I no longer fully recall how was I setting it on v1 (it was similar, but not the same).
Back to top
View user's profile Send private message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Mon Jan 03, 2011 10:52 am    Post subject: Reply with quote

The only place I can find reference to LANGUAGE is /etc/make.conf:
Code:

LANGUAGE=48


So how come, env shows its empty?

Of course I could do 'env | sort' but just wasnt aware of it. If I was all that fluent wouldn't be asking for help here.
Anyway you're right, env corrected:)
Stay cool, cheers!


Last edited by Grothendieck on Tue Jan 04, 2011 1:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Mon Jan 03, 2011 11:02 am    Post subject: Reply with quote

I set the unicodemap and consoletranslation as you said, but nothing changed. Maybe I am missing something trivial but why those varaibles dont show up in env?
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5985

PostPosted: Mon Jan 03, 2011 12:40 pm    Post subject: Reply with quote

As I said, these values work on baselayout 2.
Look at the script and see what's it using, then check the manpage of the tool.
IIRC on v1 I abused CONSOLETRANSLATION to pass both of these values.
Back to top
View user's profile Send private message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Tue Jan 04, 2011 11:06 am    Post subject: Reply with quote

My /etc/init.d/consolefont uses setfont so I changed it to pass '-u ${UNICODEMAP}' and now using the lat2a-16 font together with CONSOLETRANSLATION="trivial" the console properly displays filenames created under konsole. However, polish characters typed in command line show up as blank characters and if I create a filename under console the polish characters display incorrectly in konsole or dolphin. Any ideas?
In addition I searched all directories that came to my mind in /etc/ and /home to track the LANGUAGE but I found nothing except /etc/make.conf setting its value to 48. What do you think about that?
Regards.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5985

PostPosted: Tue Jan 04, 2011 2:28 pm    Post subject: Reply with quote

Is locale at console same as in X ?
See /etc/conf.d/keymaps too.
Back to top
View user's profile Send private message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Tue Jan 04, 2011 2:59 pm    Post subject: Reply with quote

Yep, the results of 'locale' are the same under console and X.
Here goes /etc/conf.d/keymaps, I configured it according to the localization guide, at least I hope so.
Code:

kuba-laptop htdocs # cat /etc/conf.d/keymaps

# /etc/conf.d/keymaps

# Use KEYMAP to specify the default console keymap.  There is a complete tree
# of keymaps in /usr/share/keymaps to choose from.

KEYMAP="pl"


# Should we first load the 'windowkeys' console keymap?  Most x86 users will
# say "yes" here.  Note that non-x86 users should leave it as "no".

SET_WINDOWKEYS="no"


# The maps to load for extended keyboards.  Most users will leave this as is.

EXTENDED_KEYMAPS=""
#EXTENDED_KEYMAPS="backspace keypad euro"


# Tell dumpkeys(1) to interpret character action codes to be
# from the specified character set.
# This only matters if you set UNICODE="yes" in /etc/rc.conf.
# For a list of valid sets, run `dumpkeys --help`

DUMPKEYS_CHARSET=""
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5985

PostPosted: Tue Jan 04, 2011 3:51 pm    Post subject: Reply with quote

Set keymap to pl2 and dumpkeys_charset to iso-8859-2.

Oh, and that comment is actually meant for x86/amd64.
Back to top
View user's profile Send private message
Grothendieck
n00b
n00b


Joined: 24 Jan 2007
Posts: 26
Location: Warszawa, Polska

PostPosted: Tue Jan 04, 2011 4:07 pm    Post subject: Reply with quote

And now its working! Thank you very much for your help!
Cheers!
Back to top
View user's profile Send private message
miroR
Guru
Guru


Joined: 05 Mar 2008
Posts: 577

PostPosted: Tue Nov 01, 2011 1:27 pm    Post subject: All well but as root only. Reply with quote

Grothendieck wrote:
And now its working! Thank you very much for your help!
Cheers!

Similar issues, just Croatian characters. Same iso8859-2 set as the Polish.
I got it fine since relinquishing bulky KDE loaders and adopting Slim and Openbox. It's more like Openbox and Slim, never mind.
But on yesterday's 'emerge -avtuDN world' update, I lost some configuration, obviously, and...
And some of the advice in this conversation was useful.
I got it all working fine (did't try it with ntfs-3g nor on Mac filesystems, and will have to, soon!)...
But I got it all working fine as root only. Not as regular user...
More precisely, as root all is as should be, but as regular user, I can type "šđžćčŠĐŽĆČ" the Croatian Unicode characters, and create files containing any of them, but it messes up my konsole to jusl list those files. Like this:
Code:
miro@at8-g250-c ~ $ touch Miro_HR_chars_šđžćč_file.linux
miro@at8-g250-cls -l ouch Miro_HR_chars_šđžćč_file.linux
-rw-r--r-- 1 miro miro 0 2011-11-01 15:11 Miro_HR_chars_??????????_file.linux
miro@at8-g250-c ~ $

That was literal, unedited, cut'n'paste from regular user Konsole tab. I mean I pasted over the messed up part of the screen. Tab completion is gone, the Konsole is all lost and bewildered... Throws up wrong content...
If I do the same as root, all is well:
Code:
at8-g250-c miro # touch as_root_Miro_HR_chars_šđžćč_file.linux
at8-g250-c miro # ls -l  as_root_Miro_HR_chars_šđžćč_file.linux
-rw-r--r-- 1 root root 0 2011-11-01 15:14 as_root_Miro_HR_chars_šđžćč_file.linux

Actually, the previous regular user created file is just fine, only it messes up my console when I'm regular user. See, as root I list it just fine:
Code:

at8-g250-c miro # ls -l Miro_HR_chars_šđžćč_file.linux
-rw-r--r-- 1 miro miro 0 2011-11-01 15:11 Miro_HR_chars_šđžćč_file.linux
at8-g250-c miro #

Where do I look up for bequeathing the language and associate envs from root to regular user?
What and where do I search and what do I post to look and ask for solutions?
That much for now.
Since I am asking for advice, I'll make sure I post the solution if I find it sooner on my own.
God bless everyone, and thanks to big guys behind the Gentoo project. It's sometimes very difficult, but it's superb, one of the best among the Linuces around!
Back to top
View user's profile Send private message
miroR
Guru
Guru


Joined: 05 Mar 2008
Posts: 577

PostPosted: Tue Nov 01, 2011 1:58 pm    Post subject: Re: All well but as root only. Reply with quote

miroR wrote:
Grothendieck wrote:
And now its working! ...

Similar issues, just Croatian characters. ...

In Konsole, which is where things most happen on my Gentoo boxes, I needed to, as explained above, make it:
Grothendieck wrote:
use UTF-8 in Settings -> Edit Current Profile -> Advanced/Encoding

Why did Konsole lose these settings, I can't tell, because I already set that when I moved to Openbox and associates.
In the meantime btwn these two posts of mine today (whether first or sole two of today that they be), I rebooted, and was surprised that I lost the configuration.
Then I found I made a pasting error in
/etc/conf.d/keymaps
and corrected:
Code:
dumpkeys_charset="so-8859-2"

to read:
Code:
dumpkeys_charset="iso-8859-2"

after whch, just issuing as root:
Code:
env-update && source /etc/profile

got the root fine with šđžćčŠĐŽĆČ
and as regular user:
Code:
source /etc/profile

also made the trick.
Now all seems well.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum