2012年10月10日 星期三

lubuntu 12.04

//-----------------------------
更新source.list
sudo sed -i 's/tw.archive.ubuntu.com/ubuntu.stu.edu.tw/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get upgrade
//-----------------------------
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precis
e/main/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precis
e/restricted/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main
 restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ubuntu.stu.edu.tw/ubuntu/ precise main restricted
deb-src http://ubuntu.stu.edu.tw/ubuntu/ precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ubuntu.stu.edu.tw/ubuntu/ precise-updates main restricted
deb-src http://ubuntu.stu.edu.tw/ubuntu/ precise-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ubuntu.stu.edu.tw/ubuntu/ precise universe
deb-src http://ubuntu.stu.edu.tw/ubuntu/ precise universe
deb http://ubuntu.stu.edu.tw/ubuntu/ precise-updates universe
deb-src http://ubuntu.stu.edu.tw/ubuntu/ precise-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ubuntu.stu.edu.tw/ubuntu/ precise multiverse
deb-src http://ubuntu.stu.edu.tw/ubuntu/ precise multiverse
deb http://ubuntu.stu.edu.tw/ubuntu/ precise-updates multiverse
deb-src http://ubuntu.stu.edu.tw/ubuntu/ precise-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ubuntu.stu.edu.tw/ubuntu/ precise-backports main restricted universe multivers
e
deb-src http://ubuntu.stu.edu.tw/ubuntu/ precise-backports main restricted universe multi
verse
deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
//----------------------------------------------------------------------------------------------------------------------------
安裝freeNX
wget https://bugs.launchpad.net/freenx-server/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz 
sudo add-apt-repository ppa:freenx-team
sudo apt-get update && sudo apt-get install freenx
tar -xvf nxsetup.tar.gz
sudo cp nxsetup /usr/lib/nx/nxsetup
sudo /usr/lib/nx/nxsetup --install --clean --purge --setup-nomachine-key 
sudo /usr/lib/nx/nxsetup --install
sudo /etc/init.d/freenx-server restart
 
sudo vi /etc/nxserver/node.conf
加入以下幾行
SERVER_NAME="$(hostname)"
SSHD_PORT=22
ENABLE_PASSDB_AUTHENTICATION="1"
 
sudo /usr/lib/nx/nxloadconfig 
sudo nxserver --restart  
 
加入登入帳號 
sudo nxserver --adduser neo
sudo nxserver --passwd neo
 
查看nxserver狀態 
sudo nxserver --status
 
刪除原有session
ps -ef|grep nxagent
看到/usr/bin/nxagent -persistent -D -name NX - 使用者@hostname...的ID_number 
sudo kill nxagent的ID_number 
 
/var/lib/nxserver/home/.ssh/authorized_keys2 
 
windows nx client部份:
刪除
把/var/lib/nxserver/home/.ssh/client.id_dsa.key下載到windows
在General->Server->Key...
匯入dsa_key 
import client.id_dsa.key
 
General->Desktop->Settings->Application->Run the following command
打上startlubuntu或/usr/bin/lxsession -s Lubuntu -e LXDE
General->Desktop->Settings->Options
選New Virtual Desktop 
//-----------------------------------------------------------------------------     使用xming+ssh
startlubuntu
 或
/usr/bin/lxsession -s Lubuntu -e LXDE
//-----------------------------------------------
關閉防火牆
sudo ufw disable

沒有留言:

張貼留言