Ⅰ. はじめに
タイトルの通り「Ubuntu にデスクトップ環境をインストールする方法」です。
VPSでレンタルしたコマンドラインのみのUbuntuにデスクトップ環境をインストールし、VNC接続で操作できるようにする事を想定しています。
Ⅱ. やり方
1. VNCサーバをインストール
apt-get install vnc4server
2. VNCのパスワードを設定する
vncpasswd
4. xstartupファイルを編集する
vim ~/.vnc/xstartup
#!/bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & exec gnome-session & gnome-panel & gnome-settings-daemon & metacity & nautilus -n & gnome-terminal &
5. 必要なパッケージをインストールする
apt-get install -y gnome-core gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
6. VNCサーバをポート1で起動する
vncserver :1
7. UltraVNC等で接続する