Skip to content

Latest IceWM (OL8) broke menu text #175

Closed
@hadrabap

Description

@hadrabap

Hello,

The latest IceWM update (icewm-3.7.1-2.el8.x86_64 from past week) on Oracle Linux 8.11 has changed something in the icewm-menu-fdo in the sense of how it handles LANG and LC_* environment variables.

My locale settings is like this:

[opc@sws ~]$ set | grep -E 'LANG|LC_'
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ADDRESS=cs_CZ.UTF-8
LC_COLLATE=cs_CZ.UTF-8
LC_CTYPE=cs_CZ.UTF-8
LC_IDENTIFICATION=cs_CZ.UTF-8
LC_MEASUREMENT=cs_CZ.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MONETARY=cs_CZ.UTF-8
LC_NAME=cs_CZ.UTF-8
LC_NUMERIC=cs_CZ.UTF-8
LC_PAPER=cs_CZ.UTF-8
LC_TELEPHONE=cs_CZ.UTF-8
LC_TIME=cs_CZ.UTF-8

With this setup the icewm-menu-fdo produces some non-latin texts:

[opc@sws ~]$ icewm-menu-fdo | grep ^menu
menu "Audio" applications-multimedia {
menu "Science" folder {
menu "Settings" folder {
menu "System" folder {
menu "Video" applications-multimedia {
menu "·𐑦𐑯𐑑𐑼𐑯𐑧𐑑" applications-internet {
menu "𐑐𐑮𐑴𐑜𐑮𐑨𐑥𐑦𐑙" applications-development {
menu "𐑕𐑬𐑯𐑛 𐑯 𐑝𐑦𐑛𐑦𐑴" applications-multimedia {
menu "𐑜𐑮𐑨𐑓𐑦𐑒𐑕" applications-graphics {
menu "𐑜𐑱𐑥𐑟" applications-games {
menu "𐑧𐑛𐑿𐑒𐑱𐑖𐑩𐑯" applications-science {
menu "𐑨𐑒𐑕𐑧𐑕𐑼𐑦𐑟" applications-accessories {
menu "𐑪𐑓𐑦𐑕" applications-office {
menu "𐑳𐑞𐑼" applications-other {

I've found out that setting LC_MESSAGES to C or single en (without US), it works:

[opc@sws ~]$ LC_MESSAGES=C icewm-menu-fdo | grep ^menu
menu "Accessories" applications-accessories {
menu "Audio" applications-multimedia {
menu "Education" applications-science {
menu "Games" applications-games {
menu "Graphics" applications-graphics {
menu "Internet" applications-internet {
menu "Office" applications-office {
menu "Other" applications-other {
menu "Programming" applications-development {
menu "Science" folder {
menu "Settings" folder {
menu "Sound & Video" applications-multimedia {
menu "System" folder {
menu "Video" applications-multimedia {
[opc@sws ~]$ LC_MESSAGES=en icewm-menu-fdo | grep ^menu
menu "Accessories" applications-accessories {
menu "Audio" applications-multimedia {
menu "Education" applications-science {
menu "Games" applications-games {
menu "Graphics" applications-graphics {
menu "Internet" applications-internet {
menu "Office" applications-office {
menu "Other" applications-other {
menu "Programming" applications-development {
menu "Science" folder {
menu "Settings" folder {
menu "Sound & Video" applications-multimedia {
menu "System" folder {
menu "Video" applications-multimedia {

With the _US it produces the wrong output.

To workaround the issue, one can create a wrapper script for icewm-menu-fdo with overridden LC_MESSAGES=en and use that wrapper script in ~/.icewm/menu in the includeprog directive instead of the default program.

[opc@sws ~]$ cd .icewm/
[opc@sws .icewm]$ cat icewm-menu-fdo 
#!/bin/bash

LC_MESSAGES=C /usr/bin/icewm-menu-fdo "$@"
exit $?
[opc@sws .icewm]$ cat menu 
# This is an example for icewm menu definition file.
# It will be installed as /usr/share/icewm/menu.
# Place your variants in /etc/icewm or in $HOME/.icewm since
# modifications to this file will be overwritten when you reinstall icewm.
#
prog "GNOME Terminal" utilities-terminal /usr/bin/gnome-terminal
separator
prog "/usr/bin/xterm" xterm /usr/bin/xterm
prog urxvt xterm urxvt -bg black -cr green -fg white -C -sl 500
prog gedit fte gedit
prog NEdit nedit nedit
prog Firefox firefox firefox
prog Hexchat xchat hexchat
prog Gimp gimp gimp
includeprog /home/opc/.icewm/icewm-menu-fdo --sep-before --no-sep-others
menufile Programs folder programs
menufile Tool_bar folder toolbar

System Information:

[opc@sws ~]$ cat /etc/oracle-release 
Oracle Linux Server release 8.10
[opc@sws ~]$ rpm -qa | grep icewm | sort
icewm-data-3.7.1-2.el8.noarch
icewm-minimal-session-3.7.1-2.el8.noarch
icewm-themes-3.7.1-2.el8.noarch
icewm-3.7.1-2.el8.x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions