LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Issue with keyboard layout in X server (vs console) (http://www.linuxquestions.org/questions/debian-26/issue-with-keyboard-layout-in-x-server-vs-console-237014/)

michapma 09-30-2004 06:41 AM

Issue with keyboard layout in X server (vs console)
 
I've just done a reinstall on a machine at work, using this week's version of Sarge. I have no net access (house rules are Windows only), so I've got this week's Sarge CDs (the first four anyway).

The install went fine, and I installed the following packages:

apt-get install x-window-system
apt-get install vim locales
apt-get install icewm icewm-themes
apt-get install locales
apt-get install localepurge
apt-get install deborphan debfoster
apt-get install ksnapshot xzgv memstat

Now when I installed, I mounted these two partitions (hostname is marconi):
/usr/marconi/home1/<username>
/usr/marconi/home2/<username> (for backups of a sort)

After installation, I did the following:

mv /home/<username> /usr/marconi/home1/<username>
ln -s /usr/marconi/home1/<username> <username>

After having run locales, the keyboard works as expected in the console. However, I can't log in to the X server, because the login screen doesn't accept the special characters. This is related to the AltGr key: many of the keys are following the Swiss German mapping, but some are not, including some of the ones needed for login.

Any suggestions how I configure the keyboard properly for the X server, although it works correctly in the console?

Thanks,
Mike

macondo 09-30-2004 09:39 AM

Try this on your /etc/environment:

LC_ALL=<your locale>
LANGUAGE=<your locale>

reboot

macondo 09-30-2004 10:57 AM

# dpkg-reconfigure console-data


- Type -> qwerty.
- Model -> <your language>
- Variant -> Standard
- Map -> Standard

It will rewrite the file: /etc/console/boottime.kmap.gz.

Edit the file:

/etc/inputrc

so these parameters are included:

-------------------------------------------------------------------------------
set input-meta on
set output-meta on
-----------------------------------------

reboot

michapma 09-30-2004 11:20 AM

I didn't have an /etc/environment, and didn't want to create one without understanding that I could.

I executed the dpkg-reconfigure cosole-data. I used qwertz instead of qwerty, and chose the options more or less the way you've listed them (there was some difference in how they were presented). After restarting, the old problem was still there.

I have meanwhile rechosen the login information so that it doesn't require special characters, so at least I can start up IceWM.

Unfortunately, it looks horrible, presumably because I chose or specified something wrong in the X specifications. I used advanced in the XFree86 setup, correctly entered the horizontal and vertical sync rates according to the manufacturer's specs, and let it autodetect the card since it is an older TNT2M64. The recognition seems to have worked fine if the fact that it is precisely identified by the description given by the system (NVidia TNT2 M64). I must have given in the right PCI address since it is displaying something at all. It's an LCD and I chose the presented LCD settings. But something's clearly wrong, because each time the screen is redrawn the pixels are shifted about, making it look like I imagine it might if I were on some kind of heavy medication.

Well, time for yet another Google Trip and game of Search the Forums. ;)

Edit: According to the DistroWatch article, there are some apps like Xvidtune that I might be able to play around with to tweak things.

macondo 09-30-2004 11:49 AM

"I've just done a reinstall on a machine at work, using this week's version of Sarge. I have no net access (house rules are Windows only), so I've got this week's Sarge CDs (the first four anyway).

The install went fine, and I installed the following packages:

apt-get install x-window-system
apt-get install vim locales
apt-get install icewm icewm-themes
apt-get install locales
apt-get install localepurge
apt-get install deborphan debfoster
apt-get install ksnapshot xzgv memstat"

********************************************************************

Just vim, you are installing the 'locales' package twice. When you install, do this, all the packages one after the other, or at least by categories.

apt-get install x-window-system vim locales icewm icewm-themes iceme localepurge deborphan debfoster xzgv xfe memstat mc numlockx etc ad nausem.



"Now when I installed, I mounted these two partitions (hostname is marconi):
/usr/marconi/home1/<username>
/usr/marconi/home2/<username> (for backups of a sort)

After installation, I did the following:

mv /home/<username> /usr/marconi/home1/<username>
ln -s /usr/marconi/home1/<username> <username>"

Don't know what you're doing, but if it works, fine.

"After having run locales,"

do you mean:

#dpkg-reconfigure locales???

"the keyboard works as expected in the console. However, I can't log in to the X server, because the login screen doesn't accept the special characters. This is related to the AltGr key: many of the keys are following the Swiss German mapping, but some are not, including some of the ones needed for login."

#dpkg-reconfigure xserver-xfree86

choose 'PC 105' (international), or try the keyboard model. I type in mine:

Logitech iTouch

leave the 'variant' and 'option' screens in blank,

in the next screen, my language:

es

my AltGr key works perfectly.

get outta there, reboot




michapma 09-30-2004 11:55 AM

Sorry, I don't understand what you mean by that. Are you wanting to point out something that I said earlier that should point something out to me?

macondo 09-30-2004 12:09 PM

"Sorry, I don't understand what you mean by that. Are you wanting to point out something that I said earlier that should point something out to me?"

Please quote me, so i know what you are referring to.

michapma 09-30-2004 12:25 PM

Sorry, there was proabably some kind of forum oddity. The last time I looked in this thread, the fifth post in the thread was a reply by you containing only my original post, quoted character for character. Now the post is different. So please regard my previous post.
-------------------------------------

I must have overlooked the order of installation, as I was looking on paper, so my report was incorrect. I didn't install locales twice.


"do you mean:

#dpkg-reconfigure locales???"

Well, when I installed locales, it took me through the locales selection menu. I was following your post-installation guide sticky, so if I used the package, I would have used #dpkg-reconfigure locales.

Quote:

#dpkg-reconfigure xserver-xfree86

choose 'PC 105' (international), or try the keyboard model. I type in mine:

Logitech iTouch

leave the 'variant' and 'option' screens in blank,

in the next screen, my language:

es

my AltGr key works perfectly.

get outta there, reboot
When I originally configured it, I did choose PC 105, left variant and option blank, and used de_CH for the language. The AltGr key works fine on the console. Well, I'll try re-running dpkg-reconfigure xserver-xfree86 again for lack of a better solution; maybe I overlooked something. Meanwhile I'm more concerned about the impossible screen appearance. It'll probably prove to be more difficult to fix a quality problem than an absence-of-screen-output problem. :study:


Quote:

"Now when I installed, I mounted these two partitions (hostname is marconi):
....
ln -s /usr/marconi/home1/<username> <username>"

Don't know what you're doing, but if it works, fine.
I did this based on the advice of my friend who is a long-time Debian user. It's the convention of our in-house UNIX team, who run UNIX accounts for a ton of users. Basically, when installing I didn't mount /home to any partition, but manually mounted usr/marconi/home1 and the other to partitions. I then moved the user accounts and put symbolic links in /home to point to them, so when anything looks for /home/<username>, it is actually accessing /usr/marconi/home1/<username>. I only followed this convention in anticipation of being added to the network in the future. So far it seems to work. I included the information just because it was a step I had taken. I actually moved the directory of one username while logged in on the account, so when it went to log out it couldn't properly. Shouldn't have screwed anything up, I can still log in and out normally.

michapma 10-05-2004 09:54 AM

Time for an update.

First, for the record, the odd monitor output (the waviness I tried to describe) would not go away, regardless of how I configured things. I tried narrowing the horizontal and vertical refresh rates, using the vga driver, etc. Finally I shut the machine down, took the graphics card out of the AGP slot, and got rid of the dust, and that fixed things a bit. Probably some dust had collected on the card near the high-frequency signal paths and was distorting the signal. For a while I had a nice, stable display, even if not perfectly sharp. Some of the old distortion has since crept back in, but I think the hardware is to blame and not the configuration.

Next, I've tried to track down the problem I'm still having with locale input. It seems to go beyond just running dpkg-reconfigure locales or dpkg-reconfigure console-data. It seems to always want to use the UTF-8 encoding, no matter what I choose with the reconfigurations. I tried an apt-get --purge remove locales followed by an apt-get install locales, but the problem remains. I've tried enabling and then disabling the en_US.UTF-8 and de_CH.UTF-8 options in the locales reconfiguration. The problem seems to be more fundamental, lying somewhere deeper. I get warnings about a file or directory not existing, along with perl warnings, quite similar to this previously posted thread: someone else's LQ thread.

Here is the kind of complaints I am getting:
Code:

# dpkg-reconfigure console-data
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "de_CH.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "de_CH.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Looking for keymap to install:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "de_CH.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
sg
Usage: install-keymap [ keymap_file | NONE | KERNEL ]

Here is another kind of warning that I get when launching programs that try to read locale:
# nedit
locale not supported by C library, locale unchanged

What might I do to fix this? Do I really have to alter the C library, or could that warning just be the result of a failed routine?

macondo 10-05-2004 05:06 PM

" dpkg-reconfigure console-data
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "de_CH.UTF-8"

Usually, after you choose your locales, and in the next screen, you choose your language environment, say, swiss german, you still have to go /etc/environment and add this:

LC_ALL=<your locale>
LANGUAGE=<your locale> say, de_CH or whatever

save/exit
reboot


All times are GMT -5. The time now is 05:46 AM.