vmware / photon

Minimal Linux container host
https://vmware.github.io/photon
Other
3.05k stars 697 forks source link

@JPustkuchen, if "localectl list-keymaps" has an error on your VM, then you need to install kbd package. #1258

Open Pacificatore opened 3 years ago

Pacificatore commented 3 years ago

Hello dude !

I'm just watching for an answer. I think i cant install packages on my photon os with tdnf. First i had to switch AZERTY keyboard but i can't even install what you asked...

I have error 1207 :Couldn't resolve host name Error : Failed to synchronize cache for repo vmware photon.... from [web adress] Then error 1011 no marching packages

i can join a screen capture if needed.

Thanks a lot dude !

@JPustkuchen, if "localectl list-keymaps" has an error on your VM, then you need to install kbd package.

Here is revised version to try:

  1. tdnf install glibc-lang (it looks glibc-lang package is sufficient in released version, and you don't need to enable photon-dev.repo)
  2. tdnf install kbd
  3. add two lines in /etc/locale-gen.conf de_DE ISO-8859-1 de_DE.UTF-8 UTF-8
  4. locale-gen.sh
  5. localectl set-locale LANG="de_DE.UTF-8" LC_CTYPE="de_DE.UTF-8"
  6. localectl set-keymap de-latin1
  7. reboot

As you can see in the screenshot below, it looks the characters are mapped to german keyboard. The de.txt has three lines in which I typed characters from left to right in the keyboard.

de_de_systemd228

Hopefully it works for you, and please let us know if you have any question. Thank you so much for feedback, and I will ask @shoenisch to add these steps in FAQ.

Originally posted by @sarchoi in https://github.com/vmware/photon/issues/612#issuecomment-287897819

dcasota commented 3 years ago

@Pacificatore unresolved hostname issues can occur related to a (bridged) network connectivity. Try to fix that first. Otherwise, tdnf update -y and any similar operation do not work.

dcasota commented 2 years ago

@Pacificatore have you successfully installed the appropriate keyboard layout?

For the Swiss German keyboard layout, I have the same issue. The installation is similar.

tdnf install -y glibc-lang kbd glibc-i18n
de_CH ISO-8859-1 >>/etc/locale-gen.conf
de_CH.UTF-8 UTF-8 >>/etc/locale-gen.conf
locale-gen.sh
localectl set-locale LANG="de_CH.UTF-8" LC_CTYPE="de_CH.UTF-8"
localectl set-keymap de-latin1

The physical keyboard on the first row (pressing shift) is : °+"*ç%&/()=?` The effective output (pressing shift) however is : °!"§$&/()=?`

localectl version is systemd 247 (v247.10-3.ph4), photon build number 2f5aad892, linux kernel 5.10.83-5.ph4 on aarch64.

edited: got it. Had to add localectl set-keymap de_CH-latin1 and for interactive change loadkeys de_CH-latin1. Also see changing-the-locale.