12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ubuntu 14.04 trustyにVNC環境を構築

Posted at

Overview

Ubuntuサーバでデスクトップ環境で作業しVNC接続出来るようにしたい

Requirements

  • Ubuntu 14.04 trusty
  • tightvncserver
  • gnome

Installation

  • デスクトップ環境のインストール
sudo apt-get install xorg gnome-core gnome-system-tools gnome-app-install
  • VNCサーバのインストール
sudo apt-get install tightvncserver
  • VNCのpasswordの設定
vncpasswd
  • xstartupファイルの修正

vim ~/.vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

/usr/bin/ibus-daemon -d

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey
exec gnome-session &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus -n &
gnome-terminal &
  • TCP 5901番で起動
vncserver :1
  • gnomeのショートカットキーの修正
export DISPLAY=:1
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Shift><Alt>F1']";
gsettings set org.gnome.desktop.wm.keybindings maximize "['<Primary><Super>Up','<Alt>KP_5']";
gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Alt>F1']";
gsettings set org.gnome.desktop.wm.keybindings minimize "['<Primary><Super>Down','<Alt>F5']";
  • VNCクライアントで接続

MacならFinder標準のVNCクライアント(Finderメニューから「移動」→「サーバへ接続」-> アドレス欄に「vnc://xxx.xxx.xxx.xxx:5901(5900 + ディスプレイ番号)/」→「接続」)
またはChicken VNC等で接続出来る

  • 終了
vnserver -kill :1
12
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?