个人工具

UbuntuHelp:UbuntuLTSP/LDMGconfLoginScripts

来自Ubuntu中文

跳转至: 导航, 搜索
This page is specific to Ubuntu versions 9.10

If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions. --- This page describes how to use LDM scripts to set gconf settings for users. The LTSP Manual describes this generally. The test case will be specifying a system proxy settings for users when they login. To do so, follow these steps:

  • Make sure gconf-editor is installed on your server. sudo apt-get install gconf-editor
  • Create $CHROOT/usr/share/ldm/rc.d/X02-proxysettings file. This file should contain the gconf settings, like so:
#
# The following is a script to set up network proxy on LTSP through LDM
ssh -S ${LDM_SOCKET} ${LDM_SERVER} "/usr/bin/gconftool-2 --type string --set  /system/proxy/mode 'manual'"
ssh -S ${LDM_SOCKET} ${LDM_SERVER} "/usr/bin/gconftool-2 --type string --set  /system/http_proxy/host '172.X.X.X'"
ssh -S ${LDM_SOCKET} ${LDM_SERVER} "/usr/bin/gconftool-2 --type int --set  /system/http_proxy/port 8080"
ssh -S ${LDM_SOCKET} ${LDM_SERVER} "/usr/bin/gconftool-2 --type boolean --set  /system/http_proxy/use_http_proxy true"
ssh -S ${LDM_SOCKET} ${LDM_SERVER} "/usr/bin/gconftool-2 --type boolean --set  /system/http_proxy/use_same_proxy true"
  • Once the file(s) has been created, run sudo ltsp-update-image
  • Now these settings will be set every time a user logs in. You may specify any gconf variable (to my knowledge).