Bug 3085 - vsmserver (and vsmagent?) fails to start with bad locale
Summary: vsmserver (and vsmagent?) fails to start with bad locale
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Server (show other bugs)
Version: trunk
Hardware: PC Linux Ubuntu
: P2 Normal
Target Milestone: MediumPrio
Assignee: Peter Åstrand
URL:
Keywords:
: 4550 (view as bug list)
Depends on:
Blocks: 4512
  Show dependency treegraph
 
Reported: 2009-04-16 10:06 CEST by Karl Mikaelsson
Modified: 2021-12-15 08:47 CET (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Karl Mikaelsson cendio 2009-04-16 10:06:03 CEST
Ubuntu again. This time, it doesn't allow for setting an empty locale. Perhaps we should set it to C at once instead of to an empty string?

root@ubuntu:/media/cdrom0/serverkit-linux# uname -a
Linux ubuntu 2.6.28-11-generic #41-Ubuntu SMP Wed Apr 8 04:39:23 UTC 2009 x86_64 GNU/Linux
root@ubuntu:/media/cdrom0/serverkit-linux# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 9.04
Release:	9.04
Codename:	jaunty
root@ubuntu:/media/cdrom0/serverkit-linux# /etc/init.d/vsmserver start
Starting ThinLinc vsmserver
Traceback (most recent call last):
  File "/opt/thinlinc/sbin/vsmserver", line 22, in <module>
    VSMServer ( sys . argv )
  File "/opt/thinlinc/modules/thinlinc/vsm/vsmserver.py", line 87, in __init__
    check_vsmserver_environment ( self . tlprefix , self . pidfile )
  File "/opt/thinlinc/modules/thinlinc/vsm/checkenvironment.py", line 64, in check_vsmserver_environment
    O0ooo00OOo00 ( )
  File "/opt/thinlinc/modules/thinlinc/vsm/checkenvironment.py", line 43, in O0ooo00OOo00
    locale . setlocale ( locale . LC_CTYPE , "" )
  File "/usr/lib/python2.6/locale.py", line 513, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting
root@ubuntu:/media/cdrom0/serverkit-linux# locale -a
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_COLLATE to default locale: No such file or directory
C
POSIX
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NG
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
Comment 1 Peter Åstrand cendio 2009-04-16 10:17:10 CEST
The problem could not be triggered while logging in via SSH from maggie. However, it happens after:

export LC_ALL=sv.utf8

With this, applications such as "locale" and "firefox" also complains:

(firefox:19969): Gdk-WARNING **: locale not supported by C library

I guess the problem is basically that no swedish locale is installed. locale -a confirms this:


locale -a
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_COLLATE to default locale: No such file or directory
C
POSIX
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NG
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8


Although it's bad to set LC_ALL to a non-existent locale, we might want to handle this better in vsmserver, as well as our other scripts that does setlocale(). Perhaps we should, just like firefox, fallback to C. Not critical for 3.0.0, though. 
Comment 2 Karl Mikaelsson cendio 2009-04-16 10:20:07 CEST
Changing summary, severity according to comments.
Comment 3 Pierre Ossman cendio 2013-03-05 10:33:31 CET
*** Bug 4550 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.