Pandora 1GHz >> SuperZaxxon

如何同時使用Debian系統


雖然Pandora的SuperZaxxon系統相當輕巧,啓動速度相當快,不過最缺乏的還是應用程式的支援,數量太過稀少,即使有衆多高手加入移植行列,還是遠不及Debian系統的數量,因此,之後的Pyra掌機,預設系統也將採用Debian系統,達到結合Pandora遊戲強項和Debian眾多程式支援的優點,不過在Pyra掌機尚未量產前,我們也可以用Pandora掌機打造這樣的雙系統環境,達到一邊寫程式一邊打電動的樂趣,做法相當簡單,只要先安裝Pandian Mark3系統到SDCard,然後寫一個簡單的chroot script即可,步驟如下說明:

$ vim login
#!/bin/sh
CHROOT=$(dirname "$0")
CHMODE=$1
CHUSER=$2
 
my_usage(){
  echo "usage: login [cli|lxde] [root|user]"
}
 
my_mount(){
  mount -o remount,rw,auto,sync,suid "$CHROOT"
  mount -o bind /dev "$CHROOT/dev"
  mount -o bind /sys "$CHROOT/sys"
  mount -o bind /proc "$CHROOT/proc"
  mount -o bind /dev/pts "$CHROOT/dev/pts"
  mount -o bind /dev/shm "$CHROOT/dev/shm"
  mount -o bind /etc/group "$CHROOT/etc/group"
}
 
my_umount(){
  umount "$CHROOT/sys"
  umount "$CHROOT/proc"
  umount "$CHROOT/dev/pts"
  umount "$CHROOT/dev/shm"
  umount "$CHROOT/dev"
  umount "$CHROOT/etc/group"
}
 
if [ `whoami` != "root" ] ; then
  echo "run me as root !"
  my_usage()
  exit 1
fi
 
if [ "$CHMODE" != "cli" ] && [ "$CHMODE" != "lxde" ] ; then
  echo "only support cli and lxde mode !"
  my_usage()
  exit 2
fi
 
my_umount > /dev/null 2>&1
my_mount
 
if [ "$CHMODE" == "lxde" ] ; then
  DISPLAY=:0.0
  export DISPLAY
  xhost +
  chroot $CHROOT su - "$CHUSER" -c 'startlxde'
  killall lxpanel
  killall pcmanfm
else
  chroot $CHROOT su - "$CHUSER"
fi
 
my_umount > /dev/null 2>&1
exit 0

進入chroot環境後,執行如下命令,否則會遇到dpkg: unrecoverable fatal error

$ sudo umount /etc/group

接著使用如下指令開啟Debian系統:

$ sudo /media/xxx/login lxde user

scim輸入法(如:開啟leafpad並支援scim輸入法):

$ XMODIFIERS=@im=SCIM GTK_IM_MODULE=scim QT4_IM_MODULE=scim leafpad



ibus輸入法(執行ibus service就可以)



如果遇到無法上網,記得修改DNS

$ sudo vim /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8


返回上一頁