2012年4月21日 星期六

rescue grub

grub rescue>ls
(hd0), (hd0,1), (hd0,2), (hd0,3)...
grub rescue>set root=(hd0,x)
grub rescue>set prefix=(hd0,x)/boot/grub
grub rescue>insmod normal
rescue:grub>normal

and you can see boot menu to boot into Ubuntu

modify /boot/grub/grub.cfg in ubuntu

$sudo update-grub
$sudo grub-install /dev/sda

2012年4月8日 星期日

vnc with X

run vncserver in ubuntu
download the latest vnc from http://www.realvnc.com/cgi-bin/download.cgi
1. error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
need to download the file and put it in /usr/lib and link it under /lib if necessary

2. check errors in  ~/vnc/$HOSTNAME:1.log
 to fix could not open default font 'fixed'
$mkdir -p /usr/X11R6/lib/X11
$sudo ln -s ln -s /usr/share/X11 /usr/X11R6/lib/X11

3. vi ~/.vnc/xstartup
add 2 lines after [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
change "twm &" to "gnome-session &"

4. make /etc/X11/xinit/xinitrc executable
$sudo chmod u+x /etc/X11/xinit/xinitrc

you can see gnome desktop from vnc client...