Re: Hi, how to change the LC_CTYPE?
On Sun, Nov 20, 2011 at 8:57 PM, Bob Proulx b...@proulx.com wrote: Tom H wrote: Bob Proulx wrote: Tom H wrote: With bash, you'd edit /etc/profile or ~/.profile; with zsh, no idea. That won't work for logins from an xdm such as gdm, kdm or lightdm. It works for gdm, at least up to v2.30. I just tested it on Squeeze with gdm 2.20.11-4 and it does NOT source my .profile here. I did this from a clean install with a clean test user account. I just tested it on Wheezy with lightdm 1.0.6-1 and it does NOT source my .profile here. I did this from a clean install with a clean test user account. I tested it on Wheezy with gdm3 3.0.4-4 and it DID source my .profile here. So something is different between Squeeze and Wheezy and between gdm3 and gdm. Probably gdm3 specific behavior. I didn't have time to chase down the difference. Strange. It used to work for me with gdm v3 (never tried it with v=3.x), someone else said in this thread that it worked with gdm v2, and the Ubuntu bug for lightdm referred to in this thread said it used to work for gdm and doesn't work for lightdm so it's a regression. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=SwmmZu=s8hw9cc5flysw36noszzwt+4spswxck2mfh...@mail.gmail.com
Re: Hi, how to change the LC_CTYPE?
On Sb, 19 nov 11, 14:46:19, Bob Proulx wrote: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636108 Thank you for that bug reference. I have to agree that ~/.profile is for lowest-common denominator shells (POSIX shells) and not usually for any other purpose. The problem of having one single location for setting shell variables has been a problem for a lot of years. ...and there doesn't seem to be any interest to fix it :( here is one such bug from 2004. Note that even though it was eventually closed with an upload that it wasn't actually fixed. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250765 Well, having all Display Managers source ~/.profile is a sort of solution, but not all maintainers agree. OTOH, introducing yet another file be sourced would make the solution even more complicated. Debian's Xsession sourcing $HOME/.xsessionrc seems to be new since the above bug discussions. I seem to recall it happened during the squeeze release cycle. Regards, Andrei -- Offtopic discussions among Debian users and developers: http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic signature.asc Description: Digital signature
Re: Hi, how to change the LC_CTYPE?
On Fri, Nov 18, 2011 at 7:53 PM, Bob Proulx b...@proulx.com wrote: Tom H wrote: With bash, you'd edit /etc/profile or ~/.profile; with zsh, no idea. That won't work for logins from an xdm such as gdm, kdm or lightdm. It works for gdm, at least up to v2.30. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=Sy7jXmxiqxGYt7DrPaU9n_8=tzdhrvodzczhtb3kgr...@mail.gmail.com
Re: Hi, how to change the LC_CTYPE?
Andrei Popescu wrote: Bob Proulx wrote: for any other purpose. The problem of having one single location for setting shell variables has been a problem for a lot of years. ...and there doesn't seem to be any interest to fix it :( Unfortunately no. And I think (due to the FAQ entry) that the KDE folks actively didn't want to fix it. Because it kept them separate from bugs in people's .profile. A bug in your .profile could prevent you from logging into the system. And then people file bugs about it when it is completely self inflicted. is one such bug from 2004. Note that even though it was eventually closed with an upload that it wasn't actually fixed. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250765 Well, having all Display Managers source ~/.profile is a sort of solution, but not all maintainers agree. OTOH, introducing yet another file be sourced would make the solution even more complicated. And even I don't agree with that. I don't want ~/.profile sourced in a hard coded way. SuSE did that, and also redirected all errors to avoid the noise when non-posix shell syntax was used. That was adding a workaround to the workaround and the workaround introduced new bugs. I want there to be a login shell in the execution path. Then the login-shell will Do The Right Thing. If it is bash then it could source the .bash_profile but if it is sh then it will only source the .profile. And if it is (horrors) csh then it could source the .login file instead. Red Hat got this right and that is what they do in their X startup environment. Debian's Xsession sourcing $HOME/.xsessionrc seems to be new since the above bug discussions. I seem to recall it happened during the squeeze release cycle. Good to know. I wasn't tracking this problem during that time, was earlier, but slept through that period. :-) Bob signature.asc Description: Digital signature
Re: Hi, how to change the LC_CTYPE?
Tom H wrote: Bob Proulx wrote: Tom H wrote: With bash, you'd edit /etc/profile or ~/.profile; with zsh, no idea. That won't work for logins from an xdm such as gdm, kdm or lightdm. It works for gdm, at least up to v2.30. I just tested it on Squeeze with gdm 2.20.11-4 and it does NOT source my .profile here. I did this from a clean install with a clean test user account. I just tested it on Wheezy with lightdm 1.0.6-1 and it does NOT source my .profile here. I did this from a clean install with a clean test user account. I tested it on Wheezy with gdm3 3.0.4-4 and it DID source my .profile here. So something is different between Squeeze and Wheezy and between gdm3 and gdm. Probably gdm3 specific behavior. I didn't have time to chase down the difference. Bob signature.asc Description: Digital signature
Re: Hi, how to change the LC_CTYPE?
On Vi, 18 nov 11, 17:53:50, Bob Proulx wrote: Tom H wrote: With bash, you'd edit /etc/profile or ~/.profile; with zsh, no idea. That won't work for logins from an xdm such as gdm, kdm or lightdm. Those are not in the execution path. Shells launched are not login shells and nowhere in the path (by default) are any shells a login shell and therefore no sourcing of any profile will ever happen. There are customizations that can be done to make shells login shells or to have the entire xsession run from a login shell. (I think making .xsession run as a login shell is the best solution. I have posted about it several times before.) But by default adding variables to /etc/profile won't in your shell environment. And neither will it show up for any applications launched from the desktop menu. Works at least for gdm2 and slim, but not for lightdm. See #636108 for more info and also a workaround (source .profile in .xsessionrc) Kind regards, Andrei -- Offtopic discussions among Debian users and developers: http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic signature.asc Description: Digital signature
Re: Hi, how to change the LC_CTYPE?
On Vi, 18 nov 11, 13:11:35, shiyao ma wrote: I am now using Debian/Sid with display manager lightdm and desktop manager xfce4. I used to edit /etc/environment and add export LC_CTYPE=zh_CN.UTF-8. Now It doesn't work. When I have logged into XFCE4, the output of locale -a is LC_CTYE=en_US.UTF-8 Later, I edited /etc/default/locale, adding one line: export LC_CTYPE=zh_CN.UTF-8. However, the locale is still LC_CTYPE=en_US.UTF-8. I also did that in /etc/profile, and failed either. I am now curious about the way the system source *.sh in the boot up session. My question is :What's the proper way of setting LC_CTYPE? (Plus, if I add export LC_ALL=zh_CN.UTF-8 in /etc/default/locale, it will work, but this is not what I want. Further more, I think the file /etc/default/locale shouldn't be edited, as it is generated by the software and maybe overwritten.) For X you have to export variables in ~/.xsessionrc since not all Display Managers source ~/.profile Hope this helps, Andrei -- Offtopic discussions among Debian users and developers: http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic signature.asc Description: Digital signature
Re: Hi, how to change the LC_CTYPE?
Andrei Popescu wrote: Bob Proulx wrote: There are customizations that can be done to make shells login shells or to have the entire xsession run from a login shell. (I think making .xsession run as a login shell is the best solution. I have posted about it several times before.) But by default adding variables to /etc/profile won't in your shell environment. And neither will it show up for any applications launched from the desktop menu. Works at least for gdm2 and slim, but not for lightdm. See #636108 for more info and also a workaround (source .profile in .xsessionrc) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636108 Thank you for that bug reference. I have to agree that ~/.profile is for lowest-common denominator shells (POSIX shells) and not usually for any other purpose. The problem of having one single location for setting shell variables has been a problem for a lot of years. here is one such bug from 2004. Note that even though it was eventually closed with an upload that it wasn't actually fixed. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250765 Debian's Xsession sourcing $HOME/.xsessionrc seems to be new since the above bug discussions. Bob signature.asc Description: Digital signature
Re: Hi, how to change the LC_CTYPE?
do a: dpkg-reconfigure locales choose your default locale and that's it. reboot. Em 18-11-2011 02:11, shiyao ma escreveu: I am now using Debian/Sid with display manager lightdm and desktop manager xfce4. I used to edit /etc/environment and add export LC_CTYPE=zh_CN.UTF-8. Now It doesn't work. When I have logged into XFCE4, the output of locale -a is LC_CTYE=en_US.UTF-8 Later, I edited /etc/default/locale, adding one line: export LC_CTYPE=zh_CN.UTF-8. However, the locale is still LC_CTYPE=en_US.UTF-8. I also did that in /etc/profile, and failed either. I am now curious about the way the system source *.sh in the boot up session. My question is :What's the proper way of setting LC_CTYPE? (Plus, if I add export LC_ALL=zh_CN.UTF-8 in /etc/default/locale, it will work, but this is not what I want. Further more, I think the file /etc/default/locale shouldn't be edited, as it is generated by the software and maybe overwritten.) Thanks. -- My gpg pubring is available via: gpg --keyserver subkeys.pgp.net http://subkeys.pgp.net --recv-keys 307CF736 More on: http://about.me/introom -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ec63404.5070...@gmail.com
Re: Hi, how to change the LC_CTYPE?
dpkg-reconfigure locales is not meticulous enough. That's the reason why I want to set the default locale by myself. 2011/11/18 Marlon Nunes mcnu...@gmail.com do a: dpkg-reconfigure locales choose your default locale and that's it. reboot. Em 18-11-2011 02:11, shiyao ma escreveu: I am now using Debian/Sid with display manager lightdm and desktop manager xfce4. I used to edit /etc/environment and add export LC_CTYPE=zh_CN.UTF-8. Now It doesn't work. When I have logged into XFCE4, the output of locale -a is LC_CTYE=en_US.UTF-8 Later, I edited /etc/default/locale, adding one line: export LC_CTYPE=zh_CN.UTF-8. However, the locale is still LC_CTYPE=en_US.UTF-8. I also did that in /etc/profile, and failed either. I am now curious about the way the system source *.sh in the boot up session. My question is :What's the proper way of setting LC_CTYPE? (Plus, if I add export LC_ALL=zh_CN.UTF-8 in /etc/default/locale, it will work, but this is not what I want. Further more, I think the file /etc/default/locale shouldn't be edited, as it is generated by the software and maybe overwritten.) Thanks. -- My gpg pubring is available via: gpg --keyserver subkeys.pgp.net http://subkeys.pgp.net --recv-keys 307CF736 More on: http://about.me/introom -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.**debian.orgdebian-user-requ...@lists.debian.orgwith a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/**4ec63404.5070...@gmail.comhttp://lists.debian.org/4ec63404.5070...@gmail.com -- My gpg pubring is available via: gpg --keyserver subkeys.pgp.net--recv-keys 307CF736 More on: http://about.me/introom
Re: Hi, how to change the LC_CTYPE?
According to my experience, editing /etc/default/locale should work. I did restart my laptop and found that the line export LC_CTYPE=zh_CN.UTF-8 didn't work. However, when I switched to root, and run locale -a, the output became normal. To confirm that, I run set | grep LC_CTYPE. It is true that LC_CTYPE=zh_CN.UTF-8. My root account uses bash, and my account uses zsh as default sh. I guess it's the problem of my zsh. But I still don't know the solution. On Fri, Nov 18, 2011 at 7:19 PM, i i...@introo.me wrote: dpkg-reconfigure locales is not meticulous enough. That's the reason why I want to set the default locale by myself. 2011/11/18 Marlon Nunes mcnu...@gmail.com do a: dpkg-reconfigure locales choose your default locale and that's it. reboot. Em 18-11-2011 02:11, shiyao ma escreveu: I am now using Debian/Sid with display manager lightdm and desktop manager xfce4. I used to edit /etc/environment and add export LC_CTYPE=zh_CN.UTF-8. Now It doesn't work. When I have logged into XFCE4, the output of locale -a is LC_CTYE=en_US.UTF-8 Later, I edited /etc/default/locale, adding one line: export LC_CTYPE=zh_CN.UTF-8. However, the locale is still LC_CTYPE=en_US.UTF-8. I also did that in /etc/profile, and failed either. I am now curious about the way the system source *.sh in the boot up session. My question is :What's the proper way of setting LC_CTYPE? (Plus, if I add export LC_ALL=zh_CN.UTF-8 in /etc/default/locale, it will work, but this is not what I want. Further more, I think the file /etc/default/locale shouldn't be edited, as it is generated by the software and maybe overwritten.) Thanks. -- My gpg pubring is available via: gpg --keyserver subkeys.pgp.net http://subkeys.pgp.net --recv-keys 307CF736 More on: http://about.me/introom -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.**debian.orgdebian-user-requ...@lists.debian.orgwith a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/**4ec63404.5070...@gmail.comhttp://lists.debian.org/4ec63404.5070...@gmail.com -- My gpg pubring is available via: gpg --keyserver subkeys.pgp.net--recv-keys 307CF736 More on: http://about.me/introom -- My gpg pubring is available via: gpg --keyserver subkeys.pgp.net--recv-keys 307CF736 More on: http://about.me/introom
Re: Hi, how to change the LC_CTYPE?
On 2011-11-18, Marlon Nunes mcnu...@gmail.com wrote: do a: dpkg-reconfigure locales choose your default locale and that's it. reboot. Why reboot? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrnjcd27i.2u9.cu...@einstein.electron.org
Re: Hi, how to change the LC_CTYPE?
Once again, I added export LC_CTYPE=zh_CN.UTF-8 in my .zshrc However, I do not think it will affect the locale of my GUI software... So guys, what's your solution? On Sat, Nov 19, 2011 at 12:34 AM, Curt cu...@free.fr wrote: On 2011-11-18, Marlon Nunes mcnu...@gmail.com wrote: do a: dpkg-reconfigure locales choose your default locale and that's it. reboot. Why reboot? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrnjcd27i.2u9.cu...@einstein.electron.org -- My gpg pubring is available via: gpg --keyserver subkeys.pgp.net--recv-keys 307CF736 More on: http://about.me/introom
Re: Hi, how to change the LC_CTYPE?
On Fri, Nov 18, 2011 at 12:29 PM, shiyao ma i...@introo.me wrote: Once again, I added export LC_CTYPE=zh_CN.UTF-8 in my .zshrc However, I do not think it will affect the locale of my GUI software... With bash, you'd edit /etc/profile or ~/.profile; with zsh, no idea. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=sz0qfwtbhph4zt2xj5xxespaasld_-bqt3ukxmgxms...@mail.gmail.com
Re: Hi, how to change the LC_CTYPE?
shiyao ma wrote: Once again, I added export LC_CTYPE=zh_CN.UTF-8 in my .zshrc However, I do not think it will affect the locale of my GUI software... Is it an acceptable solution to set LANG=zh_CN.UTF-8 only? If not then I will suggest a more complicated but robust solution. It appears that setting LANG works but setting LC_CTYPE does not. I just tried the experiment. I ran 'dpkg-reconfigure locales' and make zh_CN.UTF-8 available. Then I tried having only LC_CTYPE set and having only LANG set in /etc/default/locale. Having LANG set propagated the value successfully. Having only LC_CTYPE set did not. Having /etc/default/locale set LANG enables /etc/init.d/lightdm to load the file. Then children of lightdm inherit the variable. Tom H wrote: With bash, you'd edit /etc/profile or ~/.profile; with zsh, no idea. That won't work for logins from an xdm such as gdm, kdm or lightdm. Those are not in the execution path. Shells launched are not login shells and nowhere in the path (by default) are any shells a login shell and therefore no sourcing of any profile will ever happen. There are customizations that can be done to make shells login shells or to have the entire xsession run from a login shell. (I think making .xsession run as a login shell is the best solution. I have posted about it several times before.) But by default adding variables to /etc/profile won't in your shell environment. And neither will it show up for any applications launched from the desktop menu. Bob signature.asc Description: Digital signature
Hi, how to change the LC_CTYPE?
I am now using Debian/Sid with display manager lightdm and desktop manager xfce4. I used to edit /etc/environment and add export LC_CTYPE=zh_CN.UTF-8. Now It doesn't work. When I have logged into XFCE4, the output of locale -a is LC_CTYE=en_US.UTF-8 Later, I edited /etc/default/locale, adding one line: export LC_CTYPE=zh_CN.UTF-8. However, the locale is still LC_CTYPE=en_US.UTF-8. I also did that in /etc/profile, and failed either. I am now curious about the way the system source *.sh in the boot up session. My question is :What's the proper way of setting LC_CTYPE? (Plus, if I add export LC_ALL=zh_CN.UTF-8 in /etc/default/locale, it will work, but this is not what I want. Further more, I think the file /etc/default/locale shouldn't be edited, as it is generated by the software and maybe overwritten.) Thanks. -- My gpg pubring is available via: gpg --keyserver subkeys.pgp.net--recv-keys 307CF736 More on: http://about.me/introom
Re: Hi, how to change the LC_CTYPE?
shiyao ma wrote: I used to edit /etc/environment and add export LC_CTYPE=zh_CN.UTF-8. Now It doesn't work. Debian keeps moving the location to set locales around. It is no longer in /etc/environment. It is now either /etc/default/locale for the entire system or your own personal files for just yourself. When I have logged into XFCE4, the output of locale -a is LC_CTYE=en_US.UTF-8 Later, I edited /etc/default/locale, adding one line: export LC_CTYPE=zh_CN.UTF-8. However, the locale is still LC_CTYPE=en_US.UTF-8. I also did that in /etc/profile, and failed either. Did you remember to log out and log back in again so that it will take affect? Also after logging out you will need to restart lightdm in order to have it take affect. I am now curious about the way the system source *.sh in the boot up session. My question is :What's the proper way of setting LC_CTYPE? For every process in the system it is /etc/default/locale. For just yourself you can put it into your ~/.bashrc file. (Plus, if I add export LC_ALL=zh_CN.UTF-8 in /etc/default/locale, it will work, but this is not what I want. I think you must not have restarted lightdm in between changing that file. Further more, I think the file /etc/default/locale shouldn't be edited, as it is generated by the software and maybe overwritten.) It is a conffile. Meaning that you are allowed to edit it and your settings will be respected. It is okay to edit that file. Bob signature.asc Description: Digital signature