Bug 1290820

Summary: xrdp does not obey system language by default
Product: [Fedora] Fedora EPEL Reporter: Hannes Wenzel <wenzehan>
Component: xrdpAssignee: Itamar Reis Peixoto <itamar>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: bojan, itamar, meta, plroskin
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-29 01:26:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hannes Wenzel 2015-12-11 14:35:34 UTC
Description of problem:
When serving an Xfce desktop over RDP, the interface language will always be American English instead of the system default. This, however, should apply to Gnome and KDE as well.

Version-Release number of selected component (if applicable):
CentOS Linux release 7.1.1503 (Core) 
xrdp-0.9.0-4.el7.x86_64
xfce4-4.10

How reproducible:
always

Steps to Reproduce:
1. Minimal install, language configuration through anaconda
2. # yum group install xfce xrdp; regard bug #1244573
3. # echo PREFERRED=$(which startxfce4) > /etc/sysconfig/desktop
4. # systemctl start xrdp
5. Connect to xrdp

Actual results:
Interface language is set to American English.

Expected results:
Interface language should be set according to /etc/locale.conf.

Additional info:
There is a rather simple workaround: In /etc/xrdp/startwm.sh do "unset LANG" sometime before /etc/X11/xinit/Xsession is called.

This is because LANG is set to en_US.UTF-8 from the very beginning of the script. Later /etc/profile.d/lang.sh will get sourced, but it doesn't change an already set LANG. Unsetting LANG in startwm.sh allows lang.sh to set the locale according to /etc/locale.conf again.

As to why LANG is set in the first place I can only speculate for now:
* /etc/environment is empty
* /etc/sysconfig/xrdp (referenced from xrdp.service) consists of comments only
* xrdp and xrdp-sesman have LANG=de_DE.UTF-8
* Xvnc has LANG=en_US.UTF-8

Comment 1 Pavel Roskin 2016-02-08 06:56:37 UTC
xrdp-sesman sets LANG. /etc/profile.d/lang.sh preserves LANG if it's set.

The fix has been submitted upstream.
https://github.com/neutrinolabs/xrdp/pull/314

Comment 2 Itamar Reis Peixoto 2016-02-08 14:20:08 UTC
merged in upstream, will land fedora and EL in next build.

Comment 3 Koichiro IWAO 2016-08-18 06:00:23 UTC
The fix causes another bug.

See also: https://github.com/neutrinolabs/xrdp/pull/410

Comment 4 Koichiro IWAO 2016-08-23 02:54:32 UTC
(In reply to meta from comment #3)
> The fix causes another bug.
> 
> See also: https://github.com/neutrinolabs/xrdp/pull/410

merged in upstream.