← Back to team overview

lubuntu-desktop team mailing list archive

Re: _P於 lxdm _F_r

 

On Wed, 10 Mar 2010 13:35:43 +0800
PCMan <pcman.tw@xxxxxxxxx> wrote:

> Hi all developers and users,
> Earlier dgod and I discussed about the way lxdm handles $PATH
> environment variable.
> According to the suggestion from dgod, directly passing existing
> environment variables to lxdm is not a good idea and PATH should be
> restricted to /usr/local/bin:/usr/bin only.
> However, this restriction breaks many system applications in ubuntu
> and arch linux.
> Without this restriction and if global env variables from the system
> is directly used, things might go wrong in Fedora.
> So, I'd like to ask that where the values of $PATH come from in Ubuntu
> and Arch Linux and what's the better solution for this issue.
> 
> Anyone know how gdm handles this?
> 
> 2010/3/10 dgod <dgod.osa@xxxxxxxxx>:
> > 考虑到现代的linux都把sbin放到了默认环境变量里面,默认加入这些应该是可以的。
> > 如果考虑到使用全局预设的环境变量的需要,可以考虑加入一个新的环境变量LXDM_FORCE_PATH,如果设置了这个,那么session的环境变量可以设置成它
> > 这样不同的系统可以通过修改/usr/sbin/lxdm里的设置来调整,如export LXDM_FORCE_PATH=$PATH。
> >
> > 事实上最好能确认在ubuntu等系统中,PATH到底是怎么生成的。
> >
> > 在 2010年3月10日 下午12:23,PCMan <pcman.tw@xxxxxxxxx>写道:
> >>
> >> 我是_J_檫@_____}有再____的空_g
> >> 因_樵谄渌_ distro 默_J_O置下,有些_@部份_K不是__ /etc/profile _O置
> >> 使用 /bin:/usr/local/bin:/usb/bin __造成部分系_y程序功能失常
> >> 如果真要默_J使用 hard-coded 的路_剑_那我__建_h加入 /sbin 等等
> >> 至少__一些重要系_y元件得以正常___樱_
> >> 目前我所_y___^的,__定在 debian, ubuntu, 及 archlinux
> >> 就目前的 lxdm,都__有___}。
> >>
> >> 2010/3/10 dgod <dgod.osa@xxxxxxxxx>:
> >> >
> >> > 首先/bin:/usr/local/bin:/usb/bin应该是所有unix的默认路径。如果系统需要修改这个,那么应该是在login的时候,自己在shell配置文件如/etc/profile之类的设置。比如fedora就是这样的,fedora现在也把/sbin等路径放到普通用户的PATH环境变量了。
> >> > 事实上我不认为把提供给系统服务用的环境变量直接提供给普通用户,有何意义。
> >> >
> >> > 事实上原来用global的默认路径的时候,就有人在sf.net上报过相关bug,这会导致至少在fedora上设置出来的路径不合普通用户需要。
> >> >
> >> > ubuntu需要的话,或者可以修改配置文件中的PATH环境,或者单独对lxdm打个补丁。
> >> >
> >> > 在 2010年3月10日 上午3:09,PCMan <pcman.tw@xxxxxxxxx>写道:
> >> >>
> >> >> 我注意到你 revert 了之前我改_^的 PATH
> >> >> 有特_e的理由_幔_
> >> >> __制使用  /usr/local/bin:/usr/bin 完全弄__ ubuntu 上的 LXDE
> >> >> 而且很多_|西因此__成_o法使用
> >> >> _S多 distro __在 PATH _e面加_|西,不用 global 的很多_|西可能___o法正常_\作
> >> >> 至少在 Ubuntu 上_@已__造成很多___}...
> >> >> 在 ArchLinux 上也是一_樱_弄_牧撕芏__|西
> >> >>
> >> >> 我__是__建_h改回使用 global environment
> >> >> 如果使用者真的有需要限_s在  /usr/local/bin:/usr/bin
> >> >> 那就可以改 lxdm.conf 加入 path=/usr/local/bin:/usr/bin
> >> >> _@就是__初_O_@___O定 key 的目的
> >> >> 但是__於一般使用_碚f,____使用 global env __比_^洽__
> >> >> 在很多 distro 上,有部份桌面__件是依___@__行_椴拍苷_常_\行的
> >> >> 我_y___^的包括 Debian, Ubuntu, ArchLinux,全部都需要 global
> >> >> 用你改_^的_S多__件都失效了,包括 policykit 在_龋__@很_乐_
> >> >> _@造成其他 distro 上_S多系_y__件都_牧耍_也有用_艋__筮^_状_
> >> >> 在 fedora _@_佣疾___有___}_幔_
> >> >
> >> >
> >
> >

Shouldn't a PATH= entry in /etc/profile solve this issue ? We could also make it Lubuntu specific by putting it in /etc/skel/.profile 



Follow ups

References